'How to convert 'velodyne_msgs/VelodyneRawScan' to PointCloud or PointCloud2?

I am new to ROS. I have Rosbag files recorded from Velodyne Lidar mounted on the top of a car. However the lidar detection information is in 'velodyne_msgs/VelodyneRawScan'. I wanted to visualize it using ROS RVIZ, which requires 'sensor_msgs/PointCloud2. Is there I can convert it into PointCloud?

Thank you very much.



Solution 1:[1]

Have you tried this package: http://wiki.ros.org/velodyne_pointcloud?

Refer to the documentation, once the package is installed, you can execute the node converting the data as following:

$ rosrun velodyne_pointcloud cloud_node velodyne_packets:={your/velodyne/topic} velodyne_points:={your/expected/pcl/topic}

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 PouceHeure