feat(controls): Wheel slip detector (Issue #262) #266

Merged
sl-jetson merged 2 commits from sl-controls/issue-262-wheel-slip into main 2026-03-02 17:30:53 -05:00
Collaborator

Summary

Detect wheel slip by comparing commanded velocity vs actual wheel encoder velocity.

Features:

  • Compare /cmd_vel (commanded) vs /odom (actual velocity)
  • 0.1 m/s threshold for slip detection
  • 0.5s persistence to debounce transients
  • Publishes Bool on /saltybot/wheel_slip_detected
  • 10Hz monitoring, fully configurable

Algorithm

  1. Compute linear speed magnitude from x,y components
  2. Calculate |commanded - actual| velocity difference
  3. If exceeds threshold:
    • Increment slip duration counter
    • If duration > timeout: declare slip (True)
  4. If below threshold:
    • Reset slip duration
    • Publish not detected (False)

Benefits

Detects environmental slip (ice, mud, wet surfaces)
Triggers speed reduction for loss of traction
Prevents wheel spinning/rut creation
Safety response for grip loss

Use Cases

  • Auto-detect slippery conditions
  • Trigger reduced speed mode
  • Safety fallback for wheeled robots
  • Environmental condition detection

Topics

  • Subscribed: /cmd_vel (Twist), /odom (Odometry)
  • Published: /saltybot/wheel_slip_detected (Bool)

Configuration

  • frequency: 10 Hz
  • slip_threshold: 0.1 m/s
  • slip_timeout: 0.5 s

Closes Issue #262.

## Summary Detect wheel slip by comparing commanded velocity vs actual wheel encoder velocity. **Features:** - Compare /cmd_vel (commanded) vs /odom (actual velocity) - 0.1 m/s threshold for slip detection - 0.5s persistence to debounce transients - Publishes Bool on /saltybot/wheel_slip_detected - 10Hz monitoring, fully configurable ## Algorithm 1. Compute linear speed magnitude from x,y components 2. Calculate |commanded - actual| velocity difference 3. If exceeds threshold: - Increment slip duration counter - If duration > timeout: declare slip (True) 4. If below threshold: - Reset slip duration - Publish not detected (False) ## Benefits ✅ Detects environmental slip (ice, mud, wet surfaces) ✅ Triggers speed reduction for loss of traction ✅ Prevents wheel spinning/rut creation ✅ Safety response for grip loss ## Use Cases - Auto-detect slippery conditions - Trigger reduced speed mode - Safety fallback for wheeled robots - Environmental condition detection ## Topics - **Subscribed:** /cmd_vel (Twist), /odom (Odometry) - **Published:** /saltybot/wheel_slip_detected (Bool) ## Configuration - frequency: 10 Hz - slip_threshold: 0.1 m/s - slip_timeout: 0.5 s Closes Issue #262.
sl-controls added 2 commits 2026-03-02 13:29:02 -05:00
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>
sl-webui force-pushed sl-controls/issue-262-wheel-slip from e76f0ab95f to 3530f16fa8 2026-03-02 14:14:03 -05:00 Compare
sl-webui force-pushed sl-controls/issue-262-wheel-slip from 3530f16fa8 to 9c517c468f 2026-03-02 17:28:31 -05:00 Compare
sl-webui force-pushed sl-controls/issue-262-wheel-slip from 9c517c468f to 5108fa8fa1 2026-03-02 17:29:14 -05:00 Compare
sl-jetson merged commit b6104763c5 into main 2026-03-02 17:30:53 -05:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: seb/saltylab-firmware#266
No description provided.