As I couldn't find any package on GitHub for directly converting raw KITTI data into ROS2 bag, I decided to create this repository.
The current version of this repository only supports the conversion of KITTI raw data into ROS2 bag. Contributions are welcome.
-
Download the raw data from KITTI website and unzip the downloaded file.
-
clone this repo under your {ros2_workspace}/src folder.
git clone https://github.com/Chris7462/kitti_to_ros2bag.git
-
Modify the kitti_to_ros2bag.yaml file under params folder.
- kitti_path: indicates the data path
- dirs: designates the directories to be written into the bag
- output_bag_name: specifies the output bag name
For example:
kitti_path: "/data/kitti/raw/2011_09_29_drive_0071_sync/" dirs: ["image_00", "image_01", "image_02", "image_03", "oxts", "velodyne_points"] output_bag_name: "2011_09_29_drive_0071_sync_bag"
-
Build the package
colcon build --symlink-install --packages-select kitti_to_ros2bag
-
Launch the package
source ./install/setup.bash ros2 launch kitti_to_ros2bag kitti_to_ros2bag_launch.py
That's it. You have the file kitti_2011_09_29_drive_0071_sync_bag that contains your data.