When to Use Subordinate Nodes in ROS 2
In short: Learn when to use subordinate nodes in ROS 2 to manage scoped namespaces efficiently. This helps keep your system organized and avoids unnecessary node overhead.
In ROS 2, subordinate nodes are used when you want to manage scoped topics or services within a single executable without creating extra nodes. This is especially useful when building modular C++ classes or helper libraries that need their own namespace. By using subordinate nodes, you avoid the overhead of launching additional nodes while still maintaining clear separation between components.
For example, if you're developing a robot control system with multiple internal modules, each module can run as a subordinate node. This way, each module can publish and subscribe to its own topics without interfering with others. This approach keeps the system modular and easier to maintain.
Subordinate nodes are different from composable nodes or standalone nodes. Composable nodes are designed to be loaded dynamically into containers, while standalone nodes run as separate processes. Subordinate nodes are a middle ground, offering scoped isolation without the complexity of separate processes.
Based on: ROS 2 Documentation — Using Subordinate Nodes (C++) — tutorial · Licence: CC BY 4.0 · View source →
Opens the Intellect+ feed with this card first. Swipe up for the next one.
Sources
- Source: ROS 2 Documentation: Using Subordinate Nodes (C++) — tutorial · CC BY 4.0
To cite this card, link to https://intellectplus.co.uk/app/technology-when-to-use-subordinate-nodes-in-ros-2.
How we source, check and correct cards: Editorial standards.
General information, not professional advice. Spotted an error? Flag the card or see corrections and complaints.
Intellect Plus is a visual educational discovery platform for exploring fascinating facts and ideas. Brain Food, Not Brain Rot. What is Intellect Plus?
Related
More in Robotics: practical · More in Technology · Latest · A–Z · All topics