Skip to content

Commit 4e94d65

Browse files
feat(behavior_path_sampling_planner): add sampling based planner to behavior path planner (autowarefoundation#810)
* Add sampling based planner params Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * update keep_last param Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * change priority of sampling based planner Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * Set parameters for frenet planner Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * changes for testing Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * change curvature weight for testing Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * tuning params Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * tuning Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * for integ w/ other modules Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * add support for soft constraints weight reconfig Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * rebase Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * temp Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * update default params Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * Tune params Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * Set defaults back to normal Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * fix name of ablc Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * formatting fix Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * set verbose to false Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> --------- Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp>
1 parent 4357093 commit 4e94d65

File tree

4 files changed

+53
-0
lines changed

4 files changed

+53
-0
lines changed

autoware_launch/config/planning/preset/default_preset.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ launch:
99
- arg:
1010
name: launch_dynamic_avoidance_module
1111
default: "false"
12+
- arg:
13+
name: launch_sampling_planner_module
14+
default: "false" # Warning, experimental module, use only in simulations
1215
- arg:
1316
name: launch_lane_change_right_module
1417
default: "true"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/**:
2+
ros__parameters:
3+
common:
4+
output_delta_arc_length: 0.5 # [m] delta arc length for output trajectory
5+
6+
debug:
7+
enable_calculation_time_info: false # flag to print calculation times
8+
id: 0 # id of the candidate paths for which to print/show details (e.g., footprint in rviz)
9+
10+
preprocessing:
11+
force_zero_initial_deviation: True # if true, initial planning starts from the reference path
12+
force_zero_initial_heading: True # if true, initial planning starts with a heading aligned with the reference path
13+
smooth_reference_trajectory: False # if true, the reference trajectory is smoothed before being used for planning
14+
constraints:
15+
hard:
16+
max_curvature: 3.0 # [m⁻¹] maximum curvature of a sampled path
17+
min_curvature: -3.0 # [m⁻¹] minimum curvature of a sampled path
18+
soft:
19+
lateral_deviation_weight: 1.0 # cost weight for lateral deviation between the end of a sampled path and the reference path
20+
length_weight: 1.0 # cost weight for the length of a sampled path
21+
curvature_weight: 2000.0 # cost weight for the curvature of a sampled path
22+
weights: [0.5,1.0,20.0]
23+
sampling:
24+
enable_frenet: True
25+
enable_bezier: False
26+
resolution: 0.5 # [m] target distance between sampled path points
27+
previous_path_reuse_points_nb: 2 # number of points reused from the previously generated path (0:no reuse, 1:replan from end of prev path, 2: end and mid of prev path, etc)
28+
target_lengths: [20.0, 40.0] # [m] target lengths of the sampled paths
29+
nb_target_lateral_positions: 0 # number of lateral positions to use for sampling (in addition to 0.0 and the current lateral deviation)
30+
target_lateral_positions: [-4.5,-2.5, 0.0, 2.5,4.5] # manual values that are only used if nb_target_lateral_positions = 0
31+
frenet: # target values for the sampled "lateral deviation over longitudinal position" polynomial
32+
target_lateral_velocities: [-0.5, 0.0, 0.5]
33+
target_lateral_accelerations: [0.0]
34+
# bezier:
35+
# nb_k: 3 # number of sampled curvature values
36+
# mk_min: 0.0 # minimum curvature value
37+
# mk_max: 10.0 # maximum curvature value
38+
# nb_t: 5 # number of sampled acceleration values
39+
# mt_min: 0.3 # minimum acceleration value
40+
# mt_max: 1.7 # maximum acceleration value

autoware_launch/config/planning/scenario_planning/lane_driving/behavior_planning/behavior_path_planner/scene_module_manager.param.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,12 @@
8282
keep_last: true
8383
priority: 7
8484
max_module_size: 1
85+
86+
sampling_planner:
87+
enable_module: true
88+
enable_rtc: false
89+
enable_simultaneous_execution_as_approved_module: false
90+
enable_simultaneous_execution_as_candidate_module: false
91+
keep_last: false
92+
priority: 16
93+
max_module_size: 1

autoware_launch/launch/components/tier4_planning_component.launch.xml

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
<arg name="behavior_path_planner_side_shift_module_param_path" value="$(var behavior_path_config_path)/side_shift/side_shift.param.yaml"/>
2828
<arg name="behavior_path_planner_avoidance_module_param_path" value="$(var behavior_path_config_path)/avoidance/avoidance.param.yaml"/>
2929
<arg name="behavior_path_planner_avoidance_by_lc_module_param_path" value="$(var behavior_path_config_path)/avoidance_by_lane_change/avoidance_by_lane_change.param.yaml"/>
30+
<arg name="behavior_path_planner_sampling_planner_module_param_path" value="$(var behavior_path_config_path)/sampling_planner/sampling_planner.param.yaml"/>
3031
<arg name="behavior_path_planner_dynamic_avoidance_module_param_path" value="$(var behavior_path_config_path)/dynamic_avoidance/dynamic_avoidance.param.yaml"/>
3132
<arg name="behavior_path_planner_lane_change_module_param_path" value="$(var behavior_path_config_path)/lane_change/lane_change.param.yaml"/>
3233
<arg name="behavior_path_planner_goal_planner_module_param_path" value="$(var behavior_path_config_path)/goal_planner/goal_planner.param.yaml"/>

0 commit comments

Comments
 (0)