Detect wheel slip by comparing commanded velocity vs actual encoder velocity. Publishes Bool flag on /saltybot/wheel_slip_detected when slip detected >0.5s. Features: - Subscribe to /cmd_vel (commanded) and /odom (actual velocity) - Compare velocity magnitudes with 0.1 m/s threshold - Persistence: slip must persist >0.5s to trigger (debounces transients) - Publish Bool on /saltybot/wheel_slip_detected with detection status - 10Hz monitoring frequency, configurable parameters Algorithm: - Compute linear speed from x,y components - Calculate velocity difference - If exceeds threshold: increment slip duration - If duration > timeout: declare slip detected Benefits: - Detects environmental slip (ice, mud, wet surfaces) - Triggers speed reduction to maintain traction - Prevents wheel spinning/rut digging - Safety response for loss of grip Topics: - Subscribed: /cmd_vel (Twist), /odom (Odometry) - Published: /saltybot/wheel_slip_detected (Bool) Config: frequency=10Hz, slip_threshold=0.1 m/s, slip_timeout=0.5s Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Description
SaltyLab self-balancing bot firmware (STM32F722)
Languages
Python
67.1%
C
11.4%
JavaScript
9.2%
OpenSCAD
7.8%
HTML
1.5%
Other
2.9%