Composable Nodes (Components) & Intra-process Communication
可组合节点 / 进程内通信AdvancedLoading several ROS 2 nodes into a single process, so they pass data as raw pointers instead of copying it.
This is a ROS 2 mechanism: a node is compiled into a shared library, and at runtime a container process loads several of them on demand — nodes built this way are called composable nodes. Publish-subscribe within the same process can then use intra-process communication, passing messages as smart pointers instead of paying for serialization and a memory copy; communication across processes still has to go through the middleware (DDS) and the network stack. This matters a great deal for high-bandwidth data — if several camera image streams and point clouds get copied at every hop, CPU load and latency both suffer. The practice is to register a node as a component when writing it, then use a launch file to load a camera driver, an image-processing node, and an inference node into the same container; Isaac ROS's vision pipelines are organized this way by default.
ExampleLoad a camera driver, an undistortion node, and an object-detection node into one component container, so images flow between them within the process with zero copying.
- Also called
- ROS 2 components, Component
- Related
- Node (ROS) · Robot Operating System 2 · Middleware · Data Distribution Service · Zero-Copy (Shared-Memory IPC) · ROS 2 Executor & Callback Groups
- Sources
- Intra-process Communications in ROS 2 (design.ros2.org)
About Composition - ROS 2 Documentation