Crawler ROS 2 — Software Architecture
ROS 2 Jazzy · tracked differential drive · sensors, motor control, safety and TF2 · source architecture, October 2026
1. Command and motion pipeline
2. Node groups and responsibilities
Sensors
/imu/scanControl
/cmd_vel/odom and odom → base_footprintSafety & mapping
3. TF2 coordinate frames
Dynamic transforms: the odometry node broadcasts odom → base_footprint. A localization or SLAM component may provide map → odom. Static transforms: base_footprint → base_link (z = 0.036 m), base_link → base_scan (x = −0.002854 m, z = 0.115 m, yaw = π), plus four cliff sensor frames. The IMU message uses imu_link; this launch file does not publish a corresponding static transform, so that frame must be defined separately if required by consumers.
4. Main ROS 2 topics
| Topic | Producer | Purpose / consumer |
|---|---|---|
/cmd_vel | Teleop / Nav2 | Linear x and angular z command → velocity target |
/crawler/motor/{left,right}/target | Velocity target | Normalized signed PWM request → motor driver |
/crawler/motor/{left,right}/dir | Motor driver | Applied direction feedback → odometry |
/odometer/{left,right}/rpm and /revolutions | TMAG pair | Encoder speed and displacement → odometry |
/imu | ICM-20948 | Angular velocity and acceleration → odometry |
/odom, /tf | Odometry | Robot pose, velocity and coordinate transform |
/battery/current | INA226 | Overcurrent detection → current guard |
/battery/voltage, /battery/power, /battery/state | INA226 | Power telemetry |
/crawler/cliff_sensors | Motor driver / Pico | Four cliff sensor states → safety mapping nodes |
/scan | LDS-01 | LaserScan → navigation / mapping |
5. Safety and implementation notes
The Pico cliff sensor stream is read by the motor driver, not by a separate ROS sensor node. The motor driver uses unknown or stale cliff information as a safety condition. The independent current guard monitors /battery/current and controls the motor-enable line. These mechanisms must be verified with the tracks lifted before deployment.
Tracked-vehicle kinematics: v_left = v_x − ω × track_width / 2 and v_right = v_x + ω × track_width / 2. The velocity target node converts each track speed into sprocket RPM and a calibrated motor duty fraction, with separate forward/reverse coefficients per motor.
Source: crawler_bringup, crawler_control, crawler_safety, crawler_sensors. Diagrams simplify message transport and show logical dependencies; they are not an automatically recorded ROS graph.