1
$\begingroup$

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

$\endgroup$
3
$\begingroup$

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.

| improve this answer | |
$\endgroup$
  • $\begingroup$ That's really helpful. Also, could you please point me to some coding examples for nodelets? The Ros wiki examples aren't very clear. $\endgroup$ – heisenburg007 Sep 1 '19 at 2:57
0
$\begingroup$

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:

nodelet vs TCP ROS

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.