Before a mobile robot hits hard E-stop: detecting wheel slip and odom jumps from /cmd_vel + /odom
Hi guys,
I’ve been working on a small ROS 2 project for AMR/AGV-style mobile robots.
Problem:
A robot may still be receiving valid velocity commands, but its physical motion no longer matches the command stream.
Examples:
- wheel slip on wet / oily floors
- odometry mismatch
- localization jumps
- stale / bursty velocity commands
- robot starts shaking or over-correcting before safety lidar / hardware E-stop cuts in
A normal timeout only checks:
Did a command arrive recently?
It does not check:
Is the robot still moving according to the command it was just given?
So I built a small inline ROS 2 topic filter:
/cmd_vel → Kinematic Guard → /safe_cmd_vel
↑
/odom
It has a passive observe mode first, so it can run without taking over control.
Example status:
{
"status": "RESYNCING",
"causalAlignment": "BROKEN",
"dominantCause": "WHEEL_SLIP",
"guardAction": "BRAKE_AND_RESYNC"
}
The demo does not need a real robot, Gazebo, or Isaac Sim. It uses a lightweight mock AMR/AGV and injects wheel slip.
GitHub:
https://github.com/ZC502/ros2_kinematic_guard
ROS Discourse discussion:
https://discourse.openrobotics.org/t/detecting-execution-collapse-before-hard-e-stop-ros2-kinematic-guard-for-ros-2-amr-agv/54944
I’d be interested in feedback from people who have dealt with mobile robot slip, odometry jumps, or unexpected hard E-stop events in the field.