Forbidding stop_position with acceleration limits

When the moteus acceleration and velocity limits were first announced more than a year ago, it was noted that the semantics of using the legacy “stop_position” along with the new acceleration and velocity limits was “not particularly useful”. In the meantime, I’ve seen many cases where people get tripped up by this, even more so since developer kits now come with velocity and acceleration limits configured.

To mitigate that, as of firmware release 2023-09-26, moteus will now fault with code 44 if you attempt to use a stop_position while acceleration or velocity limits are configured. Here’s a quick reminder on how to upgrade:

Old New
d pos nan V T sX d pos X 0 T vV aA

Where:

  • X - target position

  • V - velocity to use to achieve that position

  • T - maximum torque

  • A - the maximum acceleration (the old formulation had no acceleration limits)

Some further notes:

Note that in the modern formulation, the velocity and acceleration limits will come from servo.default_velocity_limit and servo.default_accel_limit if nothing is specified in the current command. Values given in the current command will override those.

In the new formulation, it is possible to specify a non-zero velocity target. In that case, the trajectory profile moteus follows includes continuing motion at that constant velocity until the next command is received.

The same upgrade principle should be used if the commands are sent via the register protocol or the python or C++ library. For the register protocol, do not use register 0x026. Instead, command a 0 target velocity in register 0x021 and either configure velocity or acceleration limits, or use registers 0x028 and 0x029 to override them on a per-command basis.