Giter Club home page Giter Club logo

tools_rosbag2kitti's Introduction

About

2D images and 3D points cloud are the two most commonly used data of intelligent vehicles, which are usually recorded in ROSBAG format via the ROS system in actual engineering practice. However, the visual and LiDAR data in the public dataset (e.g. KITTI) for research are saved as .png and .bin files respectively. To bridge the gap between engineering and research, this repository provides a tool to get .png and .bin from .bag.

How to use

(1) Decode ROSABG

The recorded ROSBAG are firstly decoded into .png for image and .pcd for points cloud.

  • Build the project in the ROS workspace

     cd catkin_ws
     catkin_make
  • [Optional] Setup the parameters in map_generation_node.cpp to achieve the rotation and translation of the coordinate system.

    All parameters for the rotation are angular and the clockwise is positive.

  • Decode ROSBAG to .png and .pcd, the results are saved in output.

     # 1st terminal for ROS core
     roscore
     # 2nd terminal for decoding node
     ./devel/lib/obstacle_detection/map_generate
     # 3rd terminal for ROSBAG playing, 0.1 means 0.1 times speed
     rosbag play xxx.bag -r 0.1

    The actual play speed of ROSBAG is determined by the IO performance. Please adjust the speed to ensure the timestamps are within +/- 50 ms.

(2) Convert .pcd to .bin

The points cloud is further converted from .pcd to .bin.

  • Build the project

     mkdir CMakeFile
     cd CMakeFile
     cmake ..
     make
  • Setup: Move the .pcd files to pcd, and set the path in pcd2bin.cpp.

  • Convertion

     cd CMakeFile
     ./pcd2bin

    The results are saved in bin.

(3) Create file list

Generate the list of the subset files for training or validation, e.g. train.txt and val.txt in KITTI.

  • Get the file list
     cd bin
     ls -1 | grep ".bin$" > list.txt
     python get_list.py

    The results are saved in bin named files_list.txt.

tools_rosbag2kitti's People

Contributors

leofansq avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.