We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 57dd8d4 commit e16a44cCopy full SHA for e16a44c
nav2_costmap_2d/src/costmap_2d.cpp
@@ -265,16 +265,19 @@ unsigned char * Costmap2D::getCharMap() const
265
266
unsigned char Costmap2D::getCost(unsigned int mx, unsigned int my) const
267
{
268
+ std::unique_lock<mutex_t> lock(*access_);
269
return costmap_[getIndex(mx, my)];
270
}
271
272
unsigned char Costmap2D::getCost(unsigned int undex) const
273
274
275
return costmap_[undex];
276
277
278
void Costmap2D::setCost(unsigned int mx, unsigned int my, unsigned char cost)
279
280
281
costmap_[getIndex(mx, my)] = cost;
282
283
0 commit comments