Tracked Robot Kinematics: From Linear and Angular Velocity to Track Speeds
The crawler is driven by two independently controlled tracks. ROS 2 navigation commands a forward velocity and a yaw rate through the geometry_msgs/Twist message on cmd_vel. The velocity target node converts these two quantities into separate velocity targets for the left and right tracks.
1. The geometry of a turn
During a steady ideal turn, all points on the robot rotate around the same instantaneous center of rotation (ICR). Let R be the radius from the ICR to the robot center, and b the effective distance between the two track centerlines. The left and right track radii are then:
For angular velocity ω in radians per second, tangential speed is the radius multiplied by angular velocity:
The robot center itself moves at v = ωR. Substituting this into the previous equations gives:
vright = v + ωb/2
These are the two equations implemented in the crawler’s velocity target node. They also work for straight driving and rotation in place, including negative speeds.
2. Three important movement cases
| Motion | Command | Track speeds |
|---|---|---|
| Straight ahead | ω = 0 | Both tracks move at v |
| Left turn | ω > 0 | Right track faster than left |
| Spin left in place | v = 0, ω > 0 | Left backward, right forward |
3. Example with the actual crawler parameters
The current Python node defines CRAWLER_TRACK_WIDTH = 0.245 metres. Suppose ROS 2 requests a forward speed of 0.10 m/s and a counterclockwise yaw rate of 0.40 rad/s.
vright = 0.10 + 0.049 = 0.149 m/s
The right track therefore travels almost three times as fast as the left track, producing a left turn. The ideal turning radius of the robot center is R = v/ω = 0.25 m.
4. Implementation in ROS 2
v_linear = float(msg.linear.x)
omega = float(msg.angular.z)
v_track_left = v_linear - omega * (CRAWLER_TRACK_WIDTH / 2.0)
v_track_right = v_linear + omega * (CRAWLER_TRACK_WIDTH / 2.0)
The node subscribes to cmd_vel and publishes motor targets to crawler/motor/left/target and crawler/motor/right/target. After computing the two ideal track speeds, it scales both together when either exceeds the configured 0.18 m/s limit. This preserves their ratio and therefore the requested curvature, while reducing the overall speed. It then applies a 0.005 m/s deadzone, converts speed into sprocket RPM and calibrated PWM duty targets, and clamps the resulting targets to the interval −1 to +1.
5. Why tracked vehicles are different
These equations are exact for the ideal differential-drive kinematic model, but a real tracked robot turns by skidding: parts of its tracks must slide sideways over the ground. The actual turning radius depends on track-ground friction, load distribution, terrain, and speed. Therefore, CRAWLER_TRACK_WIDTH is best interpreted as an effective track separation determined experimentally, rather than necessarily the physical center-to-center spacing.
Track slip also means that wheel or sprocket odometry alone can accumulate heading errors. An IMU and external localization sources can help estimate the actual motion, but do not eliminate all slip effects.