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): resample output path (backport #1604) #782

Merged
merged 1 commit into from
Sep 19, 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 @@ -14,3 +14,4 @@
drivable_area_margin: 6.0
refine_goal_search_radius_range: 7.5
intersection_search_distance: 30.0
path_interval: 2.0
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@
refine_goal_search_radius_range: 7.5
intersection_search_distance: 30.0

path_interval: 2.0

visualize_drivable_area_for_shared_linestrings_lanelet: true
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ struct BehaviorPathPlannerParameters
double turn_light_on_threshold_dis_long;
double turn_light_on_threshold_time;

double path_interval;

// vehicle info
double wheel_base;
double front_overhang;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ BehaviorPathPlannerParameters BehaviorPathPlannerNode::getCommonParam()
p.turn_light_on_threshold_dis_lat = declare_parameter("turn_light_on_threshold_dis_lat", 0.3);
p.turn_light_on_threshold_dis_long = declare_parameter("turn_light_on_threshold_dis_long", 10.0);
p.turn_light_on_threshold_time = declare_parameter("turn_light_on_threshold_time", 3.0);
p.path_interval = declare_parameter<double>("path_interval");
p.visualize_drivable_area_for_shared_linestrings_lanelet =
declare_parameter("visualize_drivable_area_for_shared_linestrings_lanelet", true);

Expand Down Expand Up @@ -535,7 +536,10 @@ PathWithLaneId::SharedPtr BehaviorPathPlannerNode::getPath(const BehaviorModuleO
path->header.stamp = this->now();
RCLCPP_DEBUG(
get_logger(), "BehaviorTreeManager: output is %s.", bt_output.path ? "FOUND" : "NOT FOUND");
return path;

const auto resampled_path =
util::resamplePathWithSpline(*path, planner_data_->parameters.path_interval);
return std::make_shared<PathWithLaneId>(resampled_path);
}

PathWithLaneId::SharedPtr BehaviorPathPlannerNode::getPathCandidate(
Expand Down