How Do Subordinate Nodes Work in ROS 2?
In short: Learn how subordinate nodes in ROS 2 manage namespaces and topics. This helps organize communication in complex robot systems.
In ROS 2, subordinate nodes are created under a parent node and inherit its namespace. This allows for structured organization of topics and services. When a subordinate node is created, it has its own sub-namespace, which is added to the parent's base namespace to form the effective namespace. For example, if a parent node has the namespace '/my_ns' and a subordinate node is created with the sub-namespace 'sub_ns', the effective namespace becomes '/my_ns/sub_ns'.
This hierarchical structure helps in managing large systems by isolating different parts of the communication graph. Topics and services created under a subordinate node are resolved relative to its effective namespace. This means that a topic named 'chatter' created under the subordinate node would be addressed as '/my_ns/sub_ns/chatter'.
The use of relative and absolute names is crucial. Relative names are resolved based on the effective namespace, while absolute names bypass the hierarchy and are resolved directly. This flexibility allows developers to manage both localized and global communication within a system.
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-how-do-subordinate-nodes-work-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