https://github.com/ethz-asl/kitti_to_rosbag
Dataset tools for working with the KITTI dataset raw data ( http://www.cvlibs.net/datasets/kitti/raw_data.php ) and converting it to a ROS bag. Also allows a library for direct access to poses, velodyne scans, and images.
https://github.com/ethz-asl/kitti_to_rosbag
Last synced: 3 months ago
JSON representation
Dataset tools for working with the KITTI dataset raw data ( http://www.cvlibs.net/datasets/kitti/raw_data.php ) and converting it to a ROS bag. Also allows a library for direct access to poses, velodyne scans, and images.
- Host: GitHub
- URL: https://github.com/ethz-asl/kitti_to_rosbag
- Owner: ethz-asl
- Created: 2016-07-13T08:15:33.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2019-03-21T09:15:03.000Z (over 6 years ago)
- Last Synced: 2025-04-02T11:58:57.577Z (3 months ago)
- Language: C++
- Size: 43 KB
- Stars: 253
- Watchers: 20
- Forks: 101
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# kitti_to_rosbag
Dataset tools for working with the KITTI dataset raw data ( http://www.cvlibs.net/datasets/kitti/raw_data.php ) and converting it to a ROS bag. Also allows a library for direct access to poses, velodyne scans, and images.## Rosbag converter usage example
```
rosrun kitti_to_rosbag kitti_rosbag_converter calibration_path dataset_path output_path
```
(No trailing slashes).```
rosrun kitti_to_rosbag kitti_rosbag_converter ~/data/kitti/2011_09_26 ~/data/kitti/2011_09_26/2011_09_26_drive_0035_sync ~/data/kitti/2011_09_26/2011_09_26_drive_0035_sync/testbag.bag
```## Library API Example
```C++
#include#include "kitti_to_rosbag/kitti_parser.h"
int main(int argc, char** argv) {
google::InitGoogleLogging(argv[0]);
google::ParseCommandLineFlags(&argc, &argv, false);
const std::string calibration_path = "/Users/helen/data/kitti/2011_09_26";
const std::string dataset_path =
"/Users/helen/data/kitti/2011_09_26/2011_09_26_drive_0035_sync";kitti::KittiParser parser(calibration_path, dataset_path, true);
parser.loadCalibration();
parser.loadTimestampMaps();uint64_t timestamp;
kitti::Transformation pose;
parser.getPoseAtEntry(0, ×tamp, &pose);std::cout << "Timestamp: " << timestamp << " Pose: " << pose << std::endl;
pcl::PointCloud ptcloud;
parser.getPointcloudAtEntry(0, ×tamp, &ptcloud);std::cout << "Timestamp: " << timestamp << " Num points: " << ptcloud.size()
<< std::endl;cv::Mat image;
parser.getImageAtEntry(0, 3, ×tamp, &image);cv::imshow("Display window", image);
cv::waitKey(0);return 0;
}
```