feat(tank): SaltyTank tracked-vehicle ESC driver (Issue #122) #127
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "sl-controls/issue-122-tank-driver"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
tank_speedswith slip compensation (angular_cmd = angular_z / (1-slip_factor)),skid_steer_speeds,speed_to_pwm,compute_track_speeds(2wd|4wd|tracked + ±max clip),expand_to_4ch,odometry_from_track_speeds(angular × (1-slip_factor))P<ch1>,<ch2>,<ch3>,<ch4>\n;H\nheartbeat; dual stop paths: watchdog 0.3 s +/saltybot/e_stopBool topic (latching, cleared by new cmd_vel); runtimedrive_mode+slip_factorlive param switch; slip-compensated dead-reckoning;/saltybot/tank_pwmJSON +/saltybot/tank_odomSlip compensation model
Command path:
angular_cmd = angular_z / (1 - slip_factor)Odometry path:
angular_odom = (v_right - v_left) / B x (1 - slip_factor)The corrections are complementary — consistent dead-reckoning at any slip value. Tune live:
ros2 param set /tank_driver slip_factor 0.1Test plan
ros2 launch saltybot_tank_driver tank_driver.launch.pyros2 topic pub /saltybot/e_stop std_msgs/Bool '{data: true}' --onceros2 param set /tank_driver drive_mode 4wdCloses #122
🤖 Generated with Claude Code
- kinematics.py: tank_speeds with slip compensation (angular_cmd scaled by 1/(1-slip_factor)), skid_steer_speeds (no slip), speed_to_pwm, compute_track_speeds (2wd|4wd|tracked modes, ±max clip), expand_to_4ch, odometry_from_track_speeds (angular scaled by (1-slip_factor) — inverse of command path, consistent dead-reckoning across all slip values) - tank_driver_node.py: 50 Hz ROS2 node; serial P<ch1>,<ch2>,<ch3>,<ch4>\n; H\n heartbeat; dual stop paths (watchdog 0.3s + /saltybot/e_stop topic, latching); runtime drive_mode + slip_factor param switch; dead-reckoning odometry with slip compensation; publishes /saltybot/tank_pwm (JSON) + /saltybot/tank_odom - config/tank_params.yaml, launch/tank_driver.launch.py, package.xml, setup.py, setup.cfg - test/test_tank_kinematics.py: 71 unit tests, all passing (includes parametric round-trip over slip ∈ {0.0, 0.1, 0.3, 0.5}) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>