Ask Your Question

Revision history [back]

The launch file i use is as following:

<launch>
  <node pkg="nodelet" type="nodelet" name="standalone_nodelet" args="manager" output="screen"/>
  <node pkg="nodelet" type="nodelet" name="step_1" args="load depth_image_proc/register standalone_nodelet">
[..]

this launch file hosts the nodelet step_1 in a manager called standalone_nodelet.

So only within standalone_nodelet will zero-copy data exchange be used.

Any other communication with other participants in your ROS nodegraph (ie: other running nodes) will not benefit from direct zero-copy exchanges.

Beside the nodelets i am also running the realsense2_camera demo_pointcloud.launch file to get information from the camera.

It's likely that realsense2_camera starts a nodelet_manager of its own, into which it loads a nr of nodelets.

The "nodelet run via a terminal" you mention is then likely loaded into the manager started by the driver. In that case you do benefit, as now zero-copy data exchange between your depth_image_proc/register and the realsense driver can take place.

The launch file i use is as following:

<launch>
  <node pkg="nodelet" type="nodelet" name="standalone_nodelet" args="manager" output="screen"/>
  <node pkg="nodelet" type="nodelet" name="step_1" args="load depth_image_proc/register standalone_nodelet">
[..]

this launch file hosts the nodelet step_1 in a manager called standalone_nodelet.

So only within standalone_nodelet will zero-copy data exchange be used.

Any other communication with other participants in your ROS nodegraph (ie: other running nodes) will not benefit from direct zero-copy exchanges.

Beside the nodelets i am also running the realsense2_camera demo_pointcloud.launch file to get information from the camera.

It's likely that realsense2_camera starts a nodelet_manager of its own, into which it loads a nr of nodelets.

The "nodelet run via a terminal" you mention is then likely loaded into the manager started by the driver. In that case you do benefit, as now zero-copy data exchange between your depth_image_proc/register and the realsense driver can take place.


Edit: it would be good if you can show how you load the nodelet "via the terminal". As that should show the difference (specifically: which nodelet manager the nodelet is loaded into).