Skip to content

Commit

Permalink
fix: support context dict key for humble (autowarefoundation#328)
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>

* 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>
  • Loading branch information
wep21 and kenji-miyake committed May 25, 2022
1 parent b30cb9b commit 691d54f
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down

0 comments on commit 691d54f

Please sign in to comment.