Setpoint handling in Crazyflie firmware

Firmware/software/electronics/mechanics
Post Reply
Andy
Beginner
Posts: 4
Joined: Wed Jan 16, 2019 5:17 am

Setpoint handling in Crazyflie firmware

Post by Andy » Mon Apr 15, 2019 2:14 am

I would like to try my own high-level controller on the Crazyflie. This controller outputs reference values for (roll, pitch, yaw rate, thrust) that should be sent to the Crazyflie as a setpoint. I saw that in the Commander.py class in the crazyflie_lib there are functions for sending setpoints of the form (roll, pitch, yaw, thrust) or (roll, pitch, yawrate, zdistance), but not the one I need. However, given that the reference values are controlled by different functions, I believe that I can easily modify the firmware according to my system.
The question is, where are the setpoints handled in the CF firmware and what do I need to change there?

Cheers

Andy
Beginner
Posts: 4
Joined: Wed Jan 16, 2019 5:17 am

Re: Setpoint handling in Crazyflie firmware

Post by Andy » Mon Apr 15, 2019 11:40 pm

Maybe a bit more precise, where in the firmware does the type of setpoint sent to the Crazyflie get classified and how are the setpoints processed differently according to the setpoint type?

tobias
Bitcraze
Posts: 1843
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: Setpoint handling in Crazyflie firmware

Post by tobias » Tue Apr 16, 2019 9:17 am

The setpoint architecture is a bit messy (because of backward compatibility) but adding a setpoint type is quite straight forward in crtp_commander_generic.c.

Post Reply