• Stars
    star
    163
  • Rank 229,849 (Top 5 %)
  • Language CMake
  • License
    MIT License
  • Created almost 6 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Conversion from ROSBAG (.bag) to image (.png) and points cloud (.bin), including ROSBAG decoding, pcd2bin and file directory extraction.

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.

More Repositories

1

Tools_Merge_Image_PointCloud

Project the PointCloud to the image & Generate the LiDAR PointCloud with color.
Python
77
star
2

SCF-Net

SCF-Net: Learning Spatial Contextual Features for Large-Scale Point Cloud Segmentation (CVPR2021)
C++
69
star
3

AI01001H-PatternRecognition

UCAS 081100M01001H 模式识别: Python实现实例与实验
Python
31
star
4

Tools_KITTI2FishEye

Rebuild the Fisheye dataset from the normal dataset. (Based on KITTI dataset)
C++
26
star
5

SIFT

基于C++的基本库实现了SIFT特征提取与匹配, 无需调用如OpenCV的库函数. 从实现细节的角度介绍了SIFT算法流程. 代码很大程度地基于ezSIFT代码, 用于自学和理解SIFT算法.
C++
23
star
6

CBR

Calibration-free BEV Representation for Infrastructure Perception (IROS2023)
Python
19
star
7

Reinforcement_Learning_Curling

基于强化学习(RL)的冰壶游戏实例; 梯度下降的Sarsa(lambda) + 非均匀径向基特征表示
Python
16
star
8

ROS_Pure_Pursuit

Pure pursuit in pure ROS (Melodic)
C++
14
star
9

AI01002H-ImageProcessing

UCAS 081100M01002H 图像处理与分析: Python实现实例与实验
Python
12
star
10

Tools_make_planes

AVOD needs the planes file to provide ground plane information, but the official planes generation tool has not yet been provided, which brings great difficulty to the test work. This project is used to generate planes files especially for AVOD testing.
Python
12
star
11

FII-CenterNet

FII-CenterNet: an anchor-free detector with foreground attention for traffic object detection (IEEE-TVT)
Python
11
star
12

CPCL

Conservative-Progressive Collaborative Learning for Semi-supervised Semantic Segmentation (IEEE TIP)
Python
9
star
13

SpiderMesh

SpiderMesh: Spatial-aware Demand-guided Recursive Meshing for RGB-T Semantic Segmentation (Updating)
Python
7
star
14

Tracker_SiamFC_DaSiamRPN

Object tracking based on SiamFC & DaSiamRPN using GOT-10k toolkit. Demo & Visualization.
Python
6
star
15

ROS_NDT_Mapping

NDT Mapping in pure ROS (Melodic)
C++
6
star
16

Tools_Bag2PCD_ROS

Read the .bag files and save Lidar point clouds in .pcd files. Coordinate transformation is optional.
C++
6
star
17

Lane_Follower

Lane follower: Lane-detector (OpenCV) + Object-detector (YOLO5) + CAN-bus
Python
5
star
18

KITTI-Objects-Detection-Using-SSD-in-Tensorflow

This project was used to prepare a competition in the summer of 2018 ; The origin training structure is based on the SSD-Tensorflow by balancap.
Jupyter Notebook
5
star
19

ROS_Waypoints_Processor

Waypoints processor in pure ROS (Melodic)
Python
4
star
20

Repository_Intelligent_Vehicle

This is a repository for the basic version of intelligent vehicles, which is on the basis of the trajectory tracking. It is mainly used to organize my open-sourced projects, and contains several related projects, researches, and tools of mine.
3
star
21

leofansq

2
star
22

Tools_KITTI2VOC

The tools to convert dataset like KITTI into VOC format.
Python
1
star
23

ROS_NDT_Localizer

NDT Localizer in pure ROS (Melodic)
C++
1
star
24

ROS_OBU_DCU_Communication

This repository is for the communication between OBU & DCU, which is a simple V2X application.
Python
1
star
25

Lane_Detection

Lane detection based on traditional method.
Python
1
star
26

AU326-Automatic-Puzzle-Solver

SJTU AU326: Automatic-Puzzle-Solver; 基于图像处理实现的自动拼图
C
1
star