Code Monkey home page Code Monkey 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

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

tools_rosbag2kitti's Issues

Using my own data

Hello, I want to create data using 3 Lidars and use your program. There are bin files and png files that I made.

Super2
Super3

But, how can I create a txt file to go into the Calib folder?

Super4

There are other github packages that calibrate Lidar and Camera.
However, I cannot fully understand the details of 000000.txt,
and I cannot calibrate because I cannot create my own txt file that plays the exact same role as the txt file in the Calib folder.

1. If you know the contents of 000000.txt, can you tell me?
2. Can I create a txt file with my camera and Lidars?

Segmentation fault (core dumped)

when i run ":~/Tools_RosBag2KITTI/pcd2bin/CMakeFile# ./pcd2bin "it throws the mistake as follows:
"""
Segmentation fault (core dumped)
"""
the filename of .pcd files is "000000i.pcd"

Could you help me?
thank you very much!

Hello! catkin_make

I ran this code , but it didn't work.
and Could you please complement your code In readme.
I got so confused about your code.

No file created

Hi, when I run my bag file no output is created. The bag file only includes the point clouds and no camera footage.
Is it necessary, that the bag file also includes camera footage to convert the bag to a pcd?

Thank you in advance!

get no .png file

Hello

I used velodyne and zed camera and made rosbag file.

When I run './devel/lib/obstacle_detection/map_generate', I just only get .pcd files.

There were no Error message, so I don't know how to solve it.

The settings were as follows.

sub_lidar = nh.subscribe("/velodyne_points", 1000, &MapGenerationNode::lidarCallback, this);
ros::param::set("~image_transport", "compressed");
sub_camera = it.subscribe("/zedm/zed_node/rgb/image_rect_color", 1000, &MapGenerationNode::cameraCallback, this);

Thanks in advance.

cmake error

I have encountered with the error:
CMake Error at CMakeLists.txt:1:
Parse error. Expected a command name, got unquoted argument with text
"/opt/ros/melodic/share/catkin/cmake/toplevel.cmake".

-- Configuring incomplete, errors occurred!
maybe you can give me some advice?

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.