Robotics StackExchange | Archived questions

pointcloud_to_pcd.cpp subscribe question

Hi, All,

I am new to ROS and PCL. And I am trying to use pointcloudtopcd 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 "sensormsgs/PointCloud2". How does it cover from "sensormsgs/PointCloud2" to "pcl::PCLPointCloud2::ConstPtr&"? Or do I misunderstand callback function?

Thank you if you can explain this to me.

Asked by Sameow on 2015-10-30 17:16:25 UTC

Comments

Answers