Skip to content

Commit

Permalink
fix(ground_segmentation): add param for grid scan_ground_filter (#509)
Browse files Browse the repository at this point in the history
* fix: add param for grid scan_ground_filter

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* chore: unify parameters as universe launch

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>

* fix search package name

Signed-off-by: Shunsuke Miura <shunsuke.miura@tier4.jp>

Signed-off-by: badai-nguyen <dai.nguyen@tier4.jp>
Signed-off-by: Shunsuke Miura <shunsuke.miura@tier4.jp>
Co-authored-by: Shunsuke Miura <shunsuke.miura@tier4.jp>
Co-authored-by: Shunsuke Miura <37187849+miursh@users.noreply.github.com>
  • Loading branch information
3 people authored Oct 14, 2022
1 parent 52e7e8d commit e13997e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,21 @@
max_x: 100.0
min_y: -50.0
max_y: 50.0
max_z: 10.7 # recommended 2.5 for non elevation_grid_mode
min_z: -8.7 # recommended 0.0 for non elevation_grid_mode
negative: False

common_ground_filter:
plugin: "ground_segmentation::ScanGroundFilterComponent"
parameters:
global_slope_max_angle_deg: 10.0
local_slope_max_angle_deg: 30.0
local_slope_max_angle_deg: 13.0 # recommended 30.0 for non elevation_grid_mode
split_points_distance_tolerance: 0.2
use_virtual_ground_point: True
split_height_distance: 0.2
use_virtual_ground_point: False
non_ground_height_threshold: 0.20
grid_size_m: 0.1
grid_mode_switch_radius: 20.0
gnd_grid_buffer_size: 4
detection_range_z_max: 2.5
elevation_grid_mode: true
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,6 @@ def create_additional_pipeline(self, lidar_name):
{
"input_frame": LaunchConfiguration("base_frame"),
"output_frame": LaunchConfiguration("base_frame"),
"min_z": self.vehicle_info["min_height_offset"],
"max_z": self.vehicle_info["max_height_offset"],
},
self.ground_segmentation_param[f"{lidar_name}_crop_box_filter"]["parameters"],
],
Expand Down Expand Up @@ -219,8 +217,6 @@ def create_common_pipeline(self, input_topic, output_topic):
{
"input_frame": LaunchConfiguration("base_frame"),
"output_frame": LaunchConfiguration("base_frame"),
"min_z": self.vehicle_info["min_height_offset"],
"max_z": self.vehicle_info["max_height_offset"],
},
self.ground_segmentation_param["common_crop_box_filter"]["parameters"],
],
Expand All @@ -239,7 +235,12 @@ def create_common_pipeline(self, input_topic, output_topic):
("input", "range_cropped/pointcloud"),
("output", output_topic),
],
parameters=[self.ground_segmentation_param["common_ground_filter"]["parameters"]],
parameters=[
self.ground_segmentation_param["common_ground_filter"]["parameters"],
self.vehicle_info,
{"input_frame": "base_link"},
{"output_frame": "base_link"},
],
extra_arguments=[
{"use_intra_process_comms": LaunchConfiguration("use_intra_process")}
],
Expand Down Expand Up @@ -268,7 +269,7 @@ def create_single_frame_obstacle_segmentation_components(self, input_topic, outp
components.append(
self.get_additional_lidars_concatenated_component(
input_topics=[common_pipeline_output]
+ [f"{x}/pointcloud" for x in additional_lidars],
+ list(map(lambda x: f"{x}/pointcloud"), additional_lidars),
output_topic=relay_topic if use_ransac else output_topic,
)
)
Expand Down Expand Up @@ -476,6 +477,7 @@ def launch_setup(context, *args, **kwargs):
output_topic=relay_topic
if pipeline.use_time_series_filter
else pipeline.output_topic,
context=context,
)
)
if pipeline.use_time_series_filter:
Expand Down Expand Up @@ -516,7 +518,7 @@ def add_launch_arg(name: str, default_value=None):
add_launch_arg("use_intra_process", "True")
add_launch_arg("use_pointcloud_container", "False")
add_launch_arg("container_name", "perception_pipeline_container")
add_launch_arg("input/pointcloud", "sensing/lidar/concatenated/pointcloud")
add_launch_arg("input/pointcloud", "/sensing/lidar/concatenated/pointcloud")

set_container_executable = SetLaunchConfiguration(
"container_executable",
Expand Down

0 comments on commit e13997e

Please sign in to comment.