diff --git a/planning/obstacle_stop_planner/src/node.cpp b/planning/obstacle_stop_planner/src/node.cpp index 6acc7400f52d8..3bdfd67a7bec4 100644 --- a/planning/obstacle_stop_planner/src/node.cpp +++ b/planning/obstacle_stop_planner/src/node.cpp @@ -1548,9 +1548,10 @@ void ObstacleStopPlannerNode::filterObstacles( const PredictedObjects & input_objects, const Pose & ego_pose, const TrajectoryPoints & traj, const double dist_threshold, PredictedObjects & filtered_objects) { - filtered_objects.header = input_objects.header; if (traj.size() < 2) return; + filtered_objects.header = input_objects.header; + for (auto & object : input_objects.objects) { // Check is it in front of ego vehicle if (!isFrontObstacle(ego_pose, object.kinematics.initial_pose_with_covariance.pose.position)) {