Skip to content

Commit 899294c

Browse files
authored
Merge pull request #28 from jkk-research/ROS2
Updated run instructions and a new ROS 2 mcap sample file
2 parents d87843e + 7580854 commit 899294c

File tree

3 files changed

+35
-16
lines changed

3 files changed

+35
-16
lines changed

README.md

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ This is ROS package of Patchwork++ (@ IROS'22), which is a fast and robust groun
1616
* Demo launch file ([demo.launch][launchlink]) with sample rosbag file. You can execute Patchwork++ simply!
1717

1818
[codelink]: https://github.com/url-kaist/patchwork-plusplus-ros/blob/master/include/patchworkpp/patchworkpp.hpp
19-
[launchlink]: https://github.com/url-kaist/patchwork-plusplus-ros/blob/master/launch/demo.launch
19+
[launchlink]: https://github.com/url-kaist/patchwork-plusplus-ros/blob/ROS2/launch/demo.launch.py
2020

2121
## :package: Prerequisite packages
2222
You may need to install ROS, PCL, Eigen, ...
@@ -31,17 +31,33 @@ $ colcon build --packages-select patchworkpp --symlink-install
3131
```
3232

3333
## :runner: To run the demo codes
34-
There is a demo which executes Patchwork++ with sample rosbag file. You can download a sample file with the following command.
35-
> download Kitti dataset for ros2 [kittiRos2link]: https://github.com/umtclskn/ros2_kitti_publishers/tree/main
34+
There is a demo which executes Patchwork++ with sample rosbag2 (mcap) file. You can download a sample file with the following command.
35+
36+
> [!TIP]
37+
> Download a sample dataset for ros2: [mcap file download [~540MB] ](https://laesze-my.sharepoint.com/:u:/g/personal/herno_o365_sze_hu/Eclwzn42FS9GunGay5LPq-EBA6U1dZseBFNDrr6P0MwB2w?download=1)
38+
39+
40+
<details>
41+
<summary> Don't forget to source before ROS commands.</summary>
42+
43+
``` bash
44+
source ~/ros2_ws/install/setup.bash
45+
```
46+
</details>
3647

3748
Then, you can run demo as follows.
3849
```bash
3950
# Start Patchwork++
40-
$ ros2 launch patchworkpp demo.launch
51+
$ ros2 launch patchworkpp demo.launch.py cloud_topic:=/lexus3/os_center/points cloud_frame:=lexus3/os_center_a_laser_data_frame
4152
# Start the bag file
42-
$ ros2 bag play kitti_00_sample.db3
53+
$ ros2 bag play ~/Downloads/lexus3-2024-04-05-gyor.mcap --loop
54+
# Start visualization
55+
$ ros2 launch patchworkpp rviz1.launch.py
4356
```
4457

58+
> [!WARNING]
59+
> You may need to install mcap support for pre-iron ROS2: `sudo apt install ros-humble-rosbag2-storage-mcap`
60+
4561
## :pushpin: TODO List
4662
- [ ] Update additional demo codes processing data with .bin file format
4763
- [ ] Generalize point type in the source code

launch/demo.launch.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,17 @@ def generate_launch_description():
1515
)
1616

1717
return LaunchDescription([
18-
DeclareLaunchArgument('cloud_topic', default_value="/kitti/point_cloud"),
18+
DeclareLaunchArgument('cloud_topic', default_value="/kitti/point_cloud", description="a pointcloud topic to process",),
19+
DeclareLaunchArgument('cloud_frame', default_value="lexus3/os_center_a_laser_data_frame", description="a pointcloud topic to process",),
1920

2021
Node(
2122
package='patchworkpp',
2223
executable='demo',
2324
name='ground_segmentation',
2425
output='screen',
2526
parameters=[
26-
{'cloud_topic': '/points'}, # Input pointcloud
27-
{'frame_id': 'laser_data_frame'},
27+
{'cloud_topic': LaunchConfiguration("cloud_topic")}, # Input pointcloud
28+
{'frame_id': LaunchConfiguration("cloud_frame")},
2829
{'sensor_height': 1.88},
2930
{'num_iter': 3}, # Number of iterations for ground plane estimation using PCA.
3031
{'num_lpr': 20}, # Maximum number of points to be selected as lowest points representative.

rviz/rviz1.rviz

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ Panels:
55
Property Tree Widget:
66
Expanded:
77
- /Global Options1
8+
- /nonground1/Topic1
9+
- /ground1/Topic1
810
- /input1/Topic1
911
Splitter Ratio: 0.5
1012
Tree Height: 419
@@ -130,9 +132,9 @@ Visualization Manager:
130132
Enabled: false
131133
Invert Rainbow: false
132134
Max Color: 255; 255; 255
133-
Max Intensity: 1681
135+
Max Intensity: 1683
134136
Min Color: 0; 0; 0
135-
Min Intensity: 3
137+
Min Intensity: 4
136138
Name: input
137139
Position Transformer: XYZ
138140
Selectable: true
@@ -152,7 +154,7 @@ Visualization Manager:
152154
Enabled: true
153155
Global Options:
154156
Background Color: 48; 48; 48
155-
Fixed Frame: lexus3/os_center_a
157+
Fixed Frame: lexus3/os_center_a_laser_data_frame
156158
Frame Rate: 30
157159
Name: root
158160
Tools:
@@ -195,7 +197,7 @@ Visualization Manager:
195197
Views:
196198
Current:
197199
Class: rviz_default_plugins/ThirdPersonFollower
198-
Distance: 103.528564453125
200+
Distance: 52.79143142700195
199201
Enable Stereo Rendering:
200202
Stereo Eye Separation: 0.05999999865889549
201203
Stereo Focal Distance: 1
@@ -210,10 +212,10 @@ Visualization Manager:
210212
Invert Z Axis: false
211213
Name: Current View
212214
Near Clip Distance: 0.009999999776482582
213-
Pitch: 0.4797971546649933
215+
Pitch: 0.6147969961166382
214216
Target Frame: <Fixed Frame>
215217
Value: ThirdPersonFollower (rviz_default_plugins)
216-
Yaw: 2.955385446548462
218+
Yaw: 4.390388011932373
217219
Saved: ~
218220
Window Geometry:
219221
Displays:
@@ -231,5 +233,5 @@ Window Geometry:
231233
Views:
232234
collapsed: false
233235
Width: 1260
234-
X: 434
235-
Y: 97
236+
X: 370
237+
Y: 33

0 commit comments

Comments
 (0)