how to convert a .csv file to .bag in python?

1k Views Asked by At

I have some VLP16 LiDar data in .csv file format, have to load the data in Ros Rviz for which I need the Rosbag file(.bag). I have tried finding it in the Ros tutorial, what I got was to convert .bag to .csv

2

There are 2 best solutions below

0
On

I'm not actually expert in processing .bag files but I think you need to go through your CSV file and manually add the values using rosbag Python API

0
On

Not direct answer but check this script in python, which might help you.

Regarding C++ I propose this repository: convert_csv_to_rosbag which is even closer to what you asked.

However, it seems that you need to do it by yourself based on these examples.