-
Notifications
You must be signed in to change notification settings - Fork 2
feat(#94): add topic-based component discovery #95
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
base: main
Are you sure you want to change the base?
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 implements hybrid discovery that creates virtual components from topic namespaces when ROS 2 nodes are not available (e.g., Isaac Sim publishing topics without discoverable nodes). The implementation adds topic-based discovery alongside the existing node-based discovery, enabling the gateway to handle systems that publish topics without creating proper ROS 2 nodes.
Key changes:
- Adds a
sourcefield to the Component model to distinguish between "node" and "topic" based components - Implements topic namespace discovery by extracting first-level segments from topic paths
- Merges node-based and topic-based components during cache refresh with deduplication logic
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
src/ros2_medkit_gateway/include/ros2_medkit_gateway/models.hpp |
Adds source field to Component struct to distinguish discovery origin |
src/ros2_medkit_gateway/include/ros2_medkit_gateway/discovery_manager.hpp |
Declares discover_topic_components() and helper methods for topic-based discovery |
src/ros2_medkit_gateway/include/ros2_medkit_gateway/native_topic_sampler.hpp |
Declares topic namespace discovery methods and system topic filtering |
src/ros2_medkit_gateway/src/discovery_manager.cpp |
Implements topic-based component creation with deduplication logic |
src/ros2_medkit_gateway/src/native_topic_sampler.cpp |
Implements topic namespace extraction and filtering |
src/ros2_medkit_gateway/src/gateway_node.cpp |
Updates cache refresh to merge node-based and topic-based components |
.devcontainer/devcontainer.json |
Adds network=host to devcontainer run args (unrelated change) |
Add hybrid discovery that creates virtual components from topic namespaces when ROS 2 nodes are not available (e.g., Isaac Sim publishing topics without creating discoverable nodes). Changes: - Add field to Component struct (node or topic) - Add discover_topic_namespaces() to extract namespaces from topics - Add get_topics_for_namespace() to get topics under a namespace - Add is_system_topic() to filter /parameter_events, /rosout, /clock - Add discover_topic_components() to create virtual components - Update discover_areas() to include topic-based namespaces - Update refresh_cache() to merge node-based and topic-based components
df20ddd to
68ff51e
Compare
Enable host network mode in devcontainer to allow proper ROS 2 DDS discovery with external systems like NVIDIA Isaac Sim. This is required because: - ROS 2 uses multicast for node discovery (DDS) - Docker bridge network isolates multicast traffic - Isaac Sim runs on the host and publishes ROS 2 topics - Without host networking, topics from Isaac Sim are not visible
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
Copilot reviewed 12 out of 12 changed files in this pull request and generated no new comments.
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
Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.
Previously get_faults() only returned CONFIRMED faults by default, but new faults are created with PENDING status. This caused newly reported faults to be invisible until manually confirmed.
20055dd to
5343bbc
Compare
Pull Request
Summary
Add hybrid discovery that creates virtual components from topic namespaces
when ROS 2 nodes are not available (e.g., Isaac Sim publishing topics
without creating discoverable nodes).
Changes:
Issue
Link the related issue (required):
Type
Testing
How was this tested / how should reviewers verify it?
Checklist