how to use concatenatePointCloud
I am publishing /tf with a tf_broadcaster node. Also I am publishing <velodyne_msgs velodynescan=""> with velodyne_driver node.
Then the velodyne_pointcloud Transform nodelet is suscribed to both previous topics, applies the tf to the velodyneScan data and and publishes a PointCloud2 message.
I want to concatenate these PointCloud2 messages, trying to get a denser pointcloud in just one message.
I guess I have to use pcl::concatenatePointCloud but I am not sure how to use it.
Shall I create a node subscribing to PointCloud2 message and in the callback something like below?:
accumulatedPointCloud= pcl::concatenatePointCloud (oldPointCloud, newPointCloud )
publish(accumulatedPointCloud)