I've been referencing the ROS PCL tutorials (http://wiki.ros.org/pcl/Tutorials) to get up to speed on using the library in ROS, but I'm running into a little bit of trouble with the conversion to Hydro. According to the note under "sensor_msgs/PointCloud2", the sensor_msgs::PointCloud2 type previously used to send point clouds as ROS messages has been deprecated in favor of pcl::PCLPointCloud2. That section of the tutorial tells you exactly how to adapt your code in the example for the new type - awesome!
However, inside my node, I'm doing some correspondence grouping work, and the code that I've already gotten working outside of ROS uses a pcl::PointCloudpcl::PointXYZ, so I went down to the "pcl/PointCloud" section and looked for the same migration instructions - no dice. I looked at the migration instructions (http://wiki.ros.org/hydro/Migration) and the API, tried both of these options, where I've substituted the variable names for their types:
[pcl::PointCloud< pcl::PointXYZ >] = [const pcl::PCLPointCloud2ConstPtr&];
pcl::fromROSMsg( *[const pcl::PCLPointCloud2ConstPtr&], [pcl::PointCloud< pcl::PointXYZ >] );
[pcl::PointCloud< pcl::PointXYZ >] = [const pcl::PCLPointCloud2ConstPtr&].makeShared();
Both throw an error, and I've also tried calling fromROSMsg with namespace pcl_conversions
. I'm assuming that I am missing something in some piece of documentation, but I can't seem to figure it out. Any help would be appreciated.
Originally posted by teddybouch on ROS Answers with karma: 320 on 2013-11-05
Post score: 0