Very easy! The new function is as efficient as pcl::moveFromROS would be, if I could use it.
Unfortunately, we can not move the sensor_msg, because it is a ConstReference.

This obliges the original implementation to copy data from sensor_msgs::PointCloud2 to pcl::PointCloud2.

I skip that part, modifying the pcl::PointCloud2 to pclPintCloud<T> function, to make it able to accept the data from sensor_msgs.

Apart from that, I am not doing anything that PCL isn’t doing.

4 Likes