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