Skip to content

Commit

Permalink
Fix missing mutex in PlannerServer::isPathValid (#3756)
Browse files Browse the repository at this point in the history
Signed-off-by: ymd-stella <world.applepie@gmail.com>
  • Loading branch information
ymd-stella committed Aug 16, 2023
1 parent 4b6ddeb commit b6f3b02
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions nav2_planner/src/planner_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,7 @@ void PlannerServer::isPathValid(
* The lethal check starts at the closest point to avoid points that have already been passed
* and may have become occupied
*/
std::unique_lock<nav2_costmap_2d::Costmap2D::mutex_t> lock(*(costmap_->getMutex()));
unsigned int mx = 0;
unsigned int my = 0;
for (unsigned int i = closest_point_index; i < request->path.poses.size(); ++i) {
Expand Down

0 comments on commit b6f3b02

Please sign in to comment.