Page 1 of 1

send_setpoint yaw or yaw_rate?

Posted: Thu Mar 10, 2022 10:35 pm
by marlos1494
Hi everyone!
Before to continue i must to explain that im a new user of the crazyflie firmware for development :?
Currently im trying to send a desired YAW angle using the comand: send_setpoint(self, roll, pitch, yaw, thrust) i had no problem with PITCH and ROLL, however, when I try to send YAW ANGLE, the crazy begin to rotate continuosly on z axis, does somebody had this problem? n how u solved? im frustated :cry:
I attach picture of the code:

Re: send_setpoint yaw or yaw_rate?

Posted: Fri Mar 11, 2022 9:07 am
by kristoffer
Yes, you are right, the yaw parameter of send_setpoint() is actually yaw_rate. One could say that the documentation is not really clear on this, sorry!

The historical background is that this is the first (and only at the time) setpoint function when the main usecase was to fly the Crazyflie using a gamepad. In that case, the pilot wants absolute values for roll and pitch, while a rate is used for yaw. Pull requests are welcome if you are up to improving the documentation :-)

The setpoint structure in the Crazyflie is a bit of a beast with close to infinite possibilities (and complexity). In theory any value can be absolute or a rate, even though all combinations are not exposed as functions in the python lib, and all variations are not supported by all controllers.

What is your use case and what do you want to achieve?