bag_to_pcd saves to same file
Using rosbag, I have recorded the data from a Livox mid-40 lidar. I have played it back and confirmed that the data is there. Now I'd like to convert it to pcd files. I run the command:
rosrun pcl_ros bag_to_pcd data.bag /livox/lidar ./pointclouds
The command runs and I get the output:
Got 5000 data points in frame livox_frame with the following fields: x y z intensity Data saved to ./pointclouds/0.000000000.pcd
Got 5000 data points in frame livox_frame with the following fields: x y z intensity Data saved to ./pointclouds/0.000000000.pcd
...
So it seems that it keeps overwriting the same file when converting instead of making a new file for every message. Thus I only have the last message converted as a pcd file. Has anyone else run into a similar problem?
I'm using melodic at Ubuntu 18.04.
Thanks.