I am getting a bug in my code where the log configuration is returning 0 for all readings. I do have a pretty hacky way of connecting to two additional CF's in the client. However it was woking for a longt time before this bug showed up. I was just wondering if anyone could decifer whats happening here.
Even the "def wait_for_position_estimator(self, cf):" Which is a function I took from the cf lib is returning 0.0 .0.0 0.0 see line "INFO:cfclient.ui.tabs.HTTYD:Position found with error in, x: 0.0, y: 0.0, z: 0.0
"
Anyone have any ideas? My only guess is that theere are log blocks not being deleted because of this line,
INFO:cflib.crazyflie.mem:7 memories found (but I am not really sure if that is how they work...)
There are 7 variables that I am logging for these CF's (each)
Code: Select all
received_signals = LogConfig(name='lighthouse', period_in_ms=1000)
# below 50ms nans are called even though the cf can see the base station
# probably because it is logging the variable before it is updated.
received_signals.add_variable('lighthouse.bsReceive','uint16_t')
log_position = LogConfig(name='Position', period_in_ms=50)
log_position.add_variable('stateEstimate.x', 'float')
log_position.add_variable('stateEstimate.y', 'float')
log_position.add_variable('stateEstimate.z', 'float')
log_position.add_variable('stateEstimate.roll', 'float')
log_position.add_variable('stateEstimate.pitch', 'float')
log_position.add_variable('stateEstimate.yaw', 'float')
Code: Select all
INFO:cflib.crazyflie:Callback->Connected to [radio://0/80/2M/A0A0A0A0A0]
INFO:cflib.crazyflie:Callback->Connected to [radio://0/80/2M/A0A0A0A0A1]
INFO:cflib.crazyflie.log:Have successfully started logging for id=2
INFO:cflib.crazyflie.log:Have successfully started logging for id=3
INFO:cflib.crazyflie.platformservice:Protocol version: 4
INFO:cflib.crazyflie.platformservice:Protocol version: 4
INFO:cflib.crazyflie.toc:TOC for port [5] found in cache
INFO:cflib.crazyflie:Log TOC finished updating
INFO:cflib.crazyflie.toc:TOC for port [5] found in cache
INFO:cflib.crazyflie:Log TOC finished updating
INFO:cflib.crazyflie.mem:7 memories found
INFO:cflib.crazyflie.mem:7 memories found
INFO:cflib.crazyflie:Memories finished updating
INFO:cflib.crazyflie.toc:TOC for port [2] found in cache
INFO:cflib.crazyflie:Param TOC finished updating
INFO:cflib.crazyflie:Callback->Connection setup finished [radio://0/80/2M/A0A0A0A0A0]
INFO:cfclient.ui.tabs.HTTYD:Starting flight logger thread for cf_pos_L
INFO:cflib.crazyflie:Memories finished updating
INFO:cflib.crazyflie.toc:TOC for port [2] found in cache
INFO:cflib.crazyflie:Param TOC finished updating
INFO:cflib.crazyflie:Callback->Connection setup finished [radio://0/80/2M/A0A0A0A0A1]
INFO:cfclient.ui.tabs.HTTYD:Starting flight logger thread for cf_pos_R
INFO:cfclient.ui.tabs.HTTYD:Waiting for estimator to find stable position...
INFO:cflib.crazyflie.log:Have successfully started logging for id=4
INFO:cfclient.ui.tabs.HTTYD:Waiting for estimator to find stable position...
INFO:cflib.crazyflie.log:Have successfully started logging for id=1
INFO:cfclient.ui.tabs.HTTYD:Waiting for estimator to find stable position...
INFO:cflib.crazyflie.log:Have successfully started logging for id=1
INFO:cfclient.ui.tabs.HTTYD:Position found with error in, x: 4.177016671746969e-05, y: 0.00011406908743083477, z: 9.312271140515804e-05
INFO:cflib.crazyflie.log:Have successfully stopped logging for id=4
INFO:cflib.crazyflie.log:Have successfully deleted id=4
_cf callbacks set
INFO:cflib.crazyflie.log:Have successfully started logging for id=5
INFO:cflib.crazyflie.log:Have successfully started logging for id=6
INFO:cfclient.ui.tabs.HTTYD:Position found with error in, x: 0.0, y: 0.0, z: 0.0
INFO:cflib.crazyflie.log:Have successfully stopped logging for id=1
INFO:cflib.crazyflie.log:Have successfully deleted id=1
INFO:cfclient.ui.tabs.HTTYD:Position found with error in, x: 0.0, y: 0.0, z: 0.0
INFO:cflib.crazyflie.log:Have successfully stopped logging for id=1
INFO:cflib.crazyflie.log:Have successfully deleted id=1
_cf_L callbacks set
_cf_R callbacks set
INFO:cflib.crazyflie.log:Have successfully started logging for id=2
INFO:cflib.crazyflie.log:Have successfully started logging for id=3
INFO:cflib.crazyflie.log:Have successfully started logging for id=2
INFO:cflib.crazyflie.log:Have successfully started logging for id=3
INFO:cfclient.ui.tabs.HTTYD:Switching Flight Mode to: FlightModeStates.GROUNDED
INFO:cfclient.ui.tabs.HTTYD:Starting flight controller thread
cf_pos_L 0.0 0.0 0.0
cf_pos_L 0.0 0.0 0.0
cf_pos_L 0.0 0.0 0.0
cf_pos_L 0.0 0.0