Packet sending using the Python IDE #78
Replies: 1 comment 1 reply
-
Hi!
When the the Crazyradio receives data (from USB) you enter the https://github.com/bitcraze/crazyradio-firmware repository instead. I don't know if you want to dig into that, but otherwise you could simply consider it to be a bridge between USB and radio packets. The Crazyradio FW is designed to be "stupid" and just forward data without changing the data it self. The radio packet is received in the Crazyflie by the NRF processor (https://github.com/bitcraze/crazyflie2-nrf-firmware). There is some processing going on here but essentially it passes the packets on to the the STM processor via syslink (UART). Finally the data is received in the STM (https://github.com/bitcraze/crazyflie-firmware) where the real action is, that is the high level commander. Let me know if you need pointers to where to look in the firmware, otherwise happy digging! |
Beta Was this translation helpful? Give feedback.
-
Hi!
We are reaching out about the way packets are sent to a Crazyflie using the Python IDE. Currently we are using the high_level_commander (with the autonomous_sequence_high_level.py example as the basis) to upload a trajectory to the Crazyflie, and fly the said trajectory. Though we can make this work, our knowledge regarding the underlying software is limited. Thus, we are exploring the Python IDE to figure out how it works exactly.
For this purpose, we decided it is good to obtain knowledge regarding the information exchange between our computer and the Crazyflie. Thus, we attempted to follow the "Crazyflie.high_level_commander.start_trajectory" command up to the point the actual packet is sent. This brings the following sequence of functions (feel free to correct if we make a miss-step here):
Crazyflie.high_level_commander.start_trajectory(...)
Crazyflie.high_level_commander._send_packet(...)
Crazyflie.send_packet(...)
Radiodriver.send_packet(...)
_RadioDriverThread.run(...)
_RadioDriverThread._send_packet_safe(...)
_SharedRadioInstance.run(...)
_SharedRadioInstance.send_packet(...)
Crazyradio.send_packet(...)
However, from this point forward we have some difficulties understanding what actually happens with the packet. We were wondering if you could help us understand how the function "Crazyradio.send_packet(...)" works, and whether our tracking of the packet is correct.
We hope to hear from you soon, and thanks a ton in advance!
Kind regards,
Yannick
Beta Was this translation helpful? Give feedback.
All reactions