|
| 1 | +// Copyright 2024 TIER IV, Inc. |
| 2 | +// |
| 3 | +// Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +// you may not use this file except in compliance with the License. |
| 5 | +// You may obtain a copy of the License at |
| 6 | +// |
| 7 | +// http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +// |
| 9 | +// Unless required by applicable law or agreed to in writing, software |
| 10 | +// distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +// See the License for the specific language governing permissions and |
| 13 | +// limitations under the License. |
| 14 | + |
| 15 | +#include "autoware/behavior_velocity_blind_spot_module/parameter.hpp" |
| 16 | + |
| 17 | +#include <autoware/universe_utils/ros/parameter.hpp> |
| 18 | + |
| 19 | +#include <string> |
| 20 | + |
| 21 | +namespace autoware::behavior_velocity_planner |
| 22 | +{ |
| 23 | + |
| 24 | +PlannerParam PlannerParam::init(rclcpp::Node & node, const std::string & ns) |
| 25 | +{ |
| 26 | + using autoware::universe_utils::getOrDeclareParameter; |
| 27 | + PlannerParam param; |
| 28 | + param.use_pass_judge_line = getOrDeclareParameter<bool>(node, ns + ".use_pass_judge_line"); |
| 29 | + param.stop_line_margin = getOrDeclareParameter<double>(node, ns + ".stop_line_margin"); |
| 30 | + param.backward_detection_length = |
| 31 | + getOrDeclareParameter<double>(node, ns + ".backward_detection_length"); |
| 32 | + param.ignore_width_from_center_line = |
| 33 | + getOrDeclareParameter<double>(node, ns + ".ignore_width_from_center_line"); |
| 34 | + param.adjacent_extend_width = getOrDeclareParameter<double>(node, ns + ".adjacent_extend_width"); |
| 35 | + param.opposite_adjacent_extend_width = |
| 36 | + getOrDeclareParameter<double>(node, ns + ".opposite_adjacent_extend_width"); |
| 37 | + param.max_future_movement_time = |
| 38 | + getOrDeclareParameter<double>(node, ns + ".max_future_movement_time"); |
| 39 | + param.ttc_min = getOrDeclareParameter<double>(node, ns + ".ttc_min"); |
| 40 | + param.ttc_max = getOrDeclareParameter<double>(node, ns + ".ttc_max"); |
| 41 | + param.ttc_ego_minimal_velocity = |
| 42 | + getOrDeclareParameter<double>(node, ns + ".ttc_ego_minimal_velocity"); |
| 43 | + return param; |
| 44 | +} |
| 45 | +} // namespace autoware::behavior_velocity_planner |
0 commit comments