Can you connect to the Crazyflie using the python client? It is using the same code and if it works from the client it should from the example script. Not sure what is happening.Scanning interfaces for Crazyflies...
Crazyflies found:
No Crazyflies found, cannot run example
From your next post I get the feeling that it works, at least some times, correct?
The basiclog.py example is designed to scan for crazyflies and use the first one. If you want to, you can also hard code the radio settings like this
Code: Select all
# Scan for Crazyflies and use the first one found
# print('Scanning interfaces for Crazyflies...')
# available = cflib.crtp.scan_interfaces()
# print('Crazyflies found:')
# for i in available:
# print(i[0])
# if len(available) > 0:
# le = LoggingExample(available[0][0])
# else:
# print('No Crazyflies found, cannot run example')
uri = 'radio://0/30'
le = LoggingExample(uri)
Not sure what you mean. The log data is available in the _stab_log_data() callback and is printedI got the crazyflie's python script to run with this. But how do I get outputed position from lg_stab.
Code: Select all
def _stab_log_data(self, timestamp, data, logconf):
"""Callback from a the log API when data arrives"""
print('[%d][%s]: %s' % (timestamp, logconf.name, data))