-
Notifications
You must be signed in to change notification settings - Fork 1
[#22] fix(sensor-demo): correct app IDs and improve script consistency #23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes incorrect app IDs in the sensor diagnostics demo scripts and improves script organization. The root cause was a mismatch between ROS 2 node naming conventions (using underscores) and Gateway API entity IDs (using dashes), causing API calls to fail with "entity not found" errors.
Changes:
- Corrected all app IDs from underscore format (e.g.,
lidar_sim) to dash format (e.g.,lidar-sim) in API calls - Split run-demo.sh functionality into three focused scripts: run-demo.sh (starts services), check-demo.sh (API demonstration), and stop-demo.sh (stops services)
- Updated all documentation to reflect correct API usage patterns
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| demos/sensor_diagnostics/stop-demo.sh | New script to stop Docker services with options for removing volumes and images |
| demos/sensor_diagnostics/run-demo.sh | Refactored to focus solely on starting Docker services, with improved argument parsing and user feedback |
| demos/sensor_diagnostics/check-demo.sh | New interactive API demonstration script that was extracted from old run-demo.sh, with proper error checking |
| demos/sensor_diagnostics/restore-normal.sh | Updated all API calls to use correct dash-based app IDs |
| demos/sensor_diagnostics/inject-noise.sh | Updated API calls and comments to use correct app IDs |
| demos/sensor_diagnostics/inject-nan.sh | Updated API calls and comments to use correct app IDs |
| demos/sensor_diagnostics/inject-failure.sh | Updated API calls and comments to use correct app IDs |
| demos/sensor_diagnostics/inject-drift.sh | Updated API calls and comments to use correct app IDs |
| demos/sensor_diagnostics/README.md | Updated Quick Start section, script descriptions, and all API examples to use correct app IDs |
| README.md | Updated Quick Start guide with new script names and usage patterns |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Fix incorrect app IDs: use dashes instead of underscores - lidar_sim -> lidar-sim - imu_sim -> imu-sim - gps_sim -> gps-sim - camera_sim -> camera-sim - anomaly_detector -> anomaly-detector - diagnostic_bridge -> diagnostic-bridge - Split run-demo.sh into separate concerns - run-demo.sh: only starts Docker services - check-demo.sh: new interactive API demonstration script - stop-demo.sh: new script to stop services - Update all scripts to use correct Gateway API entity IDs - check-demo.sh: fixed all API endpoint calls - inject-*.sh: updated fault injection scripts - restore-normal.sh: fixed configuration and fault clearing - Update documentation - README.md: updated Quick Start and API examples - demos/sensor_diagnostics/README.md: corrected all API examples Fixes API calls that were failing with 'entity not found' errors. Makes demo scripts consistent with turtlebot3_integration behavior.
64892ee to
becfc27
Compare
Apply review suggestions from @mfaferek93: - Change anomaly_detector → anomaly-detector in inject-nan.sh, inject-failure.sh - Change diagnostic_bridge → diagnostic-bridge in inject-drift.sh, inject-noise.sh Maintains consistency with dash-based entity IDs used in API calls.
Description
Fix incorrect app IDs: use dashes instead of underscores
Split run-demo.sh into separate concerns
Update all scripts to use correct Gateway API entity IDs
Update documentation
Fixes API calls that were failing with 'entity not found' errors. Makes demo scripts consistent with turtlebot3_integration behavior.
Related Issue
closes #22
Checklist