From ea3045a4aebd4c3f71641d69d17746873b876d54 Mon Sep 17 00:00:00 2001 From: wep21 Date: Wed, 25 May 2022 17:28:45 +0900 Subject: [PATCH 1/2] fix: support context dict key for humble Signed-off-by: wep21 Signed-off-by: Daisuke Nishimatsu --- aip_x1_launch/launch/velodyne_node_container.launch.py | 2 ++ aip_x2_launch/launch/pandar_node_container.launch.py | 2 ++ common_sensor_launch/launch/livox_horizon.launch.py | 2 ++ common_sensor_launch/launch/velodyne_node_container.launch.py | 2 ++ 4 files changed, 8 insertions(+) diff --git a/aip_x1_launch/launch/velodyne_node_container.launch.py b/aip_x1_launch/launch/velodyne_node_container.launch.py index 5e6fea0e..560498a6 100644 --- a/aip_x1_launch/launch/velodyne_node_container.launch.py +++ b/aip_x1_launch/launch/velodyne_node_container.launch.py @@ -26,6 +26,8 @@ def get_vehicle_info(context): gp = context.launch_configurations.get("ros_params", {}) + if not gp: + gp = 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"] diff --git a/aip_x2_launch/launch/pandar_node_container.launch.py b/aip_x2_launch/launch/pandar_node_container.launch.py index 7f2139bd..83b50e39 100644 --- a/aip_x2_launch/launch/pandar_node_container.launch.py +++ b/aip_x2_launch/launch/pandar_node_container.launch.py @@ -36,6 +36,8 @@ def get_dual_return_filter_info(context): def get_vehicle_info(context): gp = context.launch_configurations.get("ros_params", {}) + if not gp: + gp = 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"] diff --git a/common_sensor_launch/launch/livox_horizon.launch.py b/common_sensor_launch/launch/livox_horizon.launch.py index 62a64635..a2beec15 100644 --- a/common_sensor_launch/launch/livox_horizon.launch.py +++ b/common_sensor_launch/launch/livox_horizon.launch.py @@ -28,6 +28,8 @@ def get_vehicle_info(context): gp = context.launch_configurations.get("ros_params", {}) + if not gp: + gp = 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"] diff --git a/common_sensor_launch/launch/velodyne_node_container.launch.py b/common_sensor_launch/launch/velodyne_node_container.launch.py index 06331da6..3a99ade9 100644 --- a/common_sensor_launch/launch/velodyne_node_container.launch.py +++ b/common_sensor_launch/launch/velodyne_node_container.launch.py @@ -27,6 +27,8 @@ def get_vehicle_info(context): gp = context.launch_configurations.get("ros_params", {}) + if not gp: + gp = 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"] From 2c81daf4bfbaf5d533906942fa7dcc2c09703f90 Mon Sep 17 00:00:00 2001 From: Daisuke Nishimatsu Date: Thu, 26 May 2022 04:10:51 +0900 Subject: [PATCH 2/2] add todo comment Signed-off-by: Daisuke Nishimatsu --- aip_x1_launch/launch/velodyne_node_container.launch.py | 2 ++ aip_x2_launch/launch/pandar_node_container.launch.py | 2 ++ common_sensor_launch/launch/livox_horizon.launch.py | 2 ++ common_sensor_launch/launch/velodyne_node_container.launch.py | 2 ++ 4 files changed, 8 insertions(+) diff --git a/aip_x1_launch/launch/velodyne_node_container.launch.py b/aip_x1_launch/launch/velodyne_node_container.launch.py index 560498a6..eaca0fbb 100644 --- a/aip_x1_launch/launch/velodyne_node_container.launch.py +++ b/aip_x1_launch/launch/velodyne_node_container.launch.py @@ -25,6 +25,8 @@ def get_vehicle_info(context): + # 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 = context.launch_configurations.get("ros_params", {}) if not gp: gp = context.launch_configurations.get("global_params", {}) diff --git a/aip_x2_launch/launch/pandar_node_container.launch.py b/aip_x2_launch/launch/pandar_node_container.launch.py index 83b50e39..8e5a137a 100644 --- a/aip_x2_launch/launch/pandar_node_container.launch.py +++ b/aip_x2_launch/launch/pandar_node_container.launch.py @@ -35,6 +35,8 @@ def get_dual_return_filter_info(context): def get_vehicle_info(context): + # 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 = context.launch_configurations.get("ros_params", {}) if not gp: gp = context.launch_configurations.get("global_params", {}) diff --git a/common_sensor_launch/launch/livox_horizon.launch.py b/common_sensor_launch/launch/livox_horizon.launch.py index a2beec15..d550282b 100644 --- a/common_sensor_launch/launch/livox_horizon.launch.py +++ b/common_sensor_launch/launch/livox_horizon.launch.py @@ -27,6 +27,8 @@ def get_vehicle_info(context): + # 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 = context.launch_configurations.get("ros_params", {}) if not gp: gp = context.launch_configurations.get("global_params", {}) diff --git a/common_sensor_launch/launch/velodyne_node_container.launch.py b/common_sensor_launch/launch/velodyne_node_container.launch.py index 3a99ade9..1c993bda 100644 --- a/common_sensor_launch/launch/velodyne_node_container.launch.py +++ b/common_sensor_launch/launch/velodyne_node_container.launch.py @@ -26,6 +26,8 @@ def get_vehicle_info(context): + # 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 = context.launch_configurations.get("ros_params", {}) if not gp: gp = context.launch_configurations.get("global_params", {})