Home

Awesome

<div align="center"> <h1>Patchwork</h1> <a href="https://github.com/LimHyungTae/patchwork"><img src="https://img.shields.io/badge/-C++-blue?logo=cplusplus" /></a> <a href="https://github.com/LimHyungTae/patchwork"><img src="https://img.shields.io/badge/ROS-Noetic-blue" /></a> <a href="https://github.com/LimHyungTae/patchwork"><img src="https://img.shields.io/badge/Linux-FCC624?logo=linux&logoColor=black" /></a> <a href="https://ieeexplore.ieee.org/document/9466396"><img src="https://img.shields.io/badge/DOI-10.1109/LRA.2021.3093009-004088.svg"/> <br /> <br /> <a href=https://youtu.be/rclqeDi4gow>Video</a> <span>&nbsp;&nbsp;•&nbsp;&nbsp;</span> <a href="https://github.com/LimHyungTae/patchwork?tab=readme-ov-file#requirements">Install by ROS</a> <span>&nbsp;&nbsp;•&nbsp;&nbsp;</span> <a href=https://arxiv.org/abs/2108.05560>Paper</a> <span>&nbsp;&nbsp;•&nbsp;&nbsp;</span> <a href=https://github.com/LimHyungTae/patchwork/wiki>Project Wiki (for beginners)</a> <br /> <br /> <div style="display: flex; justify-content: space-between; width: 100%;"> <img src="img/demo_kitti00_v2.gif" alt="animated" style="width: 90%;" /> <img src="img/demo_terrain_v3.gif" alt="animated" style="width: 90%;" /> </div> <br /> Official page of "Patchwork: Concentric Zone-based Region-wise Ground Segmentation <br /> with Ground Likelihood Estimation Using a 3D LiDAR Sensor", <br /> which is accepted by RA-L with IROS'21 option. </div>

IMPORTANT: (Aug. 18th, 2024) I employ TBB, so its FPS is increased from 50 Hz to 100 Hz! If you want to use the paper version of Patchwork for SOTA comparison purpose, Please use this ground seg. benchmark code.

PatchworkConcept of our method (CZM & GLE)

It's an overall updated version of R-GPF of ERASOR [Code] [Paper].


Characteristics

As shown in the demo videos, our method shows the most promising robust performance compared with other state-of-the-art methods, especially, our method focuses on the little perturbation of precision/recall as shown in this figure.

Please kindly note that the concept of traversable area and ground is quite different! Please refer to our paper.


:open_file_folder: Contents

  1. Test Env.
  2. Requirements
  3. How to Run Patchwork
  4. Citation

Test Env.

The code is tested successfully at

:package: Prerequisite Installation

ROS Setting

(if you use ubuntu 20.04)
sudo apt-get install ros-noetic-jsk-recognition
sudo apt-get install ros-noetic-jsk-common-msgs
sudo apt-get install ros-noetic-jsk-rviz-plugins
(if you use ubuntu 18.04)
sudo apt-get install ros-melodic-jsk-recognition
sudo apt-get install ros-melodic-jsk-common-msgs
sudo apt-get install ros-melodic-jsk-rviz-plugins
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src
git clone https://github.com/LimHyungTae/patchwork.git
cd .. && catkin build patchwork 

:gear: How to Run Patchwork

We provide four examples:

:chart_with_upwards_trend: Offline KITTI dataset

  1. Download SemanticKITTI Odometry dataset (We also need labels since we also open the evaluation code! :)

  2. Set the data_path in launch/offline_kitti.launch for your machine.

The data_path consists of velodyne folder and labels folder as follows:

data_path (e.g. 00, 01, ..., or 10)
_____velodyne
     |___000000.bin
     |___000001.bin
     |___000002.bin
     |...
_____labels
     |___000000.label
     |___000001.label
     |___000002.label
     |...
_____...
   
  1. Run launch file
roslaunch patchwork offline_kitti.launch

You can directly feel the speed of Patchwork! :wink:

:runner: Online (via your ROS bag file)

It is easy by re-using run_patchwork.launch.

  1. First, set your parameter file in /config folder and set sensor_height and sensor_model appropriately. Other important parameters are

If you are unsure about the sensor_height, simply launch Patchwork and set the sensor_height value in the terminal as shown below.

sensorheight

(For this reason, here we set the sensor_height as 0.6. A centimeter-level error is totally fine.)

  1. Remap the topic of subscriber, i.g. modify remap line as follows:
<remap from="/patchwork/cloud" to="$YOUR_LIDAR_TOPIC_NAME$"/>

Note that the type subscribed data is sensor_msgs::PointCloud2.

  1. Next, launch the roslaunch file as follows:
roslaunch patchwork run_patchwork.launch is_kitti:=false

Note that is_kitti=false is important! Because it decides which rviz is opened. The rviz shows only estimated ground and non-ground because your own dataset may have no point-wise labels.

  1. Then play your bag file!
rosbag play $YOUR_BAG_FILE_NAME$.bag
<details> <summary><strong>Exercise with the <a href="https://github.com/MIT-SPARK/Kimera-Multi-Data">Kimera-Multi dataset</a></strong></summary> For the Kimera-Multi dataset, you can use the following command:
  roslaunch patchwork run_patchwork_kimera_multi.launch 

Then, play the bag file as follows:

  rosbag play 10_14_acl_jackal2.bag
<div style="display: flex; justify-content: space-between; width: 100%;"> <img src="img/kimera-multi.gif" alt="animated" style="width: 90%;" /> </div>

Even though points are very sparse, Patchwork just works well!

</details>

:mag: Own dataset using pcd files

Please refer to /nodes/offilne_own_data.cpp.

(Note that in your own data format, there may not exist ground truth labels!)

Be sure to set right params. Otherwise, your results may be wrong as follows:

W/ wrong paramsAfter setting right params

For better understanding of the parameters of Patchwork, please read our wiki, 4. IMPORTANT: Setting Parameters of Patchwork in Your Own Env..

Offline (Using *.pcd or *.bin file)

  1. Utilize /nodes/offilne_own_data.cpp

  2. Please check the output by following command and corresponding files:

  3. Set appropriate absolute file directory, i.e. file_dir, in offline_ouster128.launch

roslaunch patchwork offline_ouster128.launch

Citation

If you use our code or method in your work, please consider citing the following:

@article{lim2021patchwork,
title={Patchwork: Concentric Zone-based Region-wise Ground Segmentation with Ground Likelihood Estimation Using a 3D LiDAR Sensor},
author={Lim, Hyungtae and Minho, Oh and Myung, Hyun},
journal={IEEE Robotics and Automation Letters},
year={2021}
}


Updates

NEWS (22.12.24)

NEWS (22.07.25)

NEWS (22.07.13)

NEWS (22.05.22)

NEWS (21.12.27)

roslaunch patchwork pub_for_legoloam.launch
rosbag play {YOUR_FILE_PATH}/KITTI_BAG/kitti_sequence_00.bag --clock /kitti/velo/pointcloud:=/velodyne_points