diff --git a/src/virtual_road_projector.cpp b/src/virtual_road_projector.cpp index 09ee2f2..2f3621b 100644 --- a/src/virtual_road_projector.cpp +++ b/src/virtual_road_projector.cpp @@ -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);