Skip to content

Commit

Permalink
fix: support context dict key for humble (#58)
Browse files Browse the repository at this point in the history
* fix: support context dict key for humble

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>
Signed-off-by: Daisuke Nishimatsu <border_goldenmarket@yahoo.co.jp>

* add todo comment

Signed-off-by: Daisuke Nishimatsu <border_goldenmarket@yahoo.co.jp>
  • Loading branch information
wep21 authored May 26, 2022
1 parent e970744 commit 2d7caa7
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions aip_x1_launch/launch/velodyne_node_container.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@


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", {})
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"]
Expand Down
4 changes: 4 additions & 0 deletions aip_x2_launch/launch/pandar_node_container.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ 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", {})
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"]
Expand Down
4 changes: 4 additions & 0 deletions common_sensor_launch/launch/livox_horizon.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@


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", {})
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"]
Expand Down
4 changes: 4 additions & 0 deletions common_sensor_launch/launch/velodyne_node_container.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@


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", {})
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"]
Expand Down

0 comments on commit 2d7caa7

Please sign in to comment.