Skip to content

Commit

Permalink
fix(behavior_velocity): fix segfo at for unstable clock (#1300)
Browse files Browse the repository at this point in the history
Signed-off-by: tanaka3 <ttatcoder@outlook.jp>
  • Loading branch information
taikitanaka3 authored Jul 11, 2022
1 parent 86c2be0 commit 7dd6ba7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions planning/behavior_velocity_planner/src/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,9 @@ void BehaviorVelocityPlannerNode::onVehicleVelocity(
break;
}

if (planner_data_.velocity_buffer.empty()) {
break;
}
// Remove old data
planner_data_.velocity_buffer.pop_back();
}
Expand Down

0 comments on commit 7dd6ba7

Please sign in to comment.