Repository Summary

Description Sample ROS2 publisher application that transforms and publishes the Kitti dataset into the ROS2 messages.
Checkout URI https://github.com/umtclskn/ros2_kitti_publishers.git
VCS Type git
VCS Version main
Last Updated 2021-02-02
Dev Status UNKNOWN
Released UNRELEASED
Tags No category tags.
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Packages

Name Version
ros2_kitti_publishers 0.0.0

README

ROS2 Kitti Dataset Publishers

Sample ROS2 publisher application that transforms and publishes the Kitti Dataset into the ROS2 messages. The published ROS2 messages are mainly PointCloud2, Image, Imu, and MarkerArray. Also, this codebase can provide information on how to broadcast messages, configure CmakeList.txt, and package configurations for your basic and ROS2 projects. You can use dummy the Kitti dataset to generate Perception, Planning, or Controller outputs in the Autonomous Robotics lifecycle. It was written for only learning purposes, not as a library logic.



My Environment

  • Ubuntu 20.04.1 LTS
  • ROS2 Foxy
  • pcl 1.10
  • OpenCV 4.2.0
  • Rviz2
  • rqt

Setup

  1. Download or clone this repo under your {ROS2_Workspace}/src folder. ( i.e: /home/user/ros2_example_ws/src/ )
  2. Download the Kitti dataset from http://www.cvlibs.net/datasets/kitti/raw_data.php. ( i.e: /home/user/ros2_example_ws/data/2011_09_26/2011_09_26_drive_0015_sync/ )
  3. Create a folder named “data” in your Ros2 workspace. ( i.e: /home/user/ros2_example_ws/data/ )
  4. Extract the Kitti dataset that you downloaded before and copy all of the files into your “data” folder.
  5. If you want to use another dataset from the Kitti’s 2011_09_26_drive_0015_sync, you have to change paths in the init_file_path function in the kitti_publishers_node.cpp class.
void KittiPublishersNode::init_file_path()
{
    path_point_cloud_ = "data/2011_09_26/2011_09_26_drive_0015_sync/velodyne_points/data/";
    path_image_gray_left_ = "data/2011_09_26/2011_09_26_drive_0015_sync/image_00/data/";
    path_image_gray_right_ = "data/2011_09_26/2011_09_26_drive_0015_sync/image_01/data/";
    path_image_color_left_ = "data/2011_09_26/2011_09_26_drive_0015_sync/image_02/data/";
    path_image_color_right_ = "data/2011_09_26/2011_09_26_drive_0015_sync/image_03/data/";
    path_oxts_ = "data/2011_09_26/2011_09_26_drive_0015_sync/oxts/data/";
}

Dataset Directory Structure:

.ros2_example_ws
├ build
├ data
├─────├ 2011_09_26
├─────────────────├ 2011_09_26_drive_0015_sync
├─────────────────────────────────────────────├ image_00
├─────────────────────────────────────────────├ image_01
├─────────────────────────────────────────────├ image_02
├─────────────────────────────────────────────├ image_03
├─────────────────────────────────────────────├ oxts
├─────────────────────────────────────────────├ velodyne_points
├─────────────────├ calib_cam_to_cam.txt
├─────────────────├ calib_imu_to_velo.txt
├─────────────────├ calib_velo_to_cam.txt
├ install
├ log
├ src

Dataset:

  1. image_00: left rectified grayscale image sequence
  2. image_01: right rectified grayscale image sequence
  3. image_02: left rectified color image sequence
  4. image_03: right rectified color image sequence
  5. oxts: odometry
  6. velodyne_points: Point Cloud 3D laser scan data

Project Directory Structure

.ros2_kitti_publishers
├ include
├───────├ ros2_kitti_publishers
├──────────────────────────────├ kitti_publishers_node.hpp
├──────────────────────────────├ visibility.h
├──────────────────────────────├ WGS84toCartesian.hpp
├ launch
├ src
├───────├ node
├─────────────├ kitti_publishers_node.cpp
├───────├ kitti_publishers_main.cpp
├ default.rviz
├ kitti_rqt.perspective
├ package.xml
├ CMakeLists.txt
├ Ros2_Rviz2.gif
├ run.md

File truncated at 100 lines see the full file