Page 1 of 1

Limit the moving velocity in world coordinate following

Posted: Mon Jan 14, 2019 9:05 am
by thasu
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.

Re: Limit the moving velocity in world coordinate following

Posted: Wed Jan 23, 2019 9:08 am
by arnaud
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.