@@ -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 ;
@@ -723,6 +725,15 @@ bool isSatisfiedWithNonVehicleCondition(
723
725
return false ;
724
726
}
725
727
728
+ // Object is on center line -> ignore.
729
+ const auto & object_pose = object.object .kinematics .initial_pose_with_covariance .pose ;
730
+ object.to_centerline =
731
+ lanelet::utils::getArcCoordinates (data.current_lanelets , object_pose).distance ;
732
+ if (std::abs (object.to_centerline ) < parameters->threshold_distance_object_is_on_center ) {
733
+ object.reason = AvoidanceDebugFactor::TOO_NEAR_TO_CENTERLINE;
734
+ return false ;
735
+ }
736
+
726
737
return true ;
727
738
}
728
739
@@ -1626,6 +1637,16 @@ void filterTargetObjects(
1626
1637
o.to_road_shoulder_distance = filtering_utils::getRoadShoulderDistance (o, data, planner_data);
1627
1638
o.avoid_margin = filtering_utils::getAvoidMargin (o, planner_data, parameters);
1628
1639
1640
+ // TODO(Satoshi Ota) parametrize stop time threshold if need.
1641
+ constexpr double STOP_TIME_THRESHOLD = 3.0 ; // [s]
1642
+ if (filtering_utils::isUnknownTypeObject (o)) {
1643
+ if (o.stop_time < STOP_TIME_THRESHOLD) {
1644
+ o.reason = " UnstableObject" ;
1645
+ data.other_objects .push_back (o);
1646
+ continue ;
1647
+ }
1648
+ }
1649
+
1629
1650
if (filtering_utils::isNoNeedAvoidanceBehavior (o, parameters)) {
1630
1651
data.other_objects .push_back (o);
1631
1652
continue ;
0 commit comments