Nav2 velocity_smoother: when max_vel_x stops being a speed limit
max_vel_x is your real speed limit depends on whether a velocity_smoother sits downstream. With a smoother, the smoother's max_velocity is the enforced limit. Without one, nothing clamps the controller's output, so max_vel_x is the limit. A YAML linter can't tell the difference. A safety check has to.One number, two meanings
This article uses the DWB controller's max_vel_x. Other controllers name their limits differently.
In a typical Nav2 bringup, the controller's output is remapped through the velocity_smoother, which clamps and smooths it before commands reach the base. In that setup max_vel_x bounds what the planner considers, and the number that actually governs the robot is the smoother's max_velocity.
The smoother is optional. If your params file has no velocity_smoother node, nothing downstream clamps the controller, and max_vel_x is the fastest the robot will be commanded to drive.
Same parameter, same syntax, different safety meaning.
Reproducing it
Assume an approved speed limit of 0.45 m/s. Here are two configs that differ only in the smoother.
Config A, smoother present:
controller_server:
ros__parameters:
FollowPath:
plugin: "dwb_core::DWBLocalPlanner"
max_vel_x: 0.60
acc_lim_x: 2.5
velocity_smoother:
ros__parameters:
max_velocity: [0.40, 0.0, 1.0]
max_accel: [2.5, 0.0, 3.2]
Result: PASS. The controller's 0.60 is a search bound, and the smoother enforces 0.40, under the limit.
Config B: the same file with the velocity_smoother block deleted. Result: BLOCK.
NAV2_MAX_SPEED_EXCEEDED
parameter=max_vel_x observed=0.6000 limit=0.4500 operator=gt result=fail
Config C: the smoother is present but its own max_velocity is [0.60, 0.0, 1.0]. Result: BLOCK, this time on the smoother's value.
NAV2_MAX_SPEED_EXCEEDED
parameter=max_velocity[0] observed=0.6000 limit=0.4500 operator=gt result=fail
The check follows the enforcement point. Whichever value is the real ceiling gets compared to your approved limit.
Check your own config
- Search your params for
velocity_smoother. - If it exists, confirm its
max_velocityis at or under your approved limit. - Confirm the wiring in your launch files. A smoother that is configured but not in the command path enforces nothing. Saykai reads the params file, not launch files, so this step is on you.
- If there is no smoother, treat the controller's
max_vel_xas your speed limit.
Running this check in CI
Saykai runs this check on every pull request as a GitHub Action, then records the result in a signed Safety Pack. It's in private beta. Request pilot access or see how the gate works.