Skip to content

Commit

Permalink
Fix bug related to count reset (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
ToshikiNakamura0412 authored Jul 28, 2024
1 parent 497bdef commit 3575ac1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/virtual_road_projector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ void VirtualRoadProjector::map_callback(const nav_msgs::OccupancyGridConstPtr &m
if (!road_updated_)
count_of_not_received_road_++;
if (param_.allowable_num_of_not_received < count_of_not_received_road_)
{
road_.reset();
count_of_not_received_road_ = 0;
}

if (!road_.has_value())
map_pub_.publish(*msg);
Expand Down

0 comments on commit 3575ac1

Please sign in to comment.