sl-controls created pull request seb/saltylab-firmware#117

sl-controls
Mon, 02 Mar 2026 08:45:38 -0500

117#feat(rover): SaltyRover 4-wheel ESC motor driver (Issue #110)#

Summary

kinematics.py — pure, ROS2-free module: unicycle→differential/skid-steer, speed_to_pwm (1000–2000 µs), compute_wheel_speeds with ±max clip, odometry_from_wheel_speeds inverse helper

rover_driver_node.py — 50 Hz ROS2 node; serial P<ch1>,<ch2>,<ch3>,<ch4>\n protocol + H\n heartbeat; deadman on /cmd_vel silence; runtime 2WD/4WD variant switch via four_wheel param (live via ros2 param set); dead-reckoning odometry; publishes /saltybot/rover_pwm (JSON) + /saltybot/rover_odom

config/rover_params.yaml, launch/rover_driver.launch.py, package.xml, setup.py/cfg

test/test_rover_kinematics.py — 51 unit tests, all passing

Test plan

51 unit tests pass (pytest test/test_rover_kinematics.py)

Deploy to Jetson: ros2 launch saltybot_rover_driver rover_driver.launch.py

Verify PWM frame on ESC serial port: P1500,1500,1500,1500\n at rest

Test 4WD→2WD live switch: ros2 param set /rover_driver four_wheel false

Confirm /saltybot/rover_odom updates during motion

Closes #110

🤖 Generated with Claude Code