Skip to content

Commit b5b37c7

Browse files
author
beyza
committed
check trajectory size
Signed-off-by: beyza <bnk@leodrive.ai>
1 parent 1aa5bb9 commit b5b37c7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

control/predicted_path_checker/src/predicted_path_checker_node/predicted_path_checker_node.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -549,6 +549,9 @@ void PredictedPathCheckerNode::filterObstacles(
549549

550550
// Check is it near to trajectory
551551
const double max_length = utils::calcObstacleMaxLength(object.shape);
552+
if (traj.size() < 2){
553+
continue;
554+
}
552555
const size_t seg_idx = motion_utils::findNearestSegmentIndex(
553556
traj, object.kinematics.initial_pose_with_covariance.pose.position);
554557
const auto p_front = tier4_autoware_utils::getPoint(traj.at(seg_idx));

0 commit comments

Comments
 (0)