FaultManager configuration for snapshots (freeze frame and rosbag)#26
Merged
FaultManager configuration for snapshots (freeze frame and rosbag)#26
Conversation
Enable automatic rosbag capture when faults are confirmed:
- Configure fault_manager with rosbag recording enabled
- Record 10 seconds before + 2 seconds after fault confirmation
- Use MCAP format for cross-platform compatibility
- Store recordings in persistent Docker volume
Configuration:
- medkit_params.yaml: Add fault_manager parameters with snapshot
and rosbag configuration
- docker-compose.yml: Add medkit_data volume for persistent storage
- launch/demo.launch.py: Pass medkit_params to fault_manager node
- Dockerfile: Create /var/lib/ros2_medkit/rosbags directory
Recorded topics include odometry, pose, scan, velocity commands,
transforms, navigation status/feedback, costmaps, and diagnostics.
Access rosbags via REST API:
GET /faults/{code}/bulk-data/rosbags
GET /faults/{code}/snapshots
Add fault_manager configuration to sensor_diagnostics demo with: - SQLite storage for fault persistence - Freeze-frame snapshot capture on fault confirmation - MCAP rosbag recording with ring buffer (10s pre + 2s post fault) - Sensor topics included: /sensors/scan, imu, fix, image_raw Infrastructure changes: - Pass medkit_params to fault_manager node in launch file - Create /var/lib/ros2_medkit/rosbags dir in Dockerfile - Add sqlite3 package to Dockerfile - Add persistent medkit_data volume to docker-compose - Add bulk-data/snapshot demo steps to check-demo.sh
There was a problem hiding this comment.
Pull request overview
This PR adds FaultManager configuration and Docker persistence to enable automatic snapshot + rosbag (MCAP) capture when faults are confirmed in the TurtleBot3 Integration and Sensor Diagnostics demos.
Changes:
- Pass
medkit_params.yamlintoros2_medkit_fault_managerlaunch nodes so FaultManager can be configured via YAML. - Add FaultManager storage + snapshot/rosbag settings to demo
medkit_params.yamlfiles (SQLite DB + MCAP rosbags). - Persist
/var/lib/ros2_medkitvia named Docker volumes and document the new rosbag/snapshot API usage.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| demos/turtlebot3_integration/launch/demo.launch.py | Loads medkit_params.yaml for FaultManager so it can use the new snapshot/rosbag configuration. |
| demos/turtlebot3_integration/docker-compose.yml | Adds a named volume to persist FaultManager DB and rosbags across runs. |
| demos/turtlebot3_integration/config/medkit_params.yaml | Adds FaultManager SQLite + snapshot/rosbag configuration (MCAP). |
| demos/turtlebot3_integration/README.md | Documents rosbag snapshot capture behavior and related API usage + volume persistence note. |
| demos/turtlebot3_integration/Dockerfile | Creates storage directory (but see PR comment about volume masking). |
| demos/sensor_diagnostics/launch/demo.launch.py | Loads medkit_params.yaml for FaultManager so it can use the new snapshot/rosbag configuration. |
| demos/sensor_diagnostics/docker-compose.yml | Adds a named volume to persist FaultManager DB and rosbags across runs. |
| demos/sensor_diagnostics/config/medkit_params.yaml | Adds FaultManager SQLite + snapshot/rosbag configuration (MCAP). |
| demos/sensor_diagnostics/check-demo.sh | Extends demo script to call snapshot/bulk-data endpoints when faults exist. |
| demos/sensor_diagnostics/Dockerfile | Installs sqlite3 and creates storage directory (but see PR comment about volume masking). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Move mkdir from Dockerfile build to runtime (volume mount masks build-time dirs) - Remove --recurse-submodules from git clone (broken submodule ref) - Fix check-demo.sh: null-safe fault parsing, use entity-scoped API paths - Fix turtlebot3 README: use correct entity-scoped bulk-data endpoints - Add mkdir to all docker-compose commands for both demos
The mv command was missing destination directory '.' and '&&' separators between individual moves, causing 'mv: invalid option -- r' error because 'rm -rf ros2_medkit' was interpreted as mv arguments.
Volume mapping could cause issues when user has old faults in the fresh demo environment. Removing it to avoid confusion and potential issues with rosbag storage. Users can still access rosbag files through the container if needed.
mfaferek93
approved these changes
Feb 8, 2026
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.
Description
Adds FaultManager configuration and Docker persistence to enable automatic snapshot + rosbag (MCAP) capture when faults are confirmed in the TurtleBot3 Integration and Sensor Diagnostics demos.
Changes:
Related Issue
closes #25
Checklist