I want to receive by log block this values:
- rateYaw
- rateRoll
- ratePitch
- pitch
- roll
- vx
- vy
- vz
- quat
- batteryLevel
Code: Select all
self._lg_stab.add_variable('stabilizer.roll', 'float')
self._lg_stab.add_variable('stabilizer.pitch', 'float')
self._lg_stab.add_variable('stabilizer.yaw', 'float')
Code: Select all
self._lg_stab.add_variable('pm.batteryLevel', 'uint8_t')
self._lg_stab.add_variable('stateEstimateZ.quat', 'uint32_t')
self._lg_stab.add_variable('stateEstimateZ.vx', 'int16_t')
self._lg_stab.add_variable('stateEstimateZ.vy', 'int16_t')
self._lg_stab.add_variable('stateEstimateZ.vz', 'int16_t')
self._lg_stab.add_variable('stateEstimateZ.rateYaw', 'int16_t')
self._lg_stab.add_variable('stateEstimateZ.rateRoll', 'int16_t')
self._lg_stab.add_variable('stateEstimateZ.ratePitch', 'int16_t')
self._lg_stab.add_variable('stateEstimate.pitch', 'float')
self._lg_stab.add_variable('stateEstimate.roll', 'float')
I tried into client too, but although the program accepted, the file in which the log block was written contained only the header.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/log.py", line 580, in _new_packet_cb
block.unpack_log_data(logdata, timestamp)
File "/home/bitcraze/.local/lib/python3.6/site-packages/cflib/crazyflie/log.py", line 307, in unpack_log_data
unpackstring, log_data[data_index:data_index + size])[0]
struct.error: unpack requires a buffer of 4 bytes
Does anyone have any suggestions??