pcl::PointCloud vs. sensor_msgs::PointCloud
Obviously they are not the same. Which one should a developer be using?
ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
Obviously they are not the same. Which one should a developer be using?
pcl::PointCloud for "working".
sensor_msgs::PointCloud is a message for sending. You can create a pcl::PointCloud publisher that will automatically send out the right data.
So you wonna use sensor_msgs::PointCloud2 (not sensor_msgs::PointCloud as it is deprecated) if you are passing messages between nodes in ROS (e.g. between kinect driver node and your pointcloud processing node). Once your pointcloud node receives the sensor_msgs::PointCloud2 msg you use pcl::fromROSMsg function to convert it to pcl::PointCloud<pointt> (note that it has to be templated) and that can then be used as input to all pcl algorithms. D.
Asked: 2011-07-20 13:50:39 -0500
Seen: 2,887 times
Last updated: Jul 21 '11
PointCloud Input to costmap_2d
Depthcloud and Pointcloud2 not consistent in Rviz
Using custom fields in a ROS service
Issues in working with pointcloud and 2D feature detector [closed]
Error error in operand of ‘->’ which has non-pointer type ‘sensor_msgs::PointCloud’
PCL - coordinates from PointCloud2 message
Pointcloud to pcd file with Timestamp in name
robot_self_filter + rgb pointcloud
Mapping between pointcloud and image
Publish PointCloud msg with Arduino Uno / rosserial [closed]