Skip to content

Comments

feat: add fault storm script and debounce demo config#35

Merged
mfaferek93 merged 3 commits intomainfrom
feat/34-fault-storm-debounce
Feb 19, 2026
Merged

feat: add fault storm script and debounce demo config#35
mfaferek93 merged 3 commits intomainfrom
feat/34-fault-storm-debounce

Conversation

@mfaferek93
Copy link

@mfaferek93 mfaferek93 commented Feb 19, 2026

Closes #34

Summary

Add fault storm injector and debounce mode for the TurtleBot3 demo.

Files

  • scripts/fault_storm.py - Injects 9 noise faults (1x each) + MOTOR_OVERHEAT (5x sustained). With threshold=0: all 10 CONFIRMED. With threshold=-3: 9 PREFAILED + 1 CONFIRMED.
  • config/medkit_params_debounce.yaml - confirmation_threshold=-3, healing_enabled=true
  • docker-compose.debounce.yml - Compose override mounting debounce config
  • run-demo-debounce.sh - Convenience script for debounce mode

Testing

Tested end-to-end with Docker demo:

  • Storm mode (threshold=0): 10 CONFIRMED
  • Debounce mode (threshold=-3): 1 CONFIRMED (MOTOR_OVERHEAT) + 9 PREFAILED

- fault_storm.py: injects 9 noise faults + 1 real (MOTOR_OVERHEAT)
- medkit_params_debounce.yaml: confirmation_threshold=-3, healing enabled
- docker-compose.article3.yml: compose override for debounce config
- run-demo-debounce.sh: convenience script for debounce mode

Closes #34
@mfaferek93 mfaferek93 self-assigned this Feb 19, 2026
…ce.yml

Remove internal article references from compose override and
run-demo-debounce.sh.
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds artifacts for the TurtleBot3 + ros2_medkit “Article 3” demo, including a fault storm injector and an alternate “debounce” configuration path to make sustained faults stand out from one-off noise.

Changes:

  • Adds a ROS 2 Python script (fault_storm.py) that injects a mix of noise faults and a sustained “real” fault via /fault_manager/report_fault.
  • Adds a debounce-mode FaultManager config (medkit_params_debounce.yaml) and a Compose override to mount it into the demo container.
  • Adds a convenience runner script (run-demo-debounce.sh) to start the demo using the debounce Compose override.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
demos/turtlebot3_integration/scripts/fault_storm.py New injector script to generate an interleaved “fault storm” via ReportFault service calls.
demos/turtlebot3_integration/config/medkit_params_debounce.yaml New FaultManager/gateway params variant enabling debounce + healing thresholds for the Article 3 demo flow.
demos/turtlebot3_integration/docker-compose.debounce.yml New Compose override mounting the debounce params file over the default config in the container.
demos/turtlebot3_integration/run-demo-debounce.sh New runner script that starts the demo using the debounce Compose override.
Comments suppressed due to low confidence (2)

demos/turtlebot3_integration/scripts/fault_storm.py:118

  • future.result() is called twice and the code doesn’t distinguish between “service call rejected” vs “timed out / exception”. Consider storing the result once and handling the timeout/exception path explicitly so the script can log a clear reason for failure.
        future = self.client.call_async(req)
        rclpy.spin_until_future_complete(self, future, timeout_sec=2.0)
        return future.result() and future.result().accepted

demos/turtlebot3_integration/run-demo-debounce.sh:10

  • The header comment says “Same as run-demo.sh”, but this script doesn’t support several run-demo.sh options (e.g., --update, --no-cache, --help) and uses different compose argument handling. Either align behavior/flags with run-demo.sh or adjust the wording so users aren’t surprised.
# Same as run-demo.sh but uses debounce config:
#   confirmation_threshold: -3 (requires sustained failure)
#   healing_enabled: true (auto-heal on recovery)
#
# Compare with:
#   ./run-demo.sh              → STORM (no debounce, threshold 0)
#   ./run-demo-debounce.sh     → CALM  (debounce, threshold -3)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- Add Apache 2.0 license header to fault_storm.py
- Handle wait_for_service() timeout with error instead of silent continue
- Document nvidia container name variant in docstring
- Use correct container name based on profile in run-demo-debounce.sh
Copy link
Contributor

@bburda bburda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@mfaferek93 mfaferek93 merged commit 48b9eae into main Feb 19, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add fault storm script and debounce demo config

2 participants