Understanding ROS nodelets
Nodelets are specific ROS nodes designed to run multiple algorithms within the same process in an efficient way, executing each process as threads. The threaded nodes can communicate with each other efficiently without overloading the network, with zero-copy transport between two nodes. These threaded nodes can communicate with external nodes too.
Each nodelet
can dynamically load like a plugin
that has a separate namespace. Each nodelet can act as a separate node, but on a single process.
Nodelets is used when the volume of data transferred between nodes is very high; for example, in transferring data from three-dimensional (3D) sensors or cameras. The disadvantage of using nodelets
is they can't be run in a separate process, so they don't parallelize well.
Next, we will look at how to create a nodelet
.
Implementing a sample nodelet
In this section, we are going to create a basic nodelet
that can subscribe to a string topic called...