Limit the moving velocity in world coordinate following

Firmware/software/electronics/mechanics
Post Reply
thasu
Member
Posts: 30
Joined: Wed Oct 18, 2017 7:16 am

Limit the moving velocity in world coordinate following

Post by thasu » Mon Jan 14, 2019 9:05 am

I'm trying to move the CF to certain positions in a constant velocity using the send_position_setpoint command. But I noticed that at the start CF accelerates to a higher speed and trying to reach the destination as soon as possible. Is there a way to set a maximum velocity limit so that I can maintain a nearly constant velocity throughout the movement.

arnaud
Bitcraze
Posts: 1939
Joined: Tue Feb 06, 2007 12:36 pm

Re: Limit the moving velocity in world coordinate following

Post by arnaud » Wed Jan 23, 2019 9:08 am

If you are using the PID controller, it already has a limit of 1m/s (in each axis, so in X/y you can get up to 1.41m/s).

You can change this setting with the parameter posCtlPid.xyVelMax for X/Y and posCtlPid.zVelMax.

The PID used with send_position_setpoint will try to reach the setpoint as fast as possible on each axis independently, this means that the Crazyflie will not necessarily go in a straight line. The Crazyflie contains a high-level controller that would solve that: it contains a goto command that would make and follow straight line trajectory to the setpoint. The easiest right now to use the high-level commander is to use the position commander: https://github.com/bitcraze/crazyflie-l ... er_demo.py.

Post Reply