send_setpoint yaw or yaw_rate?

All discussions related to the Loco Positioning system
Post Reply
marlos1494
Beginner
Posts: 1
Joined: Thu Mar 10, 2022 9:50 pm

send_setpoint yaw or yaw_rate?

Post 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:
Attachments
crazy.jpeg
kristoffer
Bitcraze
Posts: 629
Joined: Tue Jun 30, 2015 7:47 am

Re: send_setpoint yaw or yaw_rate?

Post 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?
Post Reply