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

feat(behavior_path_planner): add option for combining arc pull out paths #2669

Merged
merged 2 commits into from
Jan 17, 2023
Merged
Show file tree
Hide file tree
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 @@ -16,6 +16,7 @@
deceleration_interval: 15.0
# geometric pull out
enable_geometric_pull_out: true
divide_pull_out_path: false
geometric_pull_out_velocity: 1.0
arc_path_interval: 1.0
lane_departure_margin: 0.2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ struct PullOutParameters
double deceleration_interval;
// geometric pull out
bool enable_geometric_pull_out;
bool divide_pull_out_path;
double geometric_pull_out_velocity;
double arc_path_interval;
double lane_departure_margin;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,7 @@ PullOutParameters BehaviorPathPlannerNode::getPullOutParam()
p.deceleration_interval = dp("deceleration_interval", 10.0);
// geometric pull out
p.enable_geometric_pull_out = dp("enable_geometric_pull_out", true);
p.divide_pull_out_path = dp("divide_pull_out_path", false);
p.geometric_pull_out_velocity = dp("geometric_pull_out_velocity", 1.0);
p.arc_path_interval = dp("arc_path_interval", 1.0);
p.lane_departure_margin = dp("lane_departure_margin", 0.2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,17 @@ boost::optional<PullOutPath> GeometricPullOut::plan(Pose start_pose, Pose goal_p
return {};
}

output.partial_paths = planner_.getPaths();
if (parameters_.divide_pull_out_path) {
output.partial_paths = planner_.getPaths();
} else {
const auto partial_paths = planner_.getPaths();
auto combined_path = combineReferencePath(partial_paths.at(0), partial_paths.at(1));
// set same velocity to all points not to stop
for (auto & point : combined_path.points) {
point.point.longitudinal_velocity_mps = parameters_.geometric_pull_out_velocity;
}
output.partial_paths.push_back(combined_path);
}
output.start_pose = planner_.getArcPaths().at(0).points.back().point.pose;
output.end_pose = planner_.getArcPaths().at(1).points.back().point.pose;

Expand Down