File tree 2 files changed +10
-5
lines changed
planning/behavior_path_avoidance_module/src
2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -301,8 +301,7 @@ void AvoidanceModule::fillAvoidanceTargetObjects(
301
301
data, parameters_, forward_detection_range + MARGIN, debug);
302
302
303
303
for (const auto & object : object_outside_target_lane.objects ) {
304
- ObjectData other_object;
305
- other_object.object = object;
304
+ ObjectData other_object = createObjectData (data, object);
306
305
other_object.reason = " OutOfTargetArea" ;
307
306
data.other_objects .push_back (other_object);
308
307
}
Original file line number Diff line number Diff line change @@ -390,6 +390,14 @@ bool isVehicleTypeObject(const ObjectData & object)
390
390
return true ;
391
391
}
392
392
393
+ bool isMovingObject (
394
+ const ObjectData & object, const std::shared_ptr<AvoidanceParameters> & parameters)
395
+ {
396
+ const auto object_type = utils::getHighestProbLabel (object.object .classification );
397
+ const auto object_parameter = parameters->object_parameters .at (object_type);
398
+ return object.move_time > object_parameter.moving_time_threshold ;
399
+ }
400
+
393
401
bool isWithinCrosswalk (
394
402
const ObjectData & object,
395
403
const std::shared_ptr<const lanelet::routing::RoutingGraphContainer> & overall_graphs)
@@ -666,9 +674,7 @@ bool isSatisfiedWithCommonCondition(
666
674
}
667
675
668
676
// Step2. filtered stopped objects.
669
- const auto object_type = utils::getHighestProbLabel (object.object .classification );
670
- const auto object_parameter = parameters->object_parameters .at (object_type);
671
- if (object.move_time > object_parameter.moving_time_threshold ) {
677
+ if (filtering_utils::isMovingObject (object, parameters)) {
672
678
object.reason = AvoidanceDebugFactor::MOVING_OBJECT;
673
679
return false ;
674
680
}
You can’t perform that action at this time.
0 commit comments