ROS nodes communicate using TCP/IP protocol which might be too slow for applications that require sending large amounts of data (like 3D point clouds or video streams). For processes running on the same computer, a pointer to the data can be sent rather than sending the data itself over TCP/IO. The Intel RealSense Robotics Development Kit uses nodelets so it’s worthwhile to learn how they work.
Nodelet tutorials
Here’s how to get started with nodelets:
- Start out with the ROS pluginlib tutorial
- Complete the official nodelet tutorial
Plugins
Plugins make it possible to extend or modify an application’s behaviour without having to modify the source code by loading classes dynamically from the runtime library. ROS provides a pluginlib framework for dynamically loading or unloading plugins (typically a class or library).
Nodelets
Each ROS node can be viewed as some algorithm running on a separate process. Communication between the nodes (and processes) happens via TCP/IP. With nodelets things are a little different. A nodelet manager consists of multiple threads, where each thread has a nodelet running some algorithm. These threads reside within a single process, thus only a pointer (Boost shared pointer) is needed for communication. This can help with reducing the overhead of moving data around.
There are however some disadvantages. If one nodelet goes down, the whole manager goes down with it.