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 <[email protected]>
  • Loading branch information
taikitanaka3 authored and TomohitoAndo committed Jul 11, 2022
1 parent 0823848 commit 18d21ab
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 @@ -301,6 +301,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 18d21ab

Please sign in to comment.