This program was running under Python 2.7, which is out of support today This program runs under ROS Melodic (Python 2.7); if you want to use Noetic or later ROS, you need to modify it to run under Python 3.
"semantickitti2bag" contains helpful python programs to convert SemanticKITTI dataset to rosbag file.
- Link to original KITTI Odometry dataset
- Link to SemanticKITTI dataset
You can convert these dataset easy way :D
This repository is based on tomas789's kitti2bag and PRBonn's semantic-kitti-api. These code are MIT Licence.
Data must be organized in following format.
SemanticKITTI dataset has voxel data, but this repository doesn't handle.
- image 0 and 1 is monocolor, and image 2 and 3 is colored.
- velodyne contains the pointcloud for each scan.Each .bin is list of float32 points in [x, y, z, intensity] format.
- .label file cantains a uint32 label for each point in the corresponding .bin scan. upper 16 bit contains instance id and lower 16 bit contains semantic label(ex.. car, bicycle, people). This program doesn't implement instance id.
- poses.txt contain pose in world coordinate as homogenerous matrix. But this file must be loaded with calib.txt otherwise you can't get correct pose.
- times.txt contains timestamps for each data(LiDAR, image, pose) scan
- sequencenumber.txt(ex.. 00.txt) contains ground truth poses.
git clone https://github.com/amslabtech/semantikitti2bag
cd PLACE/OF/semantickitti2bag
python __main__.py -p /home/****/your_dataset_directory/kitti/dataset/ -s 00
- -s 00 specify sequence number you must write number as 0 to 00, 1 to 01, 11 to 11.
- Camera data -> sensor_msgs/Image
- /odom_pose -> nav_msgs/Odometry (Ground Truth, Please read Note)
- /velodyne_points -> sensor_msgs/PointCloud2
- /vehicle -> nav_msgs/Pose (Ground Truth)
- Map -> World Coordinate
- ground_truth -> This tree is not Ground Truth. Ignore it.
- Vehicle -> Vehicle frame(actually ground truth)
- velodyne -> This coordinate is same as Vehicle coordinate, This is divided for programming convenience.
-
This program generates odometry data, but actually odometry data is GROUND TRUTH DATA and its velocity's coordinate is World(map) coordinate, bacause Semantic kitti dataset only contain GT poses. Velocity data is generated from transition from t-1 to t. If you have good idea to solve this problem, please post on issue without hesitation.
-
This program was made by python2.7 on ROS melodic. I didn't tested on ROS noetic or Python3 environment. So if you run this on these environment, please notify how was that on issue :)
- (2021-6-30) In addition, we added a "label" class to the Point cloud field to represent the semantic class from here as well. Thanks for your help in fixing the code.
This repository is under MIT License.