Acceleration control to roll pitch and thrust

Discussions and questions about the Crazyflie Nano Quadcopter
Post Reply
yuhsiang
Beginner
Posts: 22
Joined: Wed Mar 03, 2021 11:53 am

Acceleration control to roll pitch and thrust

Post by yuhsiang »

Hi,

I have developed an algorithm to compute the desired acceleration for crazyflie. What is the best way to convert this acceleration to desired roll pitch and thrust so I can use the send_setpoint to command the crazyflie to track the desired acceleration?

Thank you.

Best regards,

Yu-Hsiang
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: Acceleration control to roll pitch and thrust

Post by kimberly »

Hi!

So do you mean accelerations in body fixed axis? Then acceleration in body x is correlated to pitch, for body y to roll and for body z to thrust. Do check the coordinate system we handle on this webpage: https://www.bitcraze.io/documentation/s ... te-system/. The pitch is inverted for us (so not according to the right hand rule).

I do hope that you have a good motion capture system for this? The accelerometers are notoriously noisy so I'll doubt that you will be able to control it on those alone.
yuhsiang
Beginner
Posts: 22
Joined: Wed Mar 03, 2021 11:53 am

Re: Acceleration control to roll pitch and thrust

Post by yuhsiang »

Hi Kimberly,

Thank you for your reply.

I am using the local positioning system to do my flight experiments. My controller has the global position, velocity and acceleration as input and the output is a desired global acceleration. In that case, I will convert the desired global acceleration to the desired roll/pitch and thrust so I can command the Crazyflie via its onboard attitude controller. Do you think the local positioning system will be good enough for this experiment?

Best regards,

Yu-Hsiang
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: Acceleration control to roll pitch and thrust

Post by kimberly »

I assume that you are referring to the [url+https://www.bitcraze.io/documentation/s ... ng-system/]loco positioning system[/url] right? Not local?

I haven't tried it out myself, but since the loco positioning system has about 10-20 cm precision, I would say that it would not be enough to properly measure acceleration. For something like that you would need to augment the crazyflie with the flowdeck in combination with the loco deck (extra velocity measurements to improve the localization), or use a more precise localization system like lighthouse positioning system or motioncapture system (see the positioning system overview here)
Post Reply