Skip to content

Commit ed9b632

Browse files
committed
refactor(avoidance): rebuild parameter structure (autowarefoundation#6786)
* refactor(avoidance): unify similar param Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com> * refactor(avoidance): rename misreading params Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com> * refactor(avoidance): update parameter namespace Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com> * refactor(avoidance): use prefix th instead of threshold Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com> * refactor(avoidance): rename params Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com> * refactor(AbLC): rename params Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com> * refactor(avoidance): update yaml Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com> * refactor(AbLC): update yaml Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com> --------- Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
1 parent aa6be89 commit ed9b632

File tree

10 files changed

+268
-289
lines changed

10 files changed

+268
-289
lines changed

planning/behavior_path_avoidance_by_lane_change_module/config/avoidance_by_lane_change.param.yaml

+22-30
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
target_object:
99
car:
1010
execute_num: 2 # [-]
11-
moving_speed_threshold: 1.0 # [m/s]
12-
moving_time_threshold: 1.0 # [s]
11+
th_moving_speed: 1.0 # [m/s]
12+
th_moving_time: 1.0 # [s]
1313
max_expand_ratio: 0.0 # [-]
1414
envelope_buffer_margin: 0.3 # [m]
1515
lateral_margin:
@@ -18,8 +18,8 @@
1818
hard_margin_for_parked_vehicle: 0.0 # [m]
1919
truck:
2020
execute_num: 2
21-
moving_speed_threshold: 1.0 # 3.6km/h
22-
moving_time_threshold: 1.0
21+
th_moving_speed: 1.0 # 3.6km/h
22+
th_moving_time: 1.0
2323
max_expand_ratio: 0.0
2424
envelope_buffer_margin: 0.3
2525
lateral_margin:
@@ -28,8 +28,8 @@
2828
hard_margin_for_parked_vehicle: 0.0 # [m]
2929
bus:
3030
execute_num: 2
31-
moving_speed_threshold: 1.0 # 3.6km/h
32-
moving_time_threshold: 1.0
31+
th_moving_speed: 1.0 # 3.6km/h
32+
th_moving_time: 1.0
3333
max_expand_ratio: 0.0
3434
envelope_buffer_margin: 0.3
3535
lateral_margin:
@@ -38,8 +38,8 @@
3838
hard_margin_for_parked_vehicle: 0.0 # [m]
3939
trailer:
4040
execute_num: 2
41-
moving_speed_threshold: 1.0 # 3.6km/h
42-
moving_time_threshold: 1.0
41+
th_moving_speed: 1.0 # 3.6km/h
42+
th_moving_time: 1.0
4343
max_expand_ratio: 0.0
4444
envelope_buffer_margin: 0.3
4545
lateral_margin:
@@ -48,8 +48,8 @@
4848
hard_margin_for_parked_vehicle: 0.0 # [m]
4949
unknown:
5050
execute_num: 1
51-
moving_speed_threshold: 0.28 # 1.0km/h
52-
moving_time_threshold: 1.0
51+
th_moving_speed: 0.28 # 1.0km/h
52+
th_moving_time: 1.0
5353
max_expand_ratio: 0.0
5454
envelope_buffer_margin: 0.3
5555
lateral_margin:
@@ -58,34 +58,34 @@
5858
hard_margin_for_parked_vehicle: 0.0 # [m]
5959
bicycle:
6060
execute_num: 2
61-
moving_speed_threshold: 0.28 # 1.0km/h
62-
moving_time_threshold: 1.0
61+
th_moving_speed: 0.28 # 1.0km/h
62+
th_moving_time: 1.0
6363
max_expand_ratio: 0.0
6464
envelope_buffer_margin: 0.8
6565
lateral_margin:
6666
soft_margin: 0.0 # [m]
67-
hard_margin: 0.0 # [m]
68-
hard_margin_for_parked_vehicle: 0.0 # [m]
67+
hard_margin: 1.0 # [m]
68+
hard_margin_for_parked_vehicle: 1.0 # [m]
6969
motorcycle:
7070
execute_num: 2
71-
moving_speed_threshold: 1.0 # 3.6km/h
72-
moving_time_threshold: 1.0
71+
th_moving_speed: 1.0 # 3.6km/h
72+
th_moving_time: 1.0
7373
max_expand_ratio: 0.0
7474
envelope_buffer_margin: 0.8
7575
lateral_margin:
7676
soft_margin: 0.0 # [m]
77-
hard_margin: 0.0 # [m]
78-
hard_margin_for_parked_vehicle: 0.0 # [m]
77+
hard_margin: 1.0 # [m]
78+
hard_margin_for_parked_vehicle: 1.0 # [m]
7979
pedestrian:
8080
execute_num: 2
81-
moving_speed_threshold: 0.28 # 1.0km/h
82-
moving_time_threshold: 1.0
81+
th_moving_speed: 0.28 # 1.0km/h
82+
th_moving_time: 1.0
8383
max_expand_ratio: 0.0
8484
envelope_buffer_margin: 0.8
8585
lateral_margin:
8686
soft_margin: 0.0 # [m]
87-
hard_margin: 0.0 # [m]
88-
hard_margin_for_parked_vehicle: 0.0 # [m]
87+
hard_margin: 1.0 # [m]
88+
hard_margin_for_parked_vehicle: 1.0 # [m]
8989
lower_distance_for_polygon_expansion: 0.0 # [m]
9090
upper_distance_for_polygon_expansion: 1.0 # [m]
9191

@@ -101,11 +101,3 @@
101101
bicycle: false # [-]
102102
motorcycle: false # [-]
103103
pedestrian: false # [-]
104-
105-
constraints:
106-
# lateral constraints
107-
lateral:
108-
velocity: [1.0, 1.38, 11.1] # [m/s]
109-
max_accel_values: [0.5, 0.5, 0.5] # [m/ss]
110-
min_jerk_values: [0.2, 0.2, 0.2] # [m/sss]
111-
max_jerk_values: [1.0, 1.0, 1.0] # [m/sss]

planning/behavior_path_avoidance_by_lane_change_module/src/manager.cpp

+13-11
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,8 @@ void AvoidanceByLaneChangeModuleManager::init(rclcpp::Node * node)
6565
const auto get_object_param = [&](std::string && ns) {
6666
ObjectParameter param{};
6767
param.execute_num = getOrDeclareParameter<int>(*node, ns + "execute_num");
68-
param.moving_speed_threshold =
69-
getOrDeclareParameter<double>(*node, ns + "moving_speed_threshold");
70-
param.moving_time_threshold =
71-
getOrDeclareParameter<double>(*node, ns + "moving_time_threshold");
68+
param.moving_speed_threshold = getOrDeclareParameter<double>(*node, ns + "th_moving_speed");
69+
param.moving_time_threshold = getOrDeclareParameter<double>(*node, ns + "th_moving_time");
7270
param.max_expand_ratio = getOrDeclareParameter<double>(*node, ns + "max_expand_ratio");
7371
param.envelope_buffer_margin =
7472
getOrDeclareParameter<double>(*node, ns + "envelope_buffer_margin");
@@ -121,14 +119,18 @@ void AvoidanceByLaneChangeModuleManager::init(rclcpp::Node * node)
121119

122120
p.object_check_goal_distance =
123121
getOrDeclareParameter<double>(*node, ns + "object_check_goal_distance");
122+
p.object_last_seen_threshold =
123+
getOrDeclareParameter<double>(*node, ns + "max_compensation_time");
124+
}
125+
126+
{
127+
const std::string ns = "avoidance.target_filtering.parked_vehicle.";
124128
p.threshold_distance_object_is_on_center =
125-
getOrDeclareParameter<double>(*node, ns + "threshold_distance_object_is_on_center");
129+
getOrDeclareParameter<double>(*node, ns + "th_offset_from_centerline");
126130
p.object_check_shiftable_ratio =
127-
getOrDeclareParameter<double>(*node, ns + "object_check_shiftable_ratio");
131+
getOrDeclareParameter<double>(*node, ns + "th_shiftable_ratio");
128132
p.object_check_min_road_shoulder_width =
129-
getOrDeclareParameter<double>(*node, ns + "object_check_min_road_shoulder_width");
130-
p.object_last_seen_threshold =
131-
getOrDeclareParameter<double>(*node, ns + "object_last_seen_threshold");
133+
getOrDeclareParameter<double>(*node, ns + "min_road_shoulder_width");
132134
}
133135

134136
{
@@ -137,9 +139,9 @@ void AvoidanceByLaneChangeModuleManager::init(rclcpp::Node * node)
137139
p.closest_distance_to_wait_and_see_for_ambiguous_vehicle =
138140
getOrDeclareParameter<double>(*node, ns + "closest_distance_to_wait_and_see");
139141
p.time_threshold_for_ambiguous_vehicle =
140-
getOrDeclareParameter<double>(*node, ns + "condition.time_threshold");
142+
getOrDeclareParameter<double>(*node, ns + "condition.th_stopped_time");
141143
p.distance_threshold_for_ambiguous_vehicle =
142-
getOrDeclareParameter<double>(*node, ns + "condition.distance_threshold");
144+
getOrDeclareParameter<double>(*node, ns + "condition.th_moving_distance");
143145
p.object_ignore_section_traffic_light_in_front_distance =
144146
getOrDeclareParameter<double>(*node, ns + "ignore_area.traffic_light.front_distance");
145147
p.object_ignore_section_crosswalk_in_front_distance =

0 commit comments

Comments
 (0)