Convert KITTI raw data set to bag data packet
1. Download the KITTI dataset
Official website: The KITTI Vision Benchmark Suite
It is recommended to climb over the wall
2. Convert KITTI data to ROS bag file
The conversion is done with an open source tool kitti2bag, which can be installed via pip.
Ubuntu20.04 basically installs python3, so pip is not used, pip3 is used
1. Upgrade numpy
sudo pip3 install -U numpy
2. Install kitti2bag
sudo pip3 install kitti2bag
3. Convert files
The downloaded KITTI dataset file directory format is as follows:
In the upper directory of the "2011_10_03" folder (ie: under the 2011_10_03_calib file here), open the terminal and enter:
kitti2bag -t 2011_10_03 -r 0042 raw_synced
Note the filename of your own file
After execution, a file "kitti_2011_10_03_drive_0042_synced.bag" will be generated, which is the bag file generated using the KITTI dataset.