Close

Acceleration and velocity limited trajectory following

A project log for moteus brushless controller

Open source, compact, high performance, FOC based BLDC motor control

josh-pieperJosh Pieper 04/18/2022 at 10:470 Comments

To date, the only onboard trajectory following that moteus implemented was a limited form of constant velocity tracking.  This was the minimum viable setup, as it allowed an external controller to command piecewise linear trajectories in nearly any form.  However, it isn't all that convenient for simple systems, where you don't necessarily want to implement a complex controller.

So, now, one of the most requested features for moteus is now a reality: acceleration and velocity limited trajectories!

Using it can be pretty simple, just configure `servo.default_velocity_limit` and `servo.default_accel_limit` to values that are not `nan`.  Then all position mode commands will obey the desired velocity and acceleration limit.  See the results in the video below:

For more advanced cases there are more options... you can only limit acceleration or velocity, and you can override the limits on a per-command basis.  Finally, if you leave the limits as `nan`, then you get the same legacy behavior, which can be useful if you want jerk limited trajectories for instance, which the onboard controller can't do.

Discussions