I'm working on a model identification algorithm using data coming from the crazyflie (Accelerometers, gyro and zrange). I have 2 questions about the samping data:
1) Starting from the basiclog.py example i wrote a code that creates data blocks in and log the variables writing them on a txt file. When chosing the sampling time i realized that for times less than 10ms the code gives always this error:
Code: Select all
ERROR:cflib.crazyflie:Exception while doing callback on port [2]
Traceback (most recent call last):
File "/home/bitcraze/workspace/Prova Python/logData.py", line 149, in _connected
self._cf.log.add_config(self._lg2)
File "/home/bitcraze/.local/lib/python3.6/site-packages/cflib/crazyflie/log.py", line 467, in add_config
'The log configuration is too large or has an invalid '
AttributeError: The log configuration is too large or has an invalid parameter
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/bitcraze/.local/lib/python3.6/site-packages/cflib/crazyflie/__init__.py", line 396, in run
cb.callback(pk)
File "/home/bitcraze/.local/lib/python3.6/site-packages/cflib/crazyflie/toc.py", line 176, in _new_packet_cb
self._toc_fetch_finished()
File "/home/bitcraze/.local/lib/python3.6/site-packages/cflib/crazyflie/toc.py", line 153, in _toc_fetch_finished
self.finished_callback()
File "/home/bitcraze/.local/lib/python3.6/site-packages/cflib/crazyflie/__init__.py", line 169, in _param_toc_updated_cb
self.connected.call(self.link_uri)
File "/home/bitcraze/.local/lib/python3.6/site-packages/cflib/utils/callbacks.py", line 54, in call
cb(*args)
File "/home/bitcraze/workspace/Prova Python/logData.py", line 181, in _connected
Thread(target=self._ramp_motors).start()
AttributeError: 'Logger' object has no attribute '_ramp_motors'
2) if yes, is it possible via firmware to avoid this and sample at a higher frequency?
Thank you all
Stefano