feat: add fault storm script and debounce demo config#35
Merged
mfaferek93 merged 3 commits intomainfrom Feb 19, 2026
Merged
Conversation
- 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
…ce.yml Remove internal article references from compose override and run-demo-debounce.sh.
There was a problem hiding this comment.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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=truedocker-compose.debounce.yml- Compose override mounting debounce configrun-demo-debounce.sh- Convenience script for debounce modeTesting
Tested end-to-end with Docker demo: