Course project · Robotics
Wheel Odometry for a Skid-Steering Robot
A ROS 2 node that estimates the pose of a tracked robot from its motor speeds, checked live against ground truth.
How it works
-
01
Motor RPM
Read left and right track speeds from the robot status topic.
-
02
v and ω
Gear ratio and wheel radius give track speeds, then linear and angular velocity.
-
03
Integrate
Exact arc formula when turning, Runge-Kutta 2 when going almost straight.
-
04
Publish
Odometry message plus an odom → base_link2 transform, resettable through a service.
What it does
The Agile-X Bunker Pro is a tracked robot. It has no steering wheels, so it turns by driving its left and right tracks at different speeds (skid steering). This project estimates where the robot is, (x, y, θ), from the motor speeds alone, inside ROS 2.
How
From the two track speeds the odometer node computes the forward speed v (their average) and the turning rate ω (their difference divided by the track width). It then integrates them at every step:
- when the robot is turning (the absolute value of ω is above a small threshold), it uses the exact arc formula;
- when it is going almost straight, it switches to Runge-Kutta 2 (midpoint), which avoids dividing by a tiny ω.
The pose is published as an odometry message and a TF transform, and a reset service sets it back to zero.
Checking the result
A second node, tf_error, compares the estimated transform with the ground-truth transform recorded in the bag. It publishes the distance between the two, the elapsed time and the distance travelled. Both frames are shown side by side in a pre-configured RViz view.
Tools & techniques
- ROS 2
- C++
- Odometry
- Kinematics
- TF2
- RViz
- rosbag