fix stuck in DrawBuffer at LocalizationStage

This commit is contained in:
adsim 2020-10-18 18:42:43 +08:00 committed by Jacopo Bartiromo
parent 4abdd5394f
commit b1fe99b7df
1 changed files with 1 additions and 1 deletions

View File

@ -419,7 +419,7 @@ SimpleWaypointPtr LocalizationStage::AssignLaneChange(const ActorId actor_id,
void LocalizationStage::DrawBuffer(Buffer &buffer) {
uint64_t buffer_size = buffer.size();
uint64_t step_size = buffer_size/20u;
uint64_t step_size = std::max(buffer_size/20u, 1ul);
cc::DebugHelper::Color color {0u, 0u, 0u};
cg::Location two_meters_up = cg::Location(0.0f, 0.0f, 2.0f);
for (uint64_t i = 0u; i + step_size < buffer_size; i += step_size) {