Critical safety system with <50ms latency emergency response. ROS2 action server /saltybot/estop with unified trigger sources: - Voice commands: 'stop', 'emergency', 'e-stop' - Gamepad emergency button - IMU tilt detection (>45 degrees) - LiDAR obstacle detection (<0.3m) - Geofence boundary violation - Watchdog timeout trigger - MQTT remote kill signal Cascade response (within 500ms): 1. Zero cmd_vel in <50ms (priority critical) 2. Disable autonomous mode 3. Face alert animation (emergency_stop) 4. LED red indicator 5. TTS alert announcement 6. Event logging + sensor snapshot Safety properties: - Cannot be overridden once triggered - Manual resume only (gamepad Start or voice 'resume') - Non-blockable execution (separate thread) - Redundant trigger sources for reliability Published topics: - /saltybot/estop_active (Bool) - System state - /saltybot/estop_event (String) - Event log (JSON) Subscribed triggers: - /camera/imu - Tilt detection - /scan - Obstacle detection <0.3m - /voice/command - Voice e-stop/resume - /gamepad/emergency, /gamepad/start - Gamepad controls - /saltybot/geofence_violation - Geofence boundary - /saltybot/watchdog_timeout - Watchdog signal - /saltybot/mqtt_kill - Remote kill signal Package structure: - estop_server: Main emergency stop node - estop_config.yaml: Timing, triggers, cascade config - estop.launch.py: Launch with safety parameters - Unit tests for trigger detection and cascade timing Logging: /home/seb/saltybot-data/estop/ (JSON format) Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
SaltyBot Emergency Stop Cascade System
Critical safety emergency stop system with <50ms latency response.
Features
Trigger Sources
- Voice: "stop", "emergency", "e-stop"
- Gamepad: Emergency button
- Tilt: >45 degrees (IMU-based)
- Obstacle: <0.3m (LiDAR)
- Geofence: Boundary violation
- Watchdog: Timeout trigger
- MQTT: Remote kill signal
Cascade Response (within 500ms)
- Zero cmd_vel (<50ms) - Priority critical
- Disable autonomous - Prevent override
- Face alert - Emergency animation
- LED red - Visual indicator
- TTS alert - Audio confirmation
- Log event - Sensor snapshot + timestamp
Safety Properties
- Cannot be overridden once triggered
- Manual resume only - Gamepad Start or voice
- Non-blockable - Uses separate thread
- Redundant triggers - Multiple independent sources
Launch
ros2 launch saltybot_emergency_stop estop.launch.py
Topics
Published:
/saltybot/estop_active(Bool) - System state/saltybot/estop_event(String) - Event JSON log
Subscribed:
/camera/imu(Imu) - Tilt detection/scan(LaserScan) - Obstacle detection/voice/command(String) - Voice triggers/gamepad/emergency(Bool) - Gamepad e-stop/gamepad/start(Bool) - Resume control/saltybot/geofence_violation(Bool)/saltybot/watchdog_timeout(Bool)/saltybot/mqtt_kill(Bool) - Remote kill
Response Times
- cmd_vel zeroed: <50ms
- Full cascade: <500ms
- Resume pending: Manual only
Logging
Location: /home/seb/saltybot-data/estop/
Format: estop_YYYYMMDD_HHMMSS.json
Includes:
- Trigger source
- State transitions
- Sensor snapshot (tilt angle, IMU, LiDAR)
- Timestamp
Resume Procedure
E-stop can only be resumed via:
- Gamepad: Press Start button
- Voice: Say "resume"
- Manual override not possible
System will:
- Clear alert state
- Set LED to green
- Publish TTS resume message
- Resume normal operation