I am new to ROS. I tried to read the documentation regarding nodelets on ROS wiki. But I couldn't understand it very well. I would like to know what is a nodelets in simple and intuitive terms
2 Answers
Regular nodes share data by passing messages over TCP.
Nodelets share data by sharing a pointer to a block of memory.
So, for a regular node, you've got to collect all the data, pack it into a ROS form, and then write the entire data packet, and then the receiver has to read the thing and unpack it.
Nodelets only work where there is memory to be shared (i.e., the same physical machine), so you can't use them for networked devices. But you could have something like a laser scanner, which produces a breathtaking amount of data, connected via nodelet to a process that extracts something of meaning from that data. The extraction process could then be connected via a regular node to some networked device and pass only the important results from the scan data analysis.
- 16,061
- 2
- 18
- 47
-
1That's really helpful. Also, could you please point me to some coding examples for nodelets? The Ros wiki examples aren't very clear. – heisenburg007 Sep 01 '19 at 02:57
TL;DR
nodelet is a package for fast communication (based on shared memory heap) instead of using ROS TCP communication.
This image demonstrates their differences:
- 242
- 2
- 12
