Skip to content

Commit 7bea871

Browse files
committed
🎉 initial commit
0 parents  commit 7bea871

18 files changed

+3017
-0
lines changed

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.vscode/
2+
3+
./launch/video.launch
4+
./src/video.cpp

CMakeLists.txt

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
cmake_minimum_required(VERSION 3.0.2)
2+
project(patchworkpp)
3+
4+
add_compile_options(-std=c++17)
5+
set(CMAKE_BUILD_TYPE "Release")
6+
7+
set(CMAKE_CXX_STANDARD 14)
8+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
9+
set(CMAKE_CXX_EXTENSIONS OFF)
10+
11+
find_package(catkin REQUIRED COMPONENTS
12+
roscpp
13+
rospy
14+
std_msgs
15+
roslaunch
16+
cv_bridge
17+
pcl_conversions
18+
pcl_ros
19+
geometry_msgs
20+
laser_geometry
21+
sensor_msgs
22+
message_generation
23+
)
24+
25+
find_package(OpenCV REQUIRED)
26+
27+
generate_messages(
28+
DEPENDENCIES
29+
std_msgs
30+
geometry_msgs
31+
sensor_msgs
32+
)
33+
34+
find_package(PCL 1.7 REQUIRED)
35+
find_package(Boost 1.54 REQUIRED)
36+
find_package(OpenMP)
37+
if (OPENMP_FOUND)
38+
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
39+
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
40+
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
41+
endif()
42+
43+
catkin_package(
44+
INCLUDE_DIRS
45+
LIBRARIES
46+
CATKIN_DEPENDS roscpp rospy std_msgs
47+
)
48+
49+
include_directories(
50+
${catkin_INCLUDE_DIRS}
51+
${PCL_INCLUDE_DIRS}
52+
${OpenCV_INCLUDE_DIRS}
53+
include
54+
)
55+
56+
add_executable(offline_kitti src/offline_kitti.cpp)
57+
target_link_libraries(offline_kitti ${catkin_LIBRARIES} ${PCL_LIBRARIES} ${OpenCV_LIBRARIES})
58+
add_dependencies(offline_kitti patchworkpp_generate_messages_cpp)
59+
60+
add_executable(demo src/demo.cpp)
61+
target_link_libraries(demo ${catkin_LIBRARIES} ${PCL_LIBRARIES} ${OpenCV_LIBRARIES})
62+
add_dependencies(demo patchworkpp_generate_messages_cpp)
63+
64+
add_executable(video src/video.cpp)
65+
target_link_libraries(video ${catkin_LIBRARIES} ${PCL_LIBRARIES} ${OpenCV_LIBRARIES})
66+
add_dependencies(video patchworkpp_generate_messages_cpp)

README.md

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# patchwork-plusplus-ros
2+
3+
This is ROS package of Patchwork++, which is a fast and robust ground segmentation method.
4+
5+
<p align="center"><img src=pictures/patchwork++.gif alt="animated" /></p>
6+
7+
> If you are not familiar with ROS, please visit the [original repository][patchwork++link].
8+
9+
> If you follow the [repository][patchwork++link], you can run Patchwork++ in Python and C++ easily.
10+
11+
[patchwork++link]: https://github.com/url-kaist/patchwork-plusplus
12+
13+
## :open_file_folder: What's in this repositpory
14+
15+
* ROS based Patchwork source code ([patchworkpp.hpp][codelink])
16+
* Demo launch file ([demo.launch][launchlink]) with sample rosbag file. You can execute Patchwork++ simply!
17+
18+
[codelink]: https://github.com/seungjae24/patchwork-plusplus-ros/blob/master/include/patchworkpp/patchworkpp.hpp
19+
[launchlink]: https://github.com/seungjae24/patchwork-plusplus-ros/blob/master/launch/demo.launch
20+
21+
## :package: Prerequisite packages
22+
You may need to install ROS, PCL, Eigen, ...
23+
24+
## :gear: How to build Patchwork++
25+
To build Patchwork++, you can follow below codes.
26+
27+
```bash
28+
$ mkdir -p ~/catkin_ws/src
29+
$ cd ~/catkin_ws
30+
$ catkin build # or catkin_make
31+
```
32+
33+
## :runner: To run the demo codes
34+
There is a demo which executes Patchwork++ with sample rosbag file. You can download sample file with the following command.
35+
36+
```bash
37+
$ wget https://www.dropbox.com/s/oel7o0azosm0m46/kitti_00_sample.bag
38+
```
39+
40+
> The rosbag file is based on the [KITTI][kittilink] dataset. The bin files are merged into the rosbag file format.
41+
42+
> The sample file contains LiDAR sensor data only.
43+
44+
[kittilink]: http://www.cvlibs.net/datasets/kitti/raw_data.php
45+
46+
Then, you can run demo as follows.
47+
48+
```bash
49+
# Start Patchwork++
50+
$ roslaunch patchworkpp demo.launch
51+
# Start the bag file
52+
$ rosbag play kitti_00_sample.bag
53+
```
54+
55+
## :postbox: Contact
56+
If you have any question, don't be hesitate let us know!
57+
58+
* [Seungjae Lee][sjlink] :envelope: (sj98lee at kaist.ac.kr)
59+
* [Hyungtae Lim][htlink] :envelope: (shapelim at kaist.ac.kr)
60+
61+
[sjlink]: https://github.com/seungjae24
62+
[htlink]: https://github.com/LimHyungTae

config/params.yaml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
save_flag: true
2+
3+
patchworkpp:
4+
5+
sensor_height: 1.723
6+
7+
mode: "czm"
8+
verbose: false # To check effect of uprightness/elevation/flatness
9+
visualize: true # Ground Likelihood Estimation is visualized
10+
11+
# Ground Plane Fitting parameters
12+
num_iter: 3
13+
num_lpr: 20
14+
num_min_pts: 10
15+
th_seeds: 0.3
16+
th_dist: 0.125
17+
th_seeds_v: 0.25
18+
th_dist_v: 0.1
19+
max_r: 80.0
20+
min_r: 2.7 # to consider vicinity of mobile platform.
21+
uprightness_thr: 0.707 # 45: 0.707 / 60: 0.866
22+
23+
adaptive_seed_selection_margin: -1.2 # The points below the adaptive_seed_selection_margin * sensor_height are filtered
24+
uniform: # deprecated
25+
num_rings: 16
26+
num_sectors: 54
27+
czm:
28+
num_zones: 4
29+
num_sectors_each_zone: [16, 32, 54, 32]
30+
mum_rings_each_zone: [2, 4, 4, 4]
31+
elevation_thresholds: [0.0, 0.0, 0.0, 0.0] # For elevation. The size should be equal to flatness_thresholds vector
32+
flatness_thresholds: [0.0, 0.0, 0.0, 0.0] # For flatness. The size should be equal to elevation_thresholds vectorc
33+
34+
flatness_margin: 0.0
35+
noise_filter_channel_num: 20
36+
37+
enable_TGR : true
38+
enable_RNR : true
39+
pc_num_channel: 2048
40+
intensity_thr: 0.2

0 commit comments

Comments
 (0)