File tree 6 files changed +28
-20
lines changed
behavior_path_avoidance_by_lane_change_module/src
behavior_path_avoidance_module
include/behavior_path_avoidance_module
6 files changed +28
-20
lines changed Original file line number Diff line number Diff line change @@ -133,10 +133,13 @@ void AvoidanceByLaneChangeModuleManager::init(rclcpp::Node * node)
133
133
134
134
{
135
135
const std::string ns = " avoidance.target_filtering.avoidance_for_ambiguous_vehicle." ;
136
- p.enable_force_avoidance_for_stopped_vehicle =
137
- getOrDeclareParameter<bool >(*node, ns + " enable" );
138
- p.threshold_time_force_avoidance_for_stopped_vehicle =
139
- getOrDeclareParameter<double >(*node, ns + " time_threshold" );
136
+ p.enable_avoidance_for_ambiguous_vehicle = getOrDeclareParameter<bool >(*node, ns + " enable" );
137
+ p.closest_distance_to_wait_and_see_for_ambiguous_vehicle =
138
+ getOrDeclareParameter<double >(*node, ns + " closest_distance_to_wait_and_see" );
139
+ p.time_threshold_for_ambiguous_vehicle =
140
+ getOrDeclareParameter<double >(*node, ns + " condition.time_threshold" );
141
+ p.distance_threshold_for_ambiguous_vehicle =
142
+ getOrDeclareParameter<double >(*node, ns + " condition.distance_threshold" );
140
143
p.object_ignore_section_traffic_light_in_front_distance =
141
144
getOrDeclareParameter<double >(*node, ns + " ignore_area.traffic_light.front_distance" );
142
145
p.object_ignore_section_crosswalk_in_front_distance =
Original file line number Diff line number Diff line change 155
155
# params for avoidance of vehicle type objects that are ambiguous as to whether they are parked.
156
156
avoidance_for_ambiguous_vehicle :
157
157
enable : false # [-]
158
- time_threshold : 1.0 # [s]
159
- distance_threshold : 1.0 # [m]
158
+ closest_distance_to_wait_and_see : 10.0 # [m]
159
+ condition :
160
+ time_threshold : 1.0 # [s]
161
+ distance_threshold : 1.0 # [m]
160
162
ignore_area :
161
163
traffic_light :
162
164
front_distance : 100.0 # [m]
Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ struct AvoidanceParameters
100
100
bool enable_cancel_maneuver{false };
101
101
102
102
// enable avoidance for all parking vehicle
103
- bool enable_force_avoidance_for_stopped_vehicle {false };
103
+ bool enable_avoidance_for_ambiguous_vehicle {false };
104
104
105
105
// enable yield maneuver.
106
106
bool enable_yield_maneuver{false };
@@ -184,8 +184,9 @@ struct AvoidanceParameters
184
184
double object_check_min_road_shoulder_width{0.0 };
185
185
186
186
// force avoidance
187
- double threshold_time_force_avoidance_for_stopped_vehicle{0.0 };
188
- double force_avoidance_distance_threshold{0.0 };
187
+ double closest_distance_to_wait_and_see_for_ambiguous_vehicle{0.0 };
188
+ double time_threshold_for_ambiguous_vehicle{0.0 };
189
+ double distance_threshold_for_ambiguous_vehicle{0.0 };
189
190
190
191
// when complete avoidance motion, there is a distance margin with the object
191
192
// for longitudinal direction
Original file line number Diff line number Diff line change @@ -309,12 +309,13 @@ class AvoidanceHelper
309
309
const auto desire_shift_length =
310
310
getShiftLength (object, is_object_on_right, object.avoid_margin .value ());
311
311
312
- constexpr double BUFFER = 10.0 ;
313
312
const auto prepare_distance = getMinimumPrepareDistance ();
314
313
const auto constant_distance = getFrontConstantDistance (object);
315
314
const auto avoidance_distance = getMinAvoidanceDistance (desire_shift_length);
316
315
317
- return object.longitudinal < prepare_distance + constant_distance + avoidance_distance + BUFFER;
316
+ return object.longitudinal <
317
+ prepare_distance + constant_distance + avoidance_distance +
318
+ parameters_->closest_distance_to_wait_and_see_for_ambiguous_vehicle ;
318
319
}
319
320
320
321
bool isReady (const AvoidLineArray & new_shift_lines, const double current_shift_length) const
Original file line number Diff line number Diff line change @@ -141,12 +141,13 @@ AvoidanceParameters getParameter(rclcpp::Node * node)
141
141
142
142
{
143
143
const std::string ns = " avoidance.target_filtering.avoidance_for_ambiguous_vehicle." ;
144
- p.enable_force_avoidance_for_stopped_vehicle =
145
- getOrDeclareParameter<bool >(*node, ns + " enable" );
146
- p.threshold_time_force_avoidance_for_stopped_vehicle =
147
- getOrDeclareParameter<double >(*node, ns + " time_threshold" );
148
- p.force_avoidance_distance_threshold =
149
- getOrDeclareParameter<double >(*node, ns + " distance_threshold" );
144
+ p.enable_avoidance_for_ambiguous_vehicle = getOrDeclareParameter<bool >(*node, ns + " enable" );
145
+ p.closest_distance_to_wait_and_see_for_ambiguous_vehicle =
146
+ getOrDeclareParameter<double >(*node, ns + " closest_distance_to_wait_and_see" );
147
+ p.time_threshold_for_ambiguous_vehicle =
148
+ getOrDeclareParameter<double >(*node, ns + " condition.time_threshold" );
149
+ p.distance_threshold_for_ambiguous_vehicle =
150
+ getOrDeclareParameter<double >(*node, ns + " condition.distance_threshold" );
150
151
p.object_ignore_section_traffic_light_in_front_distance =
151
152
getOrDeclareParameter<double >(*node, ns + " ignore_area.traffic_light.front_distance" );
152
153
p.object_ignore_section_crosswalk_in_front_distance =
Original file line number Diff line number Diff line change @@ -680,7 +680,7 @@ bool isNeverAvoidanceTarget(
680
680
const auto & object_pose = object.object .kinematics .initial_pose_with_covariance .pose ;
681
681
const auto is_moving_distance_longer_than_threshold =
682
682
tier4_autoware_utils::calcDistance2d (object.init_pose , object_pose) >
683
- parameters->force_avoidance_distance_threshold ;
683
+ parameters->distance_threshold_for_ambiguous_vehicle ;
684
684
if (is_moving_distance_longer_than_threshold) {
685
685
object.reason = AvoidanceDebugFactor::MOVING_OBJECT;
686
686
return true ;
@@ -860,13 +860,13 @@ bool isSatisfiedWithVehicleCondition(
860
860
861
861
// from here, filtering for ambiguous vehicle.
862
862
863
- if (!parameters->enable_force_avoidance_for_stopped_vehicle ) {
863
+ if (!parameters->enable_avoidance_for_ambiguous_vehicle ) {
864
864
object.reason = " AmbiguousStoppedVehicle" ;
865
865
return false ;
866
866
}
867
867
868
868
const auto stop_time_longer_than_threshold =
869
- object.stop_time > parameters->threshold_time_force_avoidance_for_stopped_vehicle ;
869
+ object.stop_time > parameters->time_threshold_for_ambiguous_vehicle ;
870
870
if (!stop_time_longer_than_threshold) {
871
871
object.reason = " AmbiguousStoppedVehicle(wait-and-see)" ;
872
872
return false ;
You can’t perform that action at this time.
0 commit comments