Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(behavior_path_planner): fix planner data copy #2501

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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