2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

converting PCL point cloud type between pcl::PointCloud<PointT> (pcl pointcloud) and pcl::PointCloud2 (ROS pointcloud)

Last updated at Posted at 2012-12-26
//Convert pcl/pointcloud object(cloud1) to sensor_msgs/PointCloud2(cloud2) with toROSMsg()
const sensor_msgs::PointCloudConstPtr &cloud1;
sensor_msgs::PointCloud2 cloud2;
pcl::toROSMsg(*cloud1, cloud2); 

// Convert the sensor_msgs/PointCloud2(cloud2) object to pcl/pointcloud(cloud1) object with fromROSMsg()
sensor_msgs::PointCloud2ConstPtr& cloud2
pcl::PointCloud<pcl::PointXYZRGB> cloud1;
pcl::fromROSMsg (*cloud2, cloud1);
2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?