kitti2rosbag2
is designed to convert the KITTI Odometry dataset to ROS2 bag format, emphasizing manual control over message publishing and bag recording.
cd ~/ros2_ws/src
git clone https://github.com/bharadwajsirigadi/kitti2rosbag2.git
Open params file
Update following tags.
kitti_pub:
ros__parameters:
sequence: <sequence_no> #Integer
data_dir: '<dataset_dir>'
odom_dir: '<data_odometry_poses_dir>'
bag_dir : '<bag_dir>/<bag_name>'
odom : [True/False]
Example: Converts kitty dataset to rosbag2.
Download data_odometry_poses from here
kitti_rec:
ros__parameters:
sequence: 0
data_dir: '/home/user_name/Download/data_odometry_gray/dataset/'
odom_dir: '/home/user_name/Download/data_odometry_poses/dataset/'
bag_dir : '/home/user_name/Download/00_bag'
odom : True
cd ~/ros2_ws
colcon build --packages-select kitti2rosbag2 --symlink-install
ros2 launch kitti2rosbag2 kitti2rosbag2.launch
KITTI Odometry Dataset Folder Structure
car/base/odom
--> Odometry of Car.car/base/odom_path
--> Ground Truth path of Car.camera2/left/image_raw
--> Color Images from Left Camera.camera3/right/image_raw
--> Color Images from Right Camera.camera2/left/camera_info
--> Left Camera Information.camera3/right/camera_info
--> Right Camera Information.
- Python 3.x
- ROS2 installed(tested on ROS2 humble)
Ground Truth-Odometry data is available for sequences(1-10) in KITTI dataset.