From 7c832e6b3d3dd30454476a2110064b6929120006 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 30 Oct 2023 13:41:26 -0700 Subject: [PATCH] Update theta_star_planner.cpp (#3918) (#3922) (cherry picked from commit 0629ff36e36ecc135b9b13fc78f213cfe0a361ef) Co-authored-by: Steve Macenski --- nav2_theta_star_planner/src/theta_star_planner.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nav2_theta_star_planner/src/theta_star_planner.cpp b/nav2_theta_star_planner/src/theta_star_planner.cpp index c509afb065c..f93eaa44d73 100644 --- a/nav2_theta_star_planner/src/theta_star_planner.cpp +++ b/nav2_theta_star_planner/src/theta_star_planner.cpp @@ -91,6 +91,8 @@ nav_msgs::msg::Path ThetaStarPlanner::createPlan( nav_msgs::msg::Path global_path; auto start_time = std::chrono::steady_clock::now(); + std::unique_lock lock(*(planner_->costmap_->getMutex())); + // Corner case of start and goal beeing on the same cell unsigned int mx_start, my_start, mx_goal, my_goal; if (!planner_->costmap_->worldToMap(