Skip to content

Commit

Permalink
fix: unlock mutex_pd while running the behavior tree (autowarefoundat…
Browse files Browse the repository at this point in the history
…ion#66)

Signed-off-by: tomoya.kimura <tomoya.kimura@tier4.jp>
  • Loading branch information
tkimura4 authored Jun 14, 2022
1 parent 8abfe07 commit 4c6de46
Showing 1 changed file with 0 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,6 @@ void BehaviorPathPlannerNode::run()

// NOTE: planner_data must not be referenced for multithreading
const auto planner_data = planner_data_;
mutex_pd_.unlock();

// run behavior planner
const auto output = bt_manager_->run(planner_data);
Expand All @@ -499,7 +498,6 @@ void BehaviorPathPlannerNode::run()
const auto path_candidate = getPathCandidate(output, planner_data);

// update planner data
mutex_pd_.lock(); // for planner_data_
planner_data_->prev_output_path = path;
mutex_pd_.unlock();

Expand Down

0 comments on commit 4c6de46

Please sign in to comment.