Skip to content

Commit

Permalink
fix(predicted_path_checker): check if trajectory size (#6730)
Browse files Browse the repository at this point in the history
check trajectory size

Signed-off-by: beyza <[email protected]>
Co-authored-by: beyza <[email protected]>
  • Loading branch information
beyzanurkaya and beyzanurkaya authored Apr 2, 2024
1 parent 1aa5bb9 commit 5617f74
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,10 @@ void PredictedPathCheckerNode::filterObstacles(
const Pose & ego_pose, const TrajectoryPoints & traj, const double dist_threshold,
const bool use_prediction, PredictedObjects & filtered_objects)
{
if (traj.size() < 2) {
RCLCPP_ERROR(rclcpp::get_logger("predicted_path_checker"), "Trajectory size is less than 2.");
return;
}
filtered_objects.header.frame_id = object_ptr_.get()->header.frame_id;
filtered_objects.header.stamp = this->now();

Expand Down

0 comments on commit 5617f74

Please sign in to comment.