@@ -368,13 +368,15 @@ bool isSafetyCheckTargetObjectType(
368
368
return parameters->object_parameters .at (object_type).is_safety_check_target ;
369
369
}
370
370
371
- bool isVehicleTypeObject (const ObjectData & object)
371
+ bool isUnknownTypeObject (const ObjectData & object)
372
372
{
373
373
const auto object_type = utils::getHighestProbLabel (object.object .classification );
374
+ return object_type == ObjectClassification::UNKNOWN;
375
+ }
374
376
375
- if (object_type == ObjectClassification::UNKNOWN) {
376
- return false ;
377
- }
377
+ bool isVehicleTypeObject ( const ObjectData & object)
378
+ {
379
+ const auto object_type = utils::getHighestProbLabel (object. object . classification );
378
380
379
381
if (object_type == ObjectClassification::PEDESTRIAN) {
380
382
return false ;
@@ -721,6 +723,15 @@ bool isSatisfiedWithNonVehicleCondition(
721
723
return false ;
722
724
}
723
725
726
+ // Object is on center line -> ignore.
727
+ const auto & object_pose = object.object .kinematics .initial_pose_with_covariance .pose ;
728
+ object.to_centerline =
729
+ lanelet::utils::getArcCoordinates (data.current_lanelets , object_pose).distance ;
730
+ if (std::abs (object.to_centerline ) < parameters->threshold_distance_object_is_on_center ) {
731
+ object.reason = AvoidanceDebugFactor::TOO_NEAR_TO_CENTERLINE;
732
+ return false ;
733
+ }
734
+
724
735
return true ;
725
736
}
726
737
@@ -1624,6 +1635,16 @@ void filterTargetObjects(
1624
1635
o.to_road_shoulder_distance = filtering_utils::getRoadShoulderDistance (o, data, planner_data);
1625
1636
o.avoid_margin = filtering_utils::getAvoidMargin (o, planner_data, parameters);
1626
1637
1638
+ // TODO(Satoshi Ota) parametrize stop time threshold if need.
1639
+ constexpr double STOP_TIME_THRESHOLD = 3.0 ; // [s]
1640
+ if (filtering_utils::isUnknownTypeObject (o)) {
1641
+ if (o.stop_time < STOP_TIME_THRESHOLD) {
1642
+ o.reason = " UnstableObject" ;
1643
+ data.other_objects .push_back (o);
1644
+ continue ;
1645
+ }
1646
+ }
1647
+
1627
1648
if (filtering_utils::isNoNeedAvoidanceBehavior (o, parameters)) {
1628
1649
data.other_objects .push_back (o);
1629
1650
continue ;
0 commit comments