pointcloud_to_pcd.cpp subscribe question

asked 2015-10-30 17:16:25 -0500

Sameow gravatar image

Hi, All,

I am new to ROS and PCL. And I am trying to use pointcloud_to_pcd node to save to pcd file and it did work. But when I looked at the cpp file, I have a trouble to understand the code.

So here it subscribes to "input", and uses callback function to save the data to pcd. From callback function, I assume the data type of "input" topic is "pcl::PCLPointCloud2::ConstPtr&". However, when I use "rostopic info /input", the data type is "sensor_msgs/PointCloud2". How does it cover from "sensor_msgs/PointCloud2" to "pcl::PCLPointCloud2::ConstPtr&"? Or do I misunderstand callback function?

Thank you if you can explain this to me.

edit retag flag offensive close merge delete