Can I convert a sensor_msgs::Pointcloud to pcl::pointcloud

1.4k views Asked by At

Can I convert sensor_msgs::Pointcloud to pcl::pointcloud directly or I need to convert sensor_msgs::Pointcloud to sensor_msgs::Pointcloud2 before converting it to pcl::pointcloud?

1

There are 1 answers

1
Joachim D On

As far as I understood it PCL can only work with sensor_msgs::PointCloud2 directly. ros_pcl.

U can use a converter as the middle-man between your pcl node and your publisher node. How to convert sensor_msgs::pointcloud to sensor_msgs::pointcloud2

or

If possible use sensor_msgs/PointCloud2 Take a look at: laser-scan-multi-merger it can be used to convert only one laser-scan topic aswell and directly converts it to PointCloud2. The pass through filter can be done on the pcl::PointCloud side aswell no?