Skip to content

Commit

Permalink
fix(behavior_path_planner): fix planner data copy (autowarefoundation…
Browse files Browse the repository at this point in the history
…#2501)

Signed-off-by: yutaka <purewater0901@gmail.com>

Signed-off-by: yutaka <purewater0901@gmail.com>
  • Loading branch information
purewater0901 authored Dec 14, 2022
1 parent 0c6c46b commit ed992b1
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,11 @@ void BehaviorPathPlannerNode::run()
// update planner data
planner_data_->self_pose = self_pose_listener_.getCurrentPose();

const auto planner_data = planner_data_;
const auto planner_data = std::make_shared<PlannerData>(*planner_data_);

// unlock planner data
mutex_pd_.unlock();

// run behavior planner
const auto output = bt_manager_->run(planner_data);

Expand All @@ -631,9 +635,6 @@ void BehaviorPathPlannerNode::run()
// compute turn signal
computeTurnSignal(planner_data, *path, output);

// unlock planner data
mutex_pd_.unlock();

// publish drivable bounds
publish_bounds(*path);

Expand Down

0 comments on commit ed992b1

Please sign in to comment.