Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CostmapLayer::matchSize may be executed concurrently #3250

Merged
merged 14 commits into from
Oct 24, 2022
1 change: 1 addition & 0 deletions nav2_costmap_2d/src/costmap_layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ void CostmapLayer::touch(

void CostmapLayer::matchSize()
{
std::lock_guard<Costmap2D::mutex_t> guard(*getMutex());
Costmap2D * master = layered_costmap_->getCostmap();
resizeMap(
master->getSizeInCellsX(), master->getSizeInCellsY(), master->getResolution(),
Expand Down