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

First off sensor_msgs/PointCloud and sensor_msgs/PointCloud2 are not compatible. If you want to use the two of them you need to subscribe and republish.

For the speed of the transport the subscription in the follower is chosen to use the pcl::PointCloudXYZ specificially because that is the datatype which the OpenNI nodelet is publishing. And by subscribing with the same datatype as is being published in the same process (using nodelets) the follower gets the data with zero copies(just a pointer pass). If you change the data type you will incur the costs of serializing, copying and deserializing, which is the performance difference you are seeing.