|
| const geometry_msgs::msg::Twist & | current () const |
| | The current (last) command.
|
| const RobotLimits & | get_limits () const |
| | Limits being enforced.
|
| bool | reached (const geometry_msgs::msg::Twist &target) const |
| | Whether the current command already equals target, clamped to the limits.
|
| void | reset (const geometry_msgs::msg::Twist ¤t=geometry_msgs::msg::Twist()) |
| | Makes current the current command, e.g. after a command that bypassed smoothing.
|
| void | set_limits (const RobotLimits &limits) |
| | Sets the limits to enforce.
|
| const geometry_msgs::msg::Twist & | step (const geometry_msgs::msg::Twist &target, double dt) |
| | Next command towards target, dt seconds after the previous one.
|
| double | time_to_stop () const |
| | Seconds needed to stop from the current command at the maximum deceleration.
|
Brings the commanded velocity towards a target within the robot limits.
Each step clamps the target to the velocity limits and moves the current command towards it by at most acceleration * dt (speeding up) or deceleration * dt (slowing down), per axis (linear x and y, angular z). A change of direction stops at zero first. So a command never jumps, e.g. from full speed to zero, which would make the robot brake harder than it can.