From e714a7f7cb0389e9e69ea4ee98cbedd21d1bac96 Mon Sep 17 00:00:00 2001 From: Daisuke Nishimatsu <42202095+wep21@users.noreply.github.com> Date: Thu, 26 May 2022 03:54:16 +0900 Subject: [PATCH] fix: support context dict key for humble (#328) * fix: support context dict key for humble Signed-off-by: wep21 * add todo comment Co-authored-by: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com> Co-authored-by: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com> --- .../ground_segmentation/ground_segmentation.launch.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/perception_launch/launch/obstacle_segmentation/ground_segmentation/ground_segmentation.launch.py b/perception_launch/launch/obstacle_segmentation/ground_segmentation/ground_segmentation.launch.py index b8781ebac..251e97dea 100644 --- a/perception_launch/launch/obstacle_segmentation/ground_segmentation/ground_segmentation.launch.py +++ b/perception_launch/launch/obstacle_segmentation/ground_segmentation/ground_segmentation.launch.py @@ -48,8 +48,11 @@ def __init__(self, context): self.use_time_series_filter = self.ground_segmentation_param["use_time_series_filter"] def get_vehicle_info(self): - # TODO: need to rename key from "ros_params" to "global_params" after Humble + # TODO(TIER IV): Use Parameter Substitution after we drop Galactic support + # https://github.com/ros2/launch_ros/blob/master/launch_ros/launch_ros/substitutions/parameter.py gp = self.context.launch_configurations.get("ros_params", {}) + if not gp: + gp = self.context.launch_configurations.get("global_params", {}) p = {} p["vehicle_length"] = gp["front_overhang"] + gp["wheel_base"] + gp["rear_overhang"] p["vehicle_width"] = gp["wheel_tread"] + gp["left_overhang"] + gp["right_overhang"]