Skip to content

Fault injection scenarios for Turtlebot diagnostics demo #8

@bburda

Description

@bburda

Summary

Add fault injection scenarios to the TurtleBot3 demo that showcase how ros2_medkit enables diagnosing and managing robot problems through the REST API and Web UI.

Proposed solution

Goals

  1. Demonstrate fault detection - Show faults appearing in Web UI
  2. Demonstrate fault analysis - View fault snapshots with context
  3. Demonstrate recovery - Clear faults and observe system healing
  4. Realistic scenarios - Real robotic failure modes

Proposed Fault Scenarios

Scenario 1: Sensor Timeout (LiDAR)

Simulated LiDAR driver stops publishing → detected as sensor fault

User flow:

  1. Robot navigating normally
  2. Click "Inject LiDAR Fault" button (via service call)
  3. See LIDAR_TIMEOUT fault appear in Web UI Faults panel
  4. Robot stops moving (Nav2 detects no scan data)
  5. Click "Clear Fault" → Fault clears, LiDAR resumes

Scenario 2: Motor Overheat

Simulated motor temperature exceeds threshold:

Fault memory snapshot shows temperature at fault time:

{
  "motor_temp": 85.0,
  "ambient_temp": 25.0,
  "duty_cycle": 0.95,
  "runtime_hours": 2.3
}

Scenario 3: Localization Lost

AMCL reports high uncertainty → localization fault:

User flow:

  1. Robot navigating
  2. Teleport robot via Gazebo (breaks localization)
  3. See LOCALIZATION_LOST fault
  4. Re-localize via Initial Pose → fault auto-clears

Scenario 4: Navigation Stuck

Robot unable to find path → planner fault

Scenario 5: Robot Collision (Multi-Robot)

Two TurtleBots collide while navigating → fleet-level fault

User flow:

  1. Send robot1 and robot2 to crossing paths
  2. Both robots detect collision (bumper contact in Gazebo)
  3. See ROBOT_COLLISION faults on both robots in Web UI
  4. Faults are correlated by timestamp and position
  5. Fleet manager can coordinate recovery (backup both robots)
  6. Clear faults → robots resume with new paths

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions