How to generate <sensor_msgs::PointCloud2> format bagfile
Hi, I have some pcap files that were collected in velodyne VLP16, how do I convert this pcap file to a bagfile in the sensor_msgs::pointcloud2 format ? I've tried it
rosrun velodyne_driver velodyne_node _model:=VLP16 _pcap:=/your/pcap/path/data.pcap _read_once:=true
rosrun rosbag record -O out.bag /velodyne_packets
.
But the bag file generated is of type velodyne_msgs/VelodyneScan, my program needs sensor_msgs::PointCloud2 type data. This is a piece of code from my project
subLaserCloud = nh.subscribe<sensor_msgs::PointCloud2>("TOPICS", 1, &ImageProjection::cloudHandler, this);
Hope to get a reply soon, and thanks in advance.