What Are ROS 2 Subordinate Nodes?
In short: ROS 2 subordinate nodes allow modular code by creating nested nodes within a parent node. This reduces overhead and simplifies communication within a single process.
In ROS 2, a subordinate node, or sub-node, is a secondary instance created by a parent node using `rclcpp::Node::create_sub_node()`. It shares the parent’s context, logging, parameters, and ROS graph identity, but operates under a separate sub-namespace. This allows internal systems within a single node to communicate without creating separate nodes.
Subordinate nodes are especially useful in modular C++ software. They let internal subsystems or helper libraries publish or subscribe to topics and services under scoped names, avoiding the overhead of creating multiple nodes. This reduces middleware discovery and simplifies execution management.
For example, a parent node might create a sub-node to handle a specific task, such as sensor processing. This sub-node can publish to a scoped topic like `/sensor/data` without needing to be a separate node. This keeps the system organized and efficient.
Based on: ROS 2 Documentation — Nodes · 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: Nodes · CC BY 4.0
To cite this card, link to https://intellectplus.co.uk/app/technology-what-are-ros-2-subordinate-nodes.
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