ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The basic idea of nodelets is to avoid the overhead of inter process communication (with serializing/deserializing data) that occurs, when you have nodes (which are separate processes) communcating with each other via messages. This overhead can be a big problem when dealing with images and sending them between multiple nodes for example. Nodelets are classes deriving from the nodelet::Nodelet class and therefore fulfilling the interface the nodelet manager needs to load them. One nodelet manager loads multiple nodelets into the same process, therefore avoiding the overhead, because now one can simply pass around pointers to the raw data instead of messages.

To answer your questions:

  1. The first entry in the launchfile launches a nodelet manager as indicated by the single argument "manager", the node/process that is able to load in nodelets. The subsequent <node> entries load different nodelets into this nodelet manager. You do that by calling the nodelet package again and the passing the nodelet you want to load in as an argument followed by the nodelet manager's name (here it is standalone_nodelet). The very last <node> creates a standalone node, basically loading in the nodelet as the only nodelet in this nodelet manager, therefore making the nodelet a normal node (see here line 311 for what happens exactly)
  2. I dont know, seems like a mistake to me, but maybe I am wrong.
  3. I think this is a mistake, there should be a comannd="load" there
  4. You should be able to see the nodelets running via rosnode list. If you listen to the topics remapped_output, Plus2/out and Plus3/out (before you start the nodelets) you should be able to see the result of the performed additions. See here for the implementation of this particular nodelet.

The image_proc package uses nodelets quite heavily, maybe it's useful for 'inspiration' (e. g. this launchfile).

The basic idea of nodelets is to avoid the overhead of inter process communication (with serializing/deserializing data) data, ROS is using TCP to transfer the data between the nodes as they may be on different computers on the same network) that occurs, when you have nodes (which are separate processes) communcating with each other via messages. This overhead can be a big problem when dealing with images and sending them between multiple nodes for example. Nodelets are classes deriving from the nodelet::Nodelet class and therefore fulfilling the interface the nodelet manager needs to load them. One nodelet manager loads multiple nodelets into the same process, therefore avoiding the overhead, because now one can simply pass around pointers to the raw data instead of messages.

To answer your questions:

  1. The first entry in the launchfile launches a nodelet manager as indicated by the single argument "manager", the node/process that is able to load in nodelets. The subsequent <node> entries load different nodelets into this nodelet manager. You do that by calling the nodelet package again and the passing the nodelet you want to load in as an argument followed by the nodelet manager's name (here it is standalone_nodelet). The very last <node> creates a standalone node, basically loading in the nodelet as the only nodelet in this nodelet manager, therefore making the nodelet a normal node (see here line 311 for what happens exactly)
  2. I dont know, seems like a mistake to me, but maybe I am wrong.
  3. I think this is a mistake, there should be a comannd="load" there
  4. You should be able to see the nodelets running via rosnode list. If you listen to the topics remapped_output, Plus2/out and Plus3/out (before you start the nodelets) you should be able to see the result of the performed additions. See here for the implementation of this particular nodelet.

The image_proc package uses nodelets quite heavily, maybe it's useful for 'inspiration' (e. g. this launchfile).

The basic idea of nodelets is to avoid the overhead of inter process communication (with serializing/deserializing data, ROS is using TCP to transfer the data between the nodes as they may be on different computers on the same network) that occurs, when you have nodes (which are separate processes) communcating with each other via messages. This overhead can be a big problem when dealing with images and sending them between multiple nodes for example. Nodelets are classes deriving from the nodelet::Nodelet class exported from the package and therefore fulfilling implement the interface the nodelet manager needs to load them. One nodelet manager loads multiple nodelets into the same process, therefore avoiding the overhead, because now one can simply pass around pointers to the raw data instead of messages.

To answer your questions:

  1. The first entry in the launchfile launches a nodelet manager as indicated by the single argument "manager", the node/process that is able to load in nodelets. The subsequent <node> entries load different nodelets into this nodelet manager. You do that by calling the nodelet package again and the passing the nodelet you want to load in as an argument followed by the nodelet manager's name (here it is standalone_nodelet). The very last <node> creates a standalone node, basically loading in the nodelet as the only nodelet in this nodelet manager, therefore making the nodelet a normal node (see here line 311 for what happens exactly)
  2. I dont know, seems like a mistake to me, but maybe I am wrong.
  3. I think this is a mistake, there should be a comannd="load" there
  4. You should be able to see the nodelets running via rosnode list. If you listen to the topics remapped_output, Plus2/out and Plus3/out (before you start the nodelets) you should be able to see the result of the performed additions. See here for the implementation of this particular nodelet.

The image_proc package uses nodelets quite heavily, maybe it's useful for 'inspiration' (e. g. this launchfile).