Skip to content

Commit 845c30f

Browse files
ymd-stellaSteveMacenski
authored andcommitted
Fix missing mutex in PlannerServer::isPathValid (#3756)
Signed-off-by: ymd-stella <world.applepie@gmail.com>
1 parent 50d00a3 commit 845c30f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

nav2_planner/src/planner_server.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -643,6 +643,7 @@ void PlannerServer::isPathValid(
643643
* The lethal check starts at the closest point to avoid points that have already been passed
644644
* and may have become occupied
645645
*/
646+
std::unique_lock<nav2_costmap_2d::Costmap2D::mutex_t> lock(*(costmap_->getMutex()));
646647
unsigned int mx = 0;
647648
unsigned int my = 0;
648649
for (unsigned int i = closest_point_index; i < request->path.poses.size(); ++i) {

0 commit comments

Comments
 (0)