Skip to content

Commit 9b74dd0

Browse files
Cryst4L9527Joshua Wallace
authored andcommitted
CostmapLayer::matchSize may be executed concurrently (ros-navigation#3250)
* CostmapLayer::matchSize() add a mutex
1 parent e7d4d98 commit 9b74dd0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

nav2_costmap_2d/src/costmap_layer.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ void CostmapLayer::touch(
5555

5656
void CostmapLayer::matchSize()
5757
{
58+
std::lock_guard<Costmap2D::mutex_t> guard(*getMutex());
5859
Costmap2D * master = layered_costmap_->getCostmap();
5960
resizeMap(
6061
master->getSizeInCellsX(), master->getSizeInCellsY(), master->getResolution(),

0 commit comments

Comments
 (0)