Skip to content

Conversation

@mfaferek93
Copy link
Collaborator

@mfaferek93 mfaferek93 commented Dec 27, 2025

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:

  • 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

Issue

Link the related issue (required):


Type

  • Bug fix
  • New feature or tests
  • Breaking change
  • Documentation only

Testing

How was this tested / how should reviewers verify it?


Checklist

  • Breaking changes are clearly described (and announced in docs / changelog if needed)
  • Tests were added or updated if needed
  • Docs were updated if behavior or public API changed

@mfaferek93 mfaferek93 self-assigned this Dec 27, 2025
Copilot AI review requested due to automatic review settings December 27, 2025 18:03
Copy link
Contributor

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

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 source field 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
@mfaferek93 mfaferek93 force-pushed the 94/topicBasedComponentDiscovery branch from df20ddd to 68ff51e Compare December 27, 2025 20:00
   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
Copy link
Contributor

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

Copilot reviewed 12 out of 12 changed files in this pull request and generated no new comments.

Copy link
Contributor

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

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.
@mfaferek93 mfaferek93 force-pushed the 94/topicBasedComponentDiscovery branch from 20055dd to 5343bbc Compare December 31, 2025 20:28
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 topic-based component discovery to support systems like Isaac Sim that publish ROS 2 topics without creating standard ROS 2 nodes.

2 participants