Skip to content

Commit

Permalink
fix(obstacle_stop): add vector size guard (autowarefoundation#6254)
Browse files Browse the repository at this point in the history
* add guard

Signed-off-by: Yuki Takagi <[email protected]>
  • Loading branch information
yuki-takagi-66 authored and karishma1911 committed Jun 3, 2024
1 parent 0b2439c commit 1c2bba9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions planning/obstacle_stop_planner/src/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1548,6 +1548,8 @@ void ObstacleStopPlannerNode::filterObstacles(
const PredictedObjects & input_objects, const Pose & ego_pose, const TrajectoryPoints & traj,
const double dist_threshold, PredictedObjects & filtered_objects)
{
if (traj.size() < 2) return;

filtered_objects.header = input_objects.header;

for (auto & object : input_objects.objects) {
Expand Down

0 comments on commit 1c2bba9

Please sign in to comment.