diff --git a/docs/design/autoware-architecture/planning/image/high-level-planning-diagram-miyake-reviewed.drawio.svg b/docs/design/autoware-architecture/planning/image/high-level-planning-diagram-miyake-reviewed.drawio.svg new file mode 100644 index 00000000000..8129b30d350 --- /dev/null +++ b/docs/design/autoware-architecture/planning/image/high-level-planning-diagram-miyake-reviewed.drawio.svg @@ -0,0 +1,832 @@ + + + + + + + +
+
+
+
+ Legend +
+
+
+
+ + Legend + +
+
+ + + + + +
+
+
+ API Layer +
+
+
+
+ + API Layer + +
+
+ + + + + + + +
+
+
+ Control Component +
+
+
+
+ + Control Component + +
+
+ + + + + + +
+
+
+ Planning (Sub) Components +
+
+
+
+ + Planning (Sub) Components + +
+
+ + + + +
+
+
+ Planning Modules +
+
+
+
+ + Planning Modules + +
+
+ + + + +
+
+
+ Other Components +
+
+
+
+ + Other Components + +
+
+ + + + + + + +
+
+
+
+ Localization +
+
+ Component +
+
+
+
+
+ + Localization... + +
+
+ + + + + +
+
+
+ Perception +
+ Component +
+
+
+
+ + Perception... + +
+
+ + + + + + + +
+
+
+ Human +
+ Machine +
+ Interface +
+
+
+
+ + Human... + +
+
+ + + + + + + +
+
+
+ + Mission Planning + +
+
+
+
+ + Mission Planning + +
+
+ + + + + +
+
+
+ +
+
+
+
+
+
+
+ + ... + +
+
+ + + + + + +
+
+
+ + Behavior + +
+
+
+
+ + Behavior + +
+
+ + + + +
+
+
+ + Motion + +
+
+
+
+ + Motion + +
+
+ + + + + +
+
+
+ + Validation + +
+
+
+
+ + Validation + +
+
+ + + + +
+
+
+ + Planning Component + +
+
+
+
+ + Planning Component + +
+
+ + + + + +
+
+
+
+ System +
+
+ Component +
+
+
+
+
+ + System... + +
+
+ + + + + +
+
+
+ Map +
+ Component +
+
+
+
+ + Map... + +
+
+ + + + + +
+
+
+
+ Lane Change +
+
+
+
+
+ + Lane Change + +
+
+ + + + + +
+
+
+
+ Intersection +
+
+
+
+
+ + Intersection + +
+
+ + + + + +
+
+
+
+ Crosswalk +
+
+
+
+
+ + Crosswalk + +
+
+ + + + + +
+
+
+
+ etc... +
+
+
+
+
+ + etc... + +
+
+ + + + + +
+
+
+
+ Path Planning +
+
+
+
+
+ + Path Planning + +
+
+ + + + + +
+
+
+
+ Velocity Planning +
+
+
+
+
+ + Velocity Planning + +
+
+ + + + + +
+
+
+
+ Obstacle Stop +
+
+
+
+
+ + Obstacle Stop + +
+
+ + + + + +
+
+
+
+ ML Planner +
+
+
+
+
+ + ML Planner + +
+
+ + + + + + + + + + + + + +
+
+
+
+ Route Planning +
+
+
+
+
+ + Route Planning + +
+
+ + + + + +
+
+
+
+ Avoidance +
+
+
+
+
+ + Avoidance + +
+
+ + + + + +
+
+
+
+ Pull Over +
+
+
+
+
+ + Pull Over + +
+
+ + + + + +
+
+
+
+ Drivable Area +
+
+
+
+
+ + Drivable Area + +
+
+ + + + + +
+
+
+
+ Slow Down +
+
+
+
+
+ + Slow Down + +
+
+ + + + + +
+
+
+
+ Stop Line +
+
+
+
+
+ + Stop Line + +
+
+ + + + + +
+
+
+
+ Parking +
+
+
+
+
+ + Parking + +
+
+ + + + + +
+
+
+
+ Freespace +
+
+
+
+
+ + Freespace + +
+
+ + + + + +
+
+
+
+ etc... +
+
+
+
+
+ + etc... + +
+
+ + + + + + + +
+
+
+
+ Goal Planning +
+
+
+
+
+ + Goal Planning + +
+
+ + + + + +
+
+
+
+ etc... +
+
+
+
+
+ + etc... + +
+
+ + + + + +
+
+
+
+ Collision Check +
+
+
+
+
+ + Collision Check + +
+
+ + + + + +
+
+
+
+ TTC Check +
+
+
+
+
+ + TTC Check + +
+
+ + + + + +
+
+
+
+ etc... +
+
+
+
+
+ + etc... + +
+
+ + + + + +
+
+
+
+ Confortability +
+
+
+
+
+ + Confortability + +
+
+ + + + + + +
+ + + + + Text is not SVG - cannot display + + + +
\ No newline at end of file diff --git a/docs/design/autoware-architecture/planning/image/high-level-planning-diagram.drawio.svg b/docs/design/autoware-architecture/planning/image/high-level-planning-diagram.drawio.svg index bbf860704b2..f83c6c25a09 100644 --- a/docs/design/autoware-architecture/planning/image/high-level-planning-diagram.drawio.svg +++ b/docs/design/autoware-architecture/planning/image/high-level-planning-diagram.drawio.svg @@ -1,6 +1,24 @@ - + + + + + +
+
+
+
+ Legend +
+
+
+
+ + Legend + +
+
@@ -67,11 +85,11 @@
- + -
+
API Layer @@ -79,21 +97,21 @@
- + API Layer - - - - - - + + + + + + -
+
@@ -103,16 +121,16 @@
- + Mission Planning - + -
+
@@ -123,16 +141,16 @@
- + Scenario Planning - + -
+
@@ -143,18 +161,18 @@
- + Lane Driving Scenario - - - + + + -
+
@@ -165,18 +183,18 @@
- + Parking Scenario - - - + + + -
+
@@ -186,18 +204,18 @@
- + Behavior Planning - - - + + + -
+
@@ -207,18 +225,18 @@
- + Motion Planning - - - + + + -
+
@@ -228,16 +246,16 @@
- + Validation - + -
+
Control Component @@ -245,7 +263,7 @@
- + Control Component @@ -270,8 +288,8 @@ - - + + @@ -315,11 +333,11 @@ - + -
+
@@ -329,16 +347,16 @@
- + Lane Change - + -
+
@@ -348,16 +366,16 @@
- + Intersection - + -
+
@@ -367,16 +385,16 @@
- + Crosswalk - + -
+
@@ -386,16 +404,16 @@
- + etc... - + -
+
@@ -405,16 +423,16 @@
- + Path Smooth - + -
+
@@ -424,16 +442,16 @@
- + Velocity Smooth - + -
+
@@ -443,16 +461,16 @@
- + Collision Check - + -
+
@@ -462,16 +480,16 @@
- + etc... - + -
+
@@ -481,16 +499,16 @@
- + Free Space - + -
+
@@ -500,16 +518,16 @@
- + Cost map - + -
+
@@ -519,7 +537,7 @@
- + etc... @@ -532,41 +550,187 @@ - + -
+
- Trajectory Validation + Route Planning
- - Trajectory Validation + + Route Planning - + -
+
- Route Planning + Avoidance
- - Route Planning + + Avoidance + + + + + + + +
+
+
+
+ Pull Over +
+
+
+
+
+ + Pull Over + +
+
+ + + + +
+
+
+
+ Drivable Area +
+
+
+
+
+ + Drivable Area + +
+
+ + + + +
+
+
+
+ Slow Down +
+
+
+
+
+ + Slow Down + +
+
+ + + + +
+
+
+
+ TTC Check +
+
+
+
+
+ + TTC Check + +
+
+ + + + +
+
+
+
+ ACC Check +
+
+
+
+
+ + ACC Check + +
+
+ + + + +
+
+
+ Planning (Sub) Components +
+
+
+
+ + Planning (Sub) Components + +
+
+ + + + +
+
+
+ Planning Modules +
+
+
+
+ + Planning Modules + +
+
+ + + + +
+
+
+ Other Components +
+
+
+
+ + Other Components
diff --git a/docs/design/autoware-architecture/planning/image/how-to-add-new-modules.drawio.svg b/docs/design/autoware-architecture/planning/image/how-to-add-new-modules.drawio.svg new file mode 100644 index 00000000000..255e7a3cef1 --- /dev/null +++ b/docs/design/autoware-architecture/planning/image/how-to-add-new-modules.drawio.svg @@ -0,0 +1,1755 @@ + + + + + + + +
+
+
+ Replace the entier planning component +
+
+
+
+ + Replace the entier planning component + +
+
+ + + + +
+
+
+ Replace the planning sub-component, +
+ or add a new scenario component +
+
+
+
+ + Replace the planning sub-component,... + +
+
+ + + + +
+
+
+ Add or replace with new planning modules +
+
+
+
+ + Add or replace with new planning modules + +
+
+ + + + + +
+
+
+ API Layer +
+
+
+
+ + API Layer + +
+
+ + + + + + + +
+
+
+ Control Component +
+
+
+
+ + Control Component + +
+
+ + + + + + + + + + +
+
+
+
+ Localization +
+
+ Component +
+
+
+
+
+ + Localization... + +
+
+ + + + + +
+
+
+ Perception +
+ Component +
+
+
+
+ + Perception... + +
+
+ + + + + + + +
+
+
+ Human +
+ Machine +
+ Interface +
+
+
+
+ + Human... + +
+
+ + + + + + +
+
+
+ + Planning Component + +
+
+
+
+ + Planning Component + +
+
+ + + + + +
+
+
+
+ System +
+
+ Component +
+
+
+
+
+ + System... + +
+
+ + + + + +
+
+
+ Map +
+ Component +
+
+
+
+ + Map... + +
+
+ + + + + + + + + + + + +
+
+
+ + + Third-party Planning Component + + +
+
+
+
+ + Third-party Planning Component + +
+
+ + + + + + + + + +
+
+
+ API Layer +
+
+
+
+ + API Layer + +
+
+ + + + + + + +
+
+
+ Control Component +
+
+
+
+ + Control Component + +
+
+ + + + + + + + + +
+
+
+
+ Localization +
+
+ Component +
+
+
+
+
+ + Localization... + +
+
+ + + + + +
+
+
+ Perception +
+ Component +
+
+
+
+ + Perception... + +
+
+ + + + + + + +
+
+
+ Human +
+ Machine +
+ Interface +
+
+
+
+ + Human... + +
+
+ + + + + + + +
+
+
+ +
+
+
+
+
+
+
+ + ... + +
+
+ + + + + + +
+
+
+ + Behavior + +
+
+
+
+ + Behavior + +
+
+ + + + +
+
+
+ + Motion + +
+
+
+
+ + Motion + +
+
+ + + + + +
+
+
+ + Validation + +
+
+
+
+ + Validation + +
+
+ + + + +
+
+
+ + Planning Component + +
+
+
+
+ + Planning Component + +
+
+ + + + + +
+
+
+
+ System +
+
+ Component +
+
+
+
+
+ + System... + +
+
+ + + + + +
+
+
+ Map +
+ Component +
+
+
+
+ + Map... + +
+
+ + + + + +
+
+
+
+ Lane Change +
+
+
+
+
+ + Lane Change + +
+
+ + + + + +
+
+
+
+ Intersection +
+
+
+
+
+ + Intersection + +
+
+ + + + + +
+
+
+
+ Crosswalk +
+
+
+
+
+ + Crosswalk + +
+
+ + + + + +
+
+
+
+ etc... +
+
+
+
+
+ + etc... + +
+
+ + + + + +
+
+
+
+ Path Planning +
+
+
+
+
+ + Path Planning + +
+
+ + + + + +
+
+
+
+ Velocity Planning +
+
+
+
+
+ + Velocity Planning + +
+
+ + + + + +
+
+
+
+ Obstacle Stop +
+
+
+
+
+ + Obstacle Stop + +
+
+ + + + + +
+
+
+
+ ML Planner +
+
+
+
+
+ + ML Planner + +
+
+ + + + + + + + + + + + + +
+
+
+
+ Avoidance +
+
+
+
+
+ + Avoidance + +
+
+ + + + + +
+
+
+
+ Pull Over +
+
+
+
+
+ + Pull Over + +
+
+ + + + + +
+
+
+
+ Drivable Area +
+
+
+
+
+ + Drivable Area + +
+
+ + + + + +
+
+
+
+ Slow Down +
+
+
+
+
+ + Slow Down + +
+
+ + + + + +
+
+
+
+ Stop Line +
+
+
+
+
+ + Stop Line + +
+
+ + + + + +
+
+
+
+ Parking +
+
+
+
+
+ + Parking + +
+
+ + + + + +
+
+
+
+ Freespace +
+
+
+
+
+ + Freespace + +
+
+ + + + + +
+
+
+
+ etc... +
+
+
+
+
+ + etc... + +
+
+ + + + + + + +
+
+
+
+ Collision Check +
+
+
+
+
+ + Collision Check + +
+
+ + + + + +
+
+
+
+ TTC Check +
+
+
+
+
+ + TTC Check + +
+
+ + + + + +
+
+
+
+ etc... +
+
+
+
+
+ + etc... + +
+
+ + + + + +
+
+
+
+ Confortability +
+
+
+
+
+ + Confortability + +
+
+ + + + + +
+
+
+ + + Third-party Planning Component + + +
+
+
+
+ + Third-party Planning Component + +
+
+ + + + + + + + + + +
+
+
+ API Layer +
+
+
+
+ + API Layer + +
+
+ + + + + + + +
+
+
+ Control Component +
+
+
+
+ + Control Component + +
+
+ + + + + + + + + +
+
+
+
+ Localization +
+
+ Component +
+
+
+
+
+ + Localization... + +
+
+ + + + + +
+
+
+ Perception +
+ Component +
+
+
+
+ + Perception... + +
+
+ + + + + + + +
+
+
+ Human +
+ Machine +
+ Interface +
+
+
+
+ + Human... + +
+
+ + + + + + + +
+
+
+ + Mission Planning + +
+
+
+
+ + Mission Planning + +
+
+ + + + + +
+
+
+ +
+
+
+
+
+
+
+ + ... + +
+
+ + + + + + +
+
+
+ + Behavior + +
+
+
+
+ + Behavior + +
+
+ + + + +
+
+
+ + Motion + +
+
+
+
+ + Motion + +
+
+ + + + + +
+
+
+ + Validation + +
+
+
+
+ + Validation + +
+
+ + + + +
+
+
+ + Planning Component + +
+
+
+
+ + Planning Component + +
+
+ + + + + +
+
+
+
+ System +
+
+ Component +
+
+
+
+
+ + System... + +
+
+ + + + + +
+
+
+ Map +
+ Component +
+
+
+
+ + Map... + +
+
+ + + + + +
+
+
+
+ Lane Change +
+
+
+
+
+ + Lane Change + +
+
+ + + + + +
+
+
+
+ Intersection +
+
+
+
+
+ + Intersection + +
+
+ + + + + +
+
+
+
+ Crosswalk +
+
+
+
+
+ + Crosswalk + +
+
+ + + + + +
+
+
+
+ Path Planning +
+
+
+
+
+ + Path Planning + +
+
+ + + + + +
+
+
+
+ Velocity Planning +
+
+
+
+
+ + Velocity Planning + +
+
+ + + + + +
+
+
+
+ Obstacle Stop +
+
+
+
+
+ + Obstacle Stop + +
+
+ + + + + +
+
+
+
+ + Third-party Module + +
+
+
+
+
+
+ + Third-party Modu... + +
+
+ + + + + + + + + + + + + +
+
+
+
+ Route Planning +
+
+
+
+
+ + Route Planning + +
+
+ + + + + +
+
+
+
+ Avoidance +
+
+
+
+
+ + Avoidance + +
+
+ + + + + +
+
+
+
+ Pull Over +
+
+
+
+
+ + Pull Over + +
+
+ + + + + +
+
+
+
+ Drivable Area +
+
+
+
+
+ + Drivable Area + +
+
+ + + + + +
+
+
+
+ Slow Down +
+
+
+
+
+ + Slow Down + +
+
+ + + + + +
+
+
+
+ Stop Line +
+
+
+
+
+ + Stop Line + +
+
+ + + + + +
+
+
+ Third-party Module +
+
+
+
+ + Third-party Module + +
+
+ + + + + +
+
+
+
+ Freespace +
+
+
+
+
+ + Freespace + +
+
+ + + + + +
+
+
+
+ etc... +
+
+
+
+
+ + etc... + +
+
+ + + + + + + +
+
+
+
+ Goal Planning +
+
+
+
+
+ + Goal Planning + +
+
+ + + + + +
+
+
+
+ etc... +
+
+
+
+
+ + etc... + +
+
+ + + + + +
+
+
+
+ Collision Check +
+
+
+
+
+ + Collision Check + +
+
+ + + + + +
+
+
+
+ TTC Check +
+
+
+
+
+ + TTC Check + +
+
+ + + + + +
+
+
+
+ etc... +
+
+
+
+
+ + etc... + +
+
+ + + + + +
+
+
+
+ Third-party Module +
+
+
+
+
+
+ + Third-party Module + +
+
+ + + + + + + + + + +
+
+
+
+ My Module 1 +
+
+
+
+
+ + My Module 1 + +
+
+ + + + + +
+
+
+
+ My Module 2 +
+
+
+
+
+ + My Module 2 + +
+
+ + + + + +
+
+
+
+ My Module 3 +
+
+
+
+
+ + My Module 3 + +
+
+
+ + + + + Text is not SVG - cannot display + + + +
\ No newline at end of file diff --git a/docs/design/autoware-architecture/planning/image/planning-diagram-tmp.drawio.svg b/docs/design/autoware-architecture/planning/image/planning-diagram-tmp.drawio.svg new file mode 100644 index 00000000000..a0bf68c99c2 --- /dev/null +++ b/docs/design/autoware-architecture/planning/image/planning-diagram-tmp.drawio.svg @@ -0,0 +1,1600 @@ + + + + + + + + + + + + + + +
+
+
+ Parking Scenario +
+
+
+
+ + Parking Scenario + +
+
+ + + + + + + +
+
+
+ route +
+
+
+
+ + route + +
+
+ + + + + +
+
+
+ mission_planner +
+
+
+
+ + mission_planner + +
+
+
+ + + + + +
+
+
+ path_with_lane_id +
+
+
+
+ + path_with_lane_id + +
+
+ + + + + + + + +
+
+
+ path +
+
+
+
+ + path + +
+
+ + + + + + + + +
+
+
+ Trajectory +
+
+
+
+ + Trajectory + +
+
+ + + + + +
+
+
+ obstacle_ +
+ avoidance_planner +
+
+
+
+ + obstacle_... + +
+
+
+ + + + + +
+
+
+ Trajectory +
+
+
+
+ + Trajectory + +
+
+ + + + + +
+
+
+ obstacle_velocity_limiter +
+
+
+
+ + obstacle_velocity_limiter + +
+
+
+ + + + + +
+
+
+ Trajectory +
+
+
+
+ + Trajectory + +
+
+ + + + + + + + +
+
+
+ Trajectory +
+
+
+
+ + Trajectory + +
+
+ + + + + +
+
+
+ scenario_selector +
+
+
+
+ + scenario_selector + +
+
+
+ + + + + +
+
+
+ + Trajectory + +
+
+
+
+ + Trajectory + +
+
+ + + + + +
+
+
+ motion_velocity_ +
+ smoother +
+
+
+
+ + motion_velocity_... + +
+
+
+ + + + + +
+
+
+ Trajectory +
+
+
+
+ + Trajectory + +
+
+ + + + + +
+
+
+ freespace_planner +
+
+
+
+ + freespace_planner + +
+
+
+ + + + + +
+
+
+ occupancy_grid +
+
+
+
+ + occupancy_grid + +
+
+ + + + + +
+
+
+ costmap_generator +
+
+
+
+ + costmap_generator + +
+
+
+ + + + +
+
+
+ behavior +
+ velocity +
+ planner +
+
+
+
+ + behavior... + +
+
+ + + + +
+
+
+ behavior +
+ path +
+ planner +
+
+
+
+ + behavior... + +
+
+ + + + + +
+
+
+ goal +
+
+
+
+ + goal + +
+
+ + + + + + +
+
+
+ obstacle +
+ stop +
+ planner +
+
+
+
+ + obstacle... + +
+
+ + + + +
+
+
+ slow_down +
+
+
+
+ + slow_down + +
+
+ + + + +
+
+
+ adaptive_cruise +
+
+
+
+ + adaptive_cruise + +
+
+ + + + +
+
+
+ stop +
+
+
+
+ + stop + +
+
+ + + + +
+
+
+ LaneDriving Scenario +
+
+
+
+ + LaneDriving Sce... + +
+
+ + + + +
+
+
+ + + Behavior Planning + + +
+
+
+
+ + Behavior Planning + +
+
+ + + + +
+
+
+ + + Motion Planning + + +
+
+
+
+ + Motion Planning + +
+
+ + + + + + + + +
+
+
+ To Control +
+
+
+
+ + To Control + +
+
+ + + + + +
+
+
+ vector_map +
+
+
+
+ + vector_map + +
+
+ + + + + +
+
+
+ Dynamic Objects +
+
+
+
+ + Dynamic Objects + +
+
+ + + + + +
+
+
+ Dynamic Objects +
+
+
+
+ + Dynamic Objects + +
+
+ + + + + +
+
+
+ Dynamic Objects +
+
+
+
+ + Dynamic Objects + +
+
+ + + + + +
+
+
+ Dynamic Objects +
+
+
+
+ + Dynamic Objects + +
+
+ + + + + +
+
+
+ Obstacle Points +
+
+
+
+ + Obstacle Points + +
+
+ + + + + +
+
+
+ Obstacle Points +
+
+
+
+ + Obstacle Points + +
+
+ + + + + +
+
+
+ Dynamic Objects +
+
+
+
+ + Dynamic Objects + +
+
+ + + + + +
+
+
+ Obstacle Points +
+
+
+
+ + Obstacle Points + +
+
+ + + + + +
+
+
+ route (from mission_planner) +
+
+
+
+ + route (from mission_planner) + +
+
+ + + + + + + +
+
+
+ vehicle_state +
+
+
+
+ + vehicle_state + +
+
+ + + + +
+
+
+
+ Localization +
+
+
+
+
+ + Localization + +
+
+ + + + + +
+
+
+ approval, +
+ force_approval +
+
+
+
+ + approval,... + +
+
+ + + + + +
+
+
+ external_crosswalk_states, +
+ external_intersection_states, +
+ external_traffic_light_states +
+
+
+
+ + external_crosswalk_states,... + +
+
+ + + + +
+
+
+ Planning +
+
+
+
+ + Planning + +
+
+ + + + + +
+
+
+ Traffic Light States +
+
+
+
+ + Traffic Light States + +
+
+ + + + + +
+
+
+ expand_stop_range +
+
+
+
+ + expand_stop_range + +
+
+ + + + +
+
+
+ Perception +
+
+
+
+ + Perception + +
+
+ + + + + +
+
+
+ velocity_limit +
+
+
+
+ + velocity_limit + +
+
+ + + + +
+
+
+ Human +
+ Machine +
+ Interface +
+
+
+
+ + Human... + +
+
+ + + + + + + + +
+
+
+ external_velocity +
+ _limit_selector +
+
+
+
+ + external_velocity... + +
+
+ + + + + +
+
+
+ velocity_limit +
+
+
+
+
+ + velocity_l... + +
+
+ + + + +
+
+
+ avoidance +
+
+
+
+ + avoidance + +
+
+ + + + +
+
+
+ side_shift +
+
+
+
+ + side_shift + +
+
+ + + + +
+
+
+ lane_change +
+
+
+
+ + lane_change + +
+
+ + + + +
+
+
+ lane_following +
+
+
+
+ + lane_following + +
+
+ + + + +
+
+
+ pull_over +
+
+
+
+ + pull_over + +
+
+ + + + +
+
+
+ pull_out +
+
+
+
+ + pull_out + +
+
+ + + + +
+
+
+ blind_spot +
+
+
+
+ + blind_spot + +
+
+ + + + +
+
+
+ cross_walk +
+
+
+
+ + cross_walk + +
+
+ + + + +
+
+
+ stop_line +
+
+
+
+ + stop_line + +
+
+ + + + +
+
+
+ traffic_light +
+
+
+
+ + traffic_light + +
+
+ + + + +
+
+
+ intersection +
+
+
+
+ + intersection + +
+
+ + + + +
+
+
+ detection_area +
+
+
+
+ + detection_area + +
+
+ + + + +
+
+
+ no_stopping_area +
+
+
+
+ + no_stopping_area + +
+
+ + + + +
+
+
+ virtual_traffic_light +
+
+
+
+ + virtual_traffic_light + +
+
+ + + + +
+
+
+ occlusion_spot +
+
+
+
+ + occlusion_spot + +
+
+ + + + +
+
+
+ run_out +
+
+
+
+ + run_out + +
+
+ + + + + +
+
+
+ check_point +
+
+
+
+ + check_point + +
+
+ + + + + +
+
+
+ vector_map +
+
+
+
+ + vector_map + +
+
+ + + + + +
+
+
+ surround_obstacle_checker +
+
+
+
+ + surround_obstacle_checker + +
+
+
+ + + + +
+
+
+ (from other planning modules) +
+
+
+
+ + (from othe... + +
+
+ + + + + +
+
+
+ Obstacle Points +
+
+
+
+ + Obstacle Points + +
+
+ + + + + +
+
+
+ Dynamic Objects +
+
+
+
+ + Dynamic Objects + +
+
+ + + + + +
+
+
+ + Trajectory + +
+
+
+
+ + Trajectory + +
+
+ + + + + +
+
+
+ planning_validator +
+
+
+
+ + planning_validator + +
+
+
+ + + + +
+
+
+ API Layer +
+
+
+
+ + API Layer + +
+
+ + + + +
+
+
+ Map +
+
+
+
+ + Map + +
+
+ + + + +
+
+
+ Map +
+
+
+
+ + Map + +
+
+ + + + +
+
+
+ Perception +
+
+
+
+ + Perception + +
+
+ + + + +
+
+
+ Mission Planning +
+
+
+
+ + Mission Planning + +
+
+ + + + +
+
+
+ Validation +
+
+
+
+ + Validation + +
+
+ + + + +
+
+
+ no_drivable_lane +
+
+
+
+ + no_drivable_lane + +
+
+ + + + + +
+
+
+ Legend +
+
+
+
+ + Legend + +
+
+ + + + +
+
+
+ Component +
+
+
+
+ + Component + +
+
+ + + + +
+
+
+ ROS Node +
+
+
+
+ + ROS Node + +
+
+ + + + +
+
+
+ Modlue Plugin +
+
+
+
+ + Modlue Plugin + +
+
+
+ + + + + Text is not SVG - cannot display + + + +
\ No newline at end of file diff --git a/docs/design/autoware-architecture/planning/image/reference-implementation-add-new-modules.drawio.svg b/docs/design/autoware-architecture/planning/image/reference-implementation-add-new-modules.drawio.svg new file mode 100644 index 00000000000..95b32fd914e --- /dev/null +++ b/docs/design/autoware-architecture/planning/image/reference-implementation-add-new-modules.drawio.svg @@ -0,0 +1,1116 @@ + + + + + + + + + + + + + + +
+
+
+ Parking Scenario +
+
+
+
+ + Parking Scenario + +
+
+ + + + + +
+
+
+ mission_planner +
+
+
+
+ + mission_planner + +
+
+
+ + + + + +
+
+
+ path_with_lane_id +
+
+
+
+ + path_with_lane_id + +
+
+ + + + + + + + +
+
+
+ path +
+
+
+
+ + path + +
+
+ + + + + + + + +
+
+
+ Trajectory +
+
+
+
+ + Trajectory + +
+
+ + + + + +
+
+
+ obstacle_ +
+ avoidance_planner +
+
+
+
+ + obstacle_... + +
+
+
+ + + + + +
+
+
+ Trajectory +
+
+
+
+ + Trajectory + +
+
+ + + + + +
+
+
+ obstacle_velocity_limiter +
+
+
+
+ + obstacle_velocity_limiter + +
+
+
+ + + + + +
+
+
+ Trajectory +
+
+
+
+ + Trajectory + +
+
+ + + + + + + + +
+
+
+ Trajectory +
+
+
+
+ + Trajectory + +
+
+ + + + + +
+
+
+ scenario_selector +
+
+
+
+ + scenario_selector + +
+
+
+ + + + + +
+
+
+ + Trajectory + +
+
+
+
+ + Trajectory + +
+
+ + + + + +
+
+
+ motion_velocity_smoother +
+
+
+
+ + motion_velocity_smoother + +
+
+
+ + + + + +
+
+
+ Trajectory +
+
+
+
+ + Trajectory + +
+
+ + + + + +
+
+
+ freespace_planner +
+
+
+
+ + freespace_planner + +
+
+
+ + + + + +
+
+
+ occupancy_grid +
+
+
+
+ + occupancy_grid + +
+
+ + + + + +
+
+
+ costmap_generator +
+
+
+
+ + costmap_generator + +
+
+
+ + + + +
+
+
+ behavior +
+ velocity +
+ planner +
+
+
+
+ + behavior... + +
+
+ + + + +
+
+
+ behavior +
+ path +
+ planner +
+
+
+
+ + behavior... + +
+
+ + + + + +
+
+
+ goal +
+
+
+
+ + goal + +
+
+ + + + +
+
+
+ obstacle +
+ stop +
+ planner +
+
+
+
+ + obstacle... + +
+
+ + + + +
+
+
+ slow_down +
+
+
+
+ + slow_down + +
+
+ + + + +
+
+
+ adaptive_cruise +
+
+
+
+ + adaptive_cruise + +
+
+ + + + +
+
+
+ stop +
+
+
+
+ + stop + +
+
+ + + + +
+
+
+ LaneDriving Scenario +
+
+
+
+ + LaneDriving Sce... + +
+
+ + + + +
+
+
+ + + Behavior Planning + + +
+
+
+
+ + Behavior Planning + +
+
+ + + + +
+
+
+ + + Motion Planning + + +
+
+
+
+ + Motion Planning + +
+
+ + + + +
+
+
+ To Control +
+
+
+
+ + To Control + +
+
+ + + + + +
+
+
+ route (from mission_planner) +
+
+
+
+ + route (from mission_planner) + +
+
+ + + + + + +
+
+
+ external_velocity +
+ _limit_selector +
+
+
+
+ + external_velocity... + +
+
+ + + + + +
+
+
+ velocity_limit +
+
+
+
+
+ + velocity_l... + +
+
+ + + + +
+
+
+ New Module 1 +
+
+
+
+ + New Module 1 + +
+
+ + + + +
+
+
+ New Module 2 +
+
+
+
+ + New Module 2 + +
+
+ + + + +
+
+
+ lane_change +
+
+
+
+ + lane_change + +
+
+ + + + +
+
+
+ lane_following +
+
+
+
+ + lane_following + +
+
+ + + + +
+
+
+ blind_spot +
+
+
+
+ + blind_spot + +
+
+ + + + +
+
+
+ cross_walk +
+
+
+
+ + cross_walk + +
+
+ + + + +
+
+
+ stop_line +
+
+
+
+ + stop_line + +
+
+ + + + +
+
+
+ traffic_light +
+
+
+
+ + traffic_light + +
+
+ + + + +
+
+
+ detection_area +
+
+
+
+ + detection_area + +
+
+ + + + +
+
+
+ New Module 3 +
+
+
+
+ + New Module 3 + +
+
+ + + + + +
+
+
+ check_point +
+
+
+
+ + check_point + +
+
+ + + + + +
+
+
+ surround_obstacle_checker +
+
+
+
+ + surround_obstacle_checker + +
+
+
+ + + + +
+
+
+ (from other planning modules) +
+
+
+
+ + (from othe... + +
+
+ + + + + +
+
+
+ + Trajectory + +
+
+
+
+ + Trajectory + +
+
+ + + + + +
+
+
+ planning_validator +
+
+
+
+ + planning_validator + +
+
+
+ + + + +
+
+
+ API Layer +
+
+
+
+ + API Layer + +
+
+ + + + +
+
+
+ Mission Planning +
+
+
+
+ + Mission Planning + +
+
+ + + + +
+
+
+ Validation +
+
+
+
+ + Validation + +
+
+ + + + +
+
+
+ New Module 4 +
+
+
+
+ + New Module 4 + +
+
+ + + + + +
+
+
+ Legend +
+
+
+
+ + Legend + +
+
+ + + + +
+
+
+ Component +
+
+
+
+ + Component + +
+
+ + + + +
+
+
+ ROS Node +
+
+
+
+ + ROS Node + +
+
+ + + + +
+
+
+ Modlue Plugin +
+
+
+
+ + Modlue Plugin + +
+
+ + + + +
+
+
+ New ROS Node +
+
+
+
+ + New ROS Node + +
+
+ + + + + +
+
+
+ Trajectory +
+
+
+
+ + Trajectory + +
+
+ + + + +
+
+
+ New ROS Node +
+
+
+
+ + New ROS Node + +
+
+ + + + + +
+
+
+ Trajectory +
+
+
+
+ + Trajectory + +
+
+ + + + +
+
+
+ New Scenario +
+
+
+
+ + New Scenario + +
+
+ + + + + +
+
+
+ Trajectory +
+
+
+
+ + Trajectory + +
+
+
+ + + + + Text is not SVG - cannot display + + + +
\ No newline at end of file diff --git a/docs/design/autoware-architecture/planning/index-japanese.md b/docs/design/autoware-architecture/planning/index-japanese.md new file mode 100644 index 00000000000..194dfdc21d1 --- /dev/null +++ b/docs/design/autoware-architecture/planning/index-japanese.md @@ -0,0 +1,306 @@ +# Planning component design + +## Purpose + +自動運転システムにおける Planning コンポーネントの役割は、与えられたミッションを満たすために、安全で交通ルールに基づいた自動運転車両の目標軌道(経路と速度)を生成することです。 + +このドキュメントでは、Autowareにおけるplanningの要求やデザインをまとめます。これによって、開発者はPlanning Componentがどのような考えで設計されているのか、およびそれらをどう拡張させていくのかを理解することができます。 + +ドキュメントの前半ではハイレベルな要求やデザインについて、後半では実際の実装や提供機能について述べます。 + +## Goals and non-goals + +我々の目標は、純粋な自動運転システムの開発ではなく、自動運転「プラットフォーム」の提供です。このプラットフォームでは、誰もが自動運転の機能を自由に拡張できます。 + +Autowareでは、このプラットフォーム観点から [microautonomy architecture](https://autowarefoundation.github.io/autoware-documentation/main/design/autoware-concepts) の概念を提唱しています。Microautonomyとは、適切な機能のモジュール化やインターフェースの明確な定義に基づき、高い拡張性に焦点を当てた自動運転システムの設計コンセプトです。 + +これを踏まえ、Planning componentの設計方針は、世の中のすべての複雑な自動運転のユースケースを解決することではなく(なぜならそれは非常に難しい問題だからです)、**ユーザーのニーズに合わせてカスタマイズでき、誰でも容易に機能拡張が可能なPlanning開発プラットフォームを提供すること** に設定されています。我々が提供するプラットフォームが様々なニーズに対する拡張性を獲得した結果、最終的に多くの複雑なユースケースが解決できるようになると信じています。 + +この方針を明確にするため、以下にGoalとNon-Goalをリスト化します。 + +**Goals:** + +- **自動運転の走行に必要な最低限の基本機能を持つこと** + - Planning Componentは、機能拡張以前に、自動運転のために必須な機能を提供する必要があります。これには、走る、止まる、曲がるといった基本計画に加え、比較的安全でシンプルな状況での車線変更や信号停止などの機能が含まれます。 +- **提供機能はモジュール化されており、誰でも機能の拡張が可能であること** + - これはユーザーが期待するODDに対し、拡張機能によって対応できることを意味します。プラグインのような形で誰でも機能拡張ができれば、それぞれのニーズ(Lv4/Lv2自動運転、公道/私道走行、大型車両、小型ロボットなど)に合ったシステムが提供できます。 + - また、限定されたODD(例えば障害物のない管理された私道)において、機能を縮小できることも重要です。モジュール化された機能をDisableすることによって、機能を限定する代わりに処理負荷や消費電力を削減できます。 +- **オペレータとの連携によって能力が拡張できること** + - オペレータによる補助も機能拡張の一つです。これにより、非常に複雑で困難なユースケースにおいても、人間の補助という機能拡張で対応できることを意味します。ここでは具体的なオペレータの種類は定義されません。研究フェーズにおいては車に同乗している人かもしれませんし、自動運転サービスにおいては非常時に繋がる遠隔オペレータかもしれません。 + +**Non-goals:** + +Planning Componentはthird-partyのモジュールによって機能拡張されることを想定しています。したがって、以下はAutowareのPlanning Component単体の目標から除外されます。 + +- ユーザーが必要とする機能の全てをAutoware単体で提供すること +- 自動運転としての完全な機能と性能 +- 人間の性能を常に上回る性能 +- 完全な安全性 + +注意として、これらの要求は自動運転プラットフォームの視点から来ているものであり、一般的な自動運転システムにおけるPlanning Componentへの要求として一般的なものではないありません。 + + +## High level design + +このダイアグラムはPlanning Componentのハイレベルなアーキテクチャを示しています。なお、これは理想的なハイレベルデザインであり、現時点での実装がこれに完全に従っているわけではないことに注意してください。実際の詳細な実装については後半を参照してください。 + + + +![overall-planning-architecture](image/high-level-planning-diagram-miyake-reviewed.drawio.svg) + +ここではmicroautonomyアーキテクチャに従い、モジュール型のシステムフレームワークを採用しています。Planningの機能はモジュールとして実装され、これらのモジュールは与えられたユースケースに応じて動的/静的にload/unloadされます。これには例えば、レーンチェンジ、交差点、横断歩道モジュールなどが含まれます。 + +Planning コンポーネントは以下のようないくつかのサブコンポーネントから構成されます。 + +- **Mission Planning**: 地図情報を基に、自動運転ミッションの設定や現在位置からゴールまでのルート計算を行います。既存のサービスと比較すると、FMS(Fleet Management System)のミッション管理やカーナビのルート探索機能などを担当するモジュールです。 +- **Planning Modules**: 定められたミッションに対して、目標軌道やウインカーなどの自車の振る舞いの計画を行います。このサブコンポーネントは、機能を担当するいくつかのモジュールから成り立っています。これらのモジュールは便宜上、BehaviorとMotionの2つに分類されます。 + - **Behavior**: 交通ルールや安全を考慮して適切な経路を計算します。レーンチェンジや交差点進入、信号停止などの安全確認および実行判断を行います。 + - **Motion**: Behaviorと連携し、車両運動や乗り心地を考慮した目標軌道を計算します。具体的には、経路形状を計算する横方向計画と、速度を計算する縦方向計画の機能からなります。 +- **Validation**: 計算された目標軌道を検証し、安全性の確保や緊急時の対応を担います。Planningの計算した軌道が不適切な場合は、SystemにEmergencyを通知したり、暫定的な軌道生成を行います。 + +### Highlights + +このハイレベルデザインにおける重要なポイントを以下に列挙します。 + +#### Modulation of each function + +ルート生成や車線変更、交差点、横断歩道などPlanningに必要な機能はモジュールとして管理されます。これらのモジュールにはある程度共通化されたインターフェースが提供され、それに従うことで誰でもモジュールの追加や拡張を行うことができます。詳細なインターフェースについては後述します。 + +#### Separation of Mission Planning sub-component + +Mission Planningの役割は、FMS(Fleet Management System)などの既存サービスの代替となります。ハイレベルで定義されたMission Planningのインターフェースに従うことで、これらthird-party機能との連携を容易に行うことができます。 + +#### Separation of Validation sub-component + +誰でも容易に拡張できるというPlanning Componentの性質上、全ての機能それぞれにおいて期待されるレベルの安全性を担保することは困難です。PlanningのValidation機能は、実際に経路計画などを行うモジュールからは分離して管理され、モジュールに任意の変更があった場合でも一定のレベルの安全を担保できるように設計されています。 + +#### Interface for HMI (Human Machine Interface) + +Human Machine Interfaceとの連携は、人間オペレータとの連携を円滑に行うために必要不可欠です。このComponent間のインターフェースを介して、同乗オペレータや遠隔監視システムとの連携を可能にします。 + +#### Trade-offs for the separation of planning and other components + +Autowareの全体設計において、Planningを孤立したComponentとして設計する際のトレードオフに注意が必要です。Planning、Perception、Localization、Controlなどのコンポーネントを分離して開発することで、サードパーティ製のコンポーネントとの連携が容易になります。しかし、パフォーマンスと拡張性の間にはトレードオフが存在します。例えば、Perceptionコンポーネントは理想的にはPlanningコンポーネントが必要とするオブジェクトだけを認識すれば十分ですが、コンポーネントを分離することでそのような密接なコミュニケーションが難しくなり、不要なオブジェクトに対しても処理を実行する必要があります。また、計画と制御を分離すると、計画時に車両の運動性能を考慮することが難しくなるという性能面の欠点があります。これを補うためには、インターフェースの情報量を増やすか、計算負荷を増やすなどの対応が必要になります。 + +## Customize features + +Planning Componentのデザインの最も重要な機能の一つが、外部モジュールとの連携です。以下の図に示すように外部の機能を組み込む際にはいくつかの方法があります。 + +![how-to-add-new-modules](image/how-to-add-new-modules.drawio.svg) + +### Planning Componentに新たなモジュールを追加する + +ユーザーはモジュールとして作成されたPlanningの機能を置き換えたり、機能追加をすることができます。これは最も一般的な機能の拡張方法です。これによって、求めるODDにおいて不足している機能を追加したり、逆に既存の機能をよりシンプルなものに変更したりすることができます。 + +ただし、この機能追加を行うためには、各モジュールのインターフェースが適切に整理されている必要があります。2023年11月現在では、このような理想的なモジュールの仕組みは提供されておらず、いくつかの制限があります。詳細はReference Implementationの [Customize features in the current implementation](#customize-features-in-the-current-implementation) を確認してください。 + +### Planningのサブコンポーネントを置き換える + +いくつかのユーザーは、サブコンポーネントレベルでの連携・拡張に興味があるかもしれません。これは例えば、Mission Planningを既存のFMSサービスと置き換えたり、既存のValidation機能を使用しつつ経路生成の機能をthird-party製のものに置き換えるといった要求に該当します。 + +後に説明される [Internal interface in the planning component](#internal-interface-in-the-planning-component) に従えば、サブコンポーネントレベルでの連携・拡張を行うことが可能です。既存のPlanningの機能との複雑な連携はできませんが、一部のPlanning Componentの機能と外部モジュールとの連携が可能になります。 + +### Planning Component全体を置き換える + +自動運転のPlanningシステムを開発している企業や研究室などは、自社のPlanning製品をAutowareのPerceptionやControlモジュールと連携させ、自動運転システム全体の評価を行うことに関心があるでしょう。これはPlanning全体を置き換えることによって可能となります。Component間で定義される、おそらく最も堅牢で安定したインターフェースに従えば簡単に置き換えが可能です。ただし、既存のplanningモジュールとの連携はできません。 + +## Component interface + +This section describes the inputs and outputs of the Planning Component and of its internal modules. See the [Planning Component Interface](../../autoware-interfaces/components/planning.md) page for the current implementation. + +### Input to the planning component + +- **From Map** + - Vector map: Contains all static information about the environment, including lane connection information for route planning, lane geometry for generating a reference path, and traffic rule-related information. +- **From Perception** + - Detected object information: Provides real-time information about objects that cannot be known in advance, such as pedestrians and other vehicles. The Planning Component plans maneuvers to avoid collisions with these objects. + - Detected obstacle information: Supplies real-time information about the location of obstacles, which is more primitive than Detected Object and used for emergency stops and other safety measures. + - Occupancy map information: Offers real-time information about the presence of pedestrians and other vehicles and occluded area information. + - Traffic light recognition result: Provides the current state of each traffic light in real time. The Planning Component extracts relevant information for the planned path and determines whether to stop at intersections. +- **From Localization** + - Vehicle motion information: Includes the ego vehicle's position, velocity, acceleration, and other motion-related data. +- **From System** + - Operation mode: Indicates whether the vehicle is operating in Autonomous mode. +- **From Human Machine Interface (HMI)** + - Feature execution: Allows for executing/authorizing autonomous driving operations, such as lane changes or entering intersections, by human operators. +- **From API Layer** + - Destination (Goal): Represents the final position that the Planning Component aims to reach. + - Checkpoint: Represents a midpoint along the route to the destination. This is used during route calculation. + - Velocity limit: Sets the maximum speed limit for the vehicle. + +### Output from the planning component + +- **To Control** + - Trajectory: Provides a smooth sequence of pose, twist, and acceleration that the Control Component must follow. The trajectory is typically 10 seconds long with a 0.1-second resolution. + - Turn Signals: Controls the vehicle's turn indicators, such as right, left, hazard, etc. based on the planned maneuvers. +- **To System** + - Diagnostics: Reports the state of the Planning Component, indicating whether the processing is running correctly and whether a safe plan is being generated. +- **To Human Machine Interface (HMI)** + - Feature execution availability: Indicates the status of operations that can be executed or are required, such as lane changes or entering intersections. + - Trajectory candidate: Shows the potential trajectory that will be executed after the user's execution. +- **To API Layer** + - Planning factors: Provides information about the reasoning behind the current planning behavior. This may include the position of target objects to avoid, obstacles that led to the decision to stop, and other relevant information. + + +### Internal interface in the planning component +- **Mission Planning to Scenario Planning** + - Route: Offers guidance for the path that needs to be followed from the starting point to the destination. This path is determined based on information such as lane IDs defined on the map. At the route level, it doesn't explicitly indicate which specific lanes to take, and the route can contain multiple lanes. +- **Behavior Planning to Motion Planning** + - Path: Provides a rough position and velocity to be followed by the vehicle. These path points are usually defined with an interval of about 1 meter. Although other interval distances are possible, it may impact the precision or performance of the planning component. + - Drivable area: Defines regions where the vehicle can drive, such as within lanes or physically drivable areas. It assumes that the motion planner will calculate the final trajectory within this defined area. +- **Scenario Planning to Validation** + - Trajectory: Defines the desired positions, velocities, and accelerations which the Control Component will try to follow. Trajectory points are defined at intervals of approximately 0.1 seconds based on the trajectory velocities. +- **Validation to Control Component** + - Trajectory: Same as above but with some additional safety considerations. + +## Detailed design + +### Supported features + +| Feature | Description | Requirements | Figure | +| -------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| Route Planning | Plan route from the ego vehicle position to the destination.

Reference implementation is in [Mission Planner](https://autowarefoundation.github.io/autoware.universe/main/planning/mission_planner/), enabled by launching the `mission_planner` node. | - Lanelet map (driving lanelets) | ![route-planning](image/features-route-planning.drawio.svg) | +| Path Planning from Route | Plan path to be followed from the given route.

Reference implementation is in [Behavior Path Planner](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_path_planner/). | - Lanelet map (driving lanelets) | ![lane-follow](image/features-lane-follow.drawio.svg) | +| Obstacle Avoidance | Plan path to avoid obstacles by steering operation.

Reference implementation is in [Avoidance](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_path_planner/docs/behavior_path_planner_avoidance_design/), [Obstacle Avoidance Planner](https://autowarefoundation.github.io/autoware.universe/main/planning/obstacle_avoidance_planner/). Enable flag in parameter: `launch obstacle_avoidance_planner true`

[Demonstration Video](https://youtu.be/A_V9yvfKZ4E)
[![Demonstration Video](https://img.youtube.com/vi/A_V9yvfKZ4E/0.jpg)](https://www.youtube.com/watch?v=A_V9yvfKZ4E) | - objects information | ![obstacle-avoidance](image/features-avoidance.drawio.svg) | +| Path Smoothing | Plan path to achieve smooth steering.

Reference implementation is in [Obstacle Avoidance Planner](https://autowarefoundation.github.io/autoware.universe/main/planning/obstacle_avoidance_planner/).

[Demonstration Video](https://youtu.be/RhyAF26Ppzs)
[![Demonstration Video](https://img.youtube.com/vi/RhyAF26Ppzs/0.jpg)](https://www.youtube.com/watch?v=RhyAF26Ppzs) | - Lanelet map (driving lanelet) | ![path-smoothing](image/features-path-smoothing.drawio.svg) | +| Narrow Space Driving | Plan path to drive within the drivable area. Furthermore, when it is not possible to drive within the drivable area, stop the vehicle to avoid exiting the drivable area.

Reference implementation is in [Obstacle Avoidance Planner](https://autowarefoundation.github.io/autoware.universe/main/planning/obstacle_avoidance_planner/).

[Demonstration Video](https://youtu.be/URzcLO2E1vY)
[![Demonstration Video](https://img.youtube.com/vi/URzcLO2E1vY/0.jpg)](https://www.youtube.com/watch?v=URzcLO2E1vY) | - Lanelet map (high-precision lane boundaries) | ![narrow-space-driving](image/features-narrow-space-driving.drawio.svg) | +| Lane Change | Plan path for lane change to reach the destination.

Reference implementation is in [Lane Change](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_path_planner/docs/behavior_path_planner_lane_change_design/).

[Demonstration Video](https://youtu.be/0jRDGQ84cD4)
[![Demonstration Video](https://img.youtube.com/vi/0jRDGQ84cD4/0.jpg)](https://www.youtube.com/watch?v=0jRDGQ84cD4) | - Lanelet map (driving lanelets) | ![lane-change](image/features-lane-change.drawio.svg) | +| Pull Over | Plan path for pull over to park at the road shoulder.

Reference implementation is in [Goal Planner](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_path_planner/docs/behavior_path_planner_goal_planner_design/).

Demonstration Videos:
[Simple Pull Over](https://youtu.be/r3-kAmTb4hc)
[![Demonstration Video](https://img.youtube.com/vi/r3-kAmTb4hc/0.jpg)](https://www.youtube.com/watch?v=r3-kAmTb4hc)
[Arc Forward Pull Over](https://youtu.be/ornbzkWxRWU)
[![Demonstration Video](https://img.youtube.com/vi/ornbzkWxRWU/0.jpg)](https://www.youtube.com/watch?v=ornbzkWxRWU)
[Arc Backward Pull Over](https://youtu.be/if-0tG3AkLo)
[![Demonstration Video](https://img.youtube.com/vi/if-0tG3AkLo/0.jpg)](https://www.youtube.com/watch?v=if-0tG3AkLo) | - Lanelet map (shoulder lane) | ![pull-over](image/features-pull-over.drawio.svg) | +| Pull Out | Plan path for pull over to start from the road shoulder.

Reference implementation is in [Pull Out Module](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_path_planner/docs/behavior_path_planner_start_planner_design/#:~:text=WIP-,Path%20Generation,-%23).

Demonstration Video:
[Simple Pull Out](https://youtu.be/xOjnPqoHup4)
[![Demonstration Video](https://img.youtube.com/vi/xOjnPqoHup4/0.jpg)](https://www.youtube.com/watch?v=xOjnPqoHup4)
[Backward Pull Out](https://youtu.be/iGieijPcPcQ)
[![Demonstration Video](https://img.youtube.com/vi/iGieijPcPcQ/0.jpg)](https://www.youtube.com/watch?v=iGieijPcPcQ) | - Lanelet map (shoulder lane) | ![pull-out](image/features-pull-out.drawio.svg) | +| Path Shift | Plan path in lateral direction in response to external instructions.

Reference implementation is in [Side Shift Module](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_path_planner/docs/behavior_path_planner_side_shift_design/). | - None | ![side-shift](image/features-side-shift.drawio.svg) | +| Obstacle Stop | Plan velocity to stop for an obstacle on the path.

Reference implementation is in [Obstacle Stop Planner](https://autowarefoundation.github.io/autoware.universe/main/planning/obstacle_stop_planner/), [Obstacle Cruise Planner](https://autowarefoundation.github.io/autoware.universe/main/planning/obstacle_cruise_planner/). `launch obstacle_stop_planner` and enable flag: `TODO`, `launch obstacle_cruise_planner` and enable flag: `TODO`

[Demonstration Video](https://youtu.be/d8IRW_xArcE)
[![Demonstration Video](https://img.youtube.com/vi/d8IRW_xArcE/0.jpg)](https://www.youtube.com/watch?v=d8IRW_xArcE) | - objects information | ![obstacle-stop](image/features-obstacle-stop.drawio.svg) | +| Obstacle Deceleration | Plan velocity to decelerate for an obstacle located around the path.

Reference implementation is in [Obstacle Stop Planner](https://autowarefoundation.github.io/autoware.universe/main/planning/obstacle_stop_planner/), [Obstacle Cruise Planner](https://autowarefoundation.github.io/autoware.universe/main/planning/obstacle_cruise_planner/).

[Demonstration Video](https://youtu.be/gvN1otgeaaw)
[![Demonstration Video](https://img.youtube.com/vi/gvN1otgeaaw/0.jpg)](https://www.youtube.com/watch?v=gvN1otgeaaw) | - objects information | ![obstacle-decel](image/features-obstacle-decel.drawio.svg) | +| Adaptive Cruise Control | Plan velocity to follow the vehicle driving in front of the ego vehicle.

Reference implementation is in [Obstacle Stop Planner](https://autowarefoundation.github.io/autoware.universe/main/planning/obstacle_stop_planner/), [Obstacle Cruise Planner](https://autowarefoundation.github.io/autoware.universe/main/planning/obstacle_cruise_planner/). | - objects information | ![adaptive-cruise](image/features-adaptive-cruise.drawio.svg) | +| Decelerate for cut-in vehicles | Plan velocity to avoid a risk for cutting-in vehicle to ego lane.

Reference implementation is in [Obstacle Cruise Planner](https://autowarefoundation.github.io/autoware.universe/main/planning/obstacle_cruise_planner/). | - objects information | ![cut-in](image/features-cut-in.drawio.svg) | +| Surround Check at starting | Plan velocity to prevent moving when an obstacle exists around the vehicle.

Reference implementation is in [Surround Obstacle Checker](https://autowarefoundation.github.io/autoware.universe/main/planning/surround_obstacle_checker/). Enable flag in parameter: `use_surround_obstacle_check true` in [tier4_planning_component.launch.xml](https://github.com/autowarefoundation/autoware_launch/blob/2850d7f4e20b173fde2183d5323debbe0067a990/autoware_launch/launch/components/tier4_planning_component.launch.xml#L8)

[Demonstration Video](https://youtu.be/bbGgtXN3lC4)
[![Demonstration Video](https://img.youtube.com/vi/bbGgtXN3lC4/0.jpg)](https://www.youtube.com/watch?v=bbGgtXN3lC4) | - objects information | ![surround-check](image/features-surround-check.drawio.svg) | +| Curve Deceleration | Plan velocity to decelerate the speed on a curve.

Reference implementation is in [Motion Velocity Smoother](https://autowarefoundation.github.io/autoware.universe/main/planning/motion_velocity_smoother/). | - None | ![decel-on-curve](image/features-decel-on-curve.drawio.svg) | +| Curve Deceleration for Obstacle | Plan velocity to decelerate the speed on a curve for a risk of obstacle collision around the path.

Reference implementation is in [Obstacle Velocity Limiter](https://autowarefoundation.github.io/autoware.universe/main/planning/obstacle_velocity_limiter/).

[Demonstration Video](https://youtu.be/I-oFgG6kIAs)
[![Demonstration Video](https://img.youtube.com/vi/I-oFgG6kIAs/0.jpg)](https://www.youtube.com/watch?v=I-oFgG6kIAs) | - objects information
- Lanelet map (static obstacle) | ![decel-on-curve-obstacles](image/features-decel-on-curve-obstacles.drawio.svg) | +| Crosswalk | Plan velocity to stop or decelerate for pedestrians approaching or walking on a crosswalk.

Reference implementation is in [Crosswalk Module](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_velocity_crosswalk_module/).

[Demonstration Video](https://youtu.be/tUvthyIL2W8)
[![Demonstration Video](https://img.youtube.com/vi/tUvthyIL2W8/0.jpg)](https://www.youtube.com/watch?v=tUvthyIL2W8) | - objects information
- Lanelet map (pedestrian crossing) | ![crosswalk](image/features-crosswalk.drawio.svg) | +| Intersection Oncoming Vehicle Check | Plan velocity for turning right/left at intersection to avoid a risk with oncoming other vehicles.

Reference implementation is in [Intersection Module](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_velocity_intersection_module/).

[Demonstration Video](https://youtu.be/SGD07Hqg4Hk)
[![Demonstration Video](https://img.youtube.com/vi/SGD07Hqg4Hk/0.jpg)](https://www.youtube.com/watch?v=SGD07Hqg4Hk) | - objects information
- Lanelet map (intersection lane and yield lane) | ![intersection](image/features-intersection.drawio.svg) | +| Intersection Blind Spot Check | Plan velocity for turning right/left at intersection to avoid a risk with other vehicles or motorcycles coming from behind blind spot.

Reference implementation is in [Blind Spot Module](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_velocity_blind_spot_module/).

[Demonstration Video](https://youtu.be/oaTCJRafDGA)
[![Demonstration Video](https://img.youtube.com/vi/oaTCJRafDGA/0.jpg)](https://www.youtube.com/watch?v=oaTCJRafDGA) | - objects information
- Lanelet map (intersection lane) | ![blind-spot](image/features-blind-spot.drawio.svg) | +| Intersection Occlusion Check | Plan velocity for turning right/left at intersection to avoid a risk with the possibility of coming vehicles from occlusion area.

Reference implementation is in [Intersection Module](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_velocity_intersection_module/).

[Demonstration Video](https://youtu.be/bAHXMB7kbFc)
[![Demonstration Video](https://img.youtube.com/vi/bAHXMB7kbFc/0.jpg)](https://www.youtube.com/watch?v=bAHXMB7kbFc) | - objects information
- Lanelet map (intersection lane) | ![intersection-occlusion](image/features-intersection-occlusion.drawio.svg) | +| Intersection Traffic Jam Detection | Plan velocity for intersection not to enter the intersection when a vehicle is stopped ahead for a traffic jam.

Reference implementation is in [Intersection Module](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_velocity_intersection_module/).

[Demonstration Video](https://youtu.be/negK4VbrC5o)
[![Demonstration Video](https://img.youtube.com/vi/negK4VbrC5o/0.jpg)](https://www.youtube.com/watch?v=negK4VbrC5o) | - objects information
- Lanelet map (intersection lane) | ![intersection-traffic-jam](image/features-intersection-traffic-jam.drawio.svg) | +| Traffic Light | Plan velocity for intersection according to a traffic light signal.

Reference implementation is in [Traffic Light Module](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_velocity_traffic_light_module/).

[Demonstration Video](https://youtu.be/lGA53KljQrM)
[![Demonstration Video](https://img.youtube.com/vi/lGA53KljQrM/0.jpg)](https://www.youtube.com/watch?v=lGA53KljQrM) | - Traffic light color information | ![traffic-light](image/features-traffic-light.drawio.svg) | +| Run-out Check | Plan velocity to decelerate for the possibility of nearby objects running out into the path.

Reference implementation is in [Run Out Module](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_velocity_run_out_module/).

[Demonstration Video](https://youtu.be/9IDggldT2t0)
[![Demonstration Video](https://img.youtube.com/vi/9IDggldT2t0/0.jpg)](https://www.youtube.com/watch?v=9IDggldT2t0) | - objects information | ![run-out](image/features-run-out.drawio.svg) | +| Stop Line | Plan velocity to stop at a stop line.

Reference implementation is in [Stop Line Module](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_velocity_stop_line_module/).

[Demonstration Video](https://youtu.be/eej9jYt-GSE)
[![Demonstration Video](https://img.youtube.com/vi/eej9jYt-GSE/0.jpg)](https://www.youtube.com/watch?v=eej9jYt-GSE) | - Lanelet map (stop line) | ![stop-line](image/features-stop-line.drawio.svg) | +| Occlusion Spot Check | Plan velocity to decelerate for objects running out from occlusion area, for example, from behind a large vehicle.

Reference implementation is in [Occlusion Spot Module](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_velocity_occlusion_spot_module/).

[Demonstration Video](https://youtu.be/3qs8Ivjh1fs)
[![Demonstration Video](https://img.youtube.com/vi/3qs8Ivjh1fs/0.jpg)](https://www.youtube.com/watch?v=3qs8Ivjh1fs) | - objects information
- Lanelet map (private/public lane) | ![occlusion-spot](image/features-occlusion-spot.drawio.svg) | +| No Stop Area | Plan velocity not to stop in areas where stopping is prohibited, such as in front of the fire station entrance.

Reference implementation is in [No Stopping Area Module](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_velocity_no_stopping_area_module/). | - Lanelet map (no stopping area) | ![no-stopping-area](image/features-no-stopping-area.drawio.svg) | +| Merge from Private Area to Public Road | Plan velocity for entering the public road from a private driveway to avoid a risk of collision with pedestrians or other vehicles.

Reference implementation is in [Merge from Private Area Module](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_velocity_intersection_module/). | - objects information
- Lanelet map (private/public lane) | WIP | +| Speed Bump | Plan velocity to decelerate for speed bumps.

Reference implementation is in [Speed Bump Module](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_velocity_speed_bump_module/).

[Demonstration Video](https://youtu.be/FpX3q3YaaCw)
[![Demonstration Video](https://img.youtube.com/vi/FpX3q3YaaCw/0.jpg)](https://www.youtube.com/watch?v=FpX3q3YaaCw) | - Lanelet map (speed bump) | ![speed-bump](image/features-speed-bump.drawio.svg) | +| Detection Area | Plan velocity to stop at the corresponding stop when an object exist in the designated detection area.

Reference implementation is in [Detection Area Module](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_velocity_detection_area_module/).

[Demonstration Video](https://youtu.be/YzXF4U69lJs)
[![Demonstration Video](https://img.youtube.com/vi/YzXF4U69lJs/0.jpg)](https://www.youtube.com/watch?v=YzXF4U69lJs) | - Lanelet map (detection area) | ![detection-area](image/features-detection-area.drawio.svg) | +| No Drivable Lane | Plan velocity to stop before exiting the area designated by ODD (Operational Design Domain) or stop the vehicle if autonomous mode started in out of ODD lane.

Reference implementation is in [No Drivable Lane Module](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_velocity_no_drivable_lane_module/). | - Lanelet map (no drivable lane) | ![no-drivable-lane](image/features-no-drivable-lane.drawio.svg) | +| Collision Detection when deviating from lane | Plan velocity to avoid conflict with other vehicles driving in the another lane when the ego vehicle is deviating from own lane.

Reference implementation is in [Out of Lane Module](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_velocity_out_of_lane_module/). | - objects information
- Lanelet map (driving lane) | WIP | +| Parking | Plan path and velocity for given goal in parking area.

Reference implementation is in [Free Space Planner](https://autowarefoundation.github.io/autoware.universe/main/planning/freespace_planner/).

[Demonstration Video](https://youtu.be/rAIYmwpNWfA)
[![Demonstration Video](https://img.youtube.com/vi/rAIYmwpNWfA/0.jpg)](https://www.youtube.com/watch?v=rAIYmwpNWfA) | - objects information
- Lanelet map (parking area) | ![parking](image/features-parking.drawio.svg) | +| Autonomous Emergency Braking (AEB) | Perform an emergency stop if a collision with an object ahead is anticipated. It is noted that this function is expected as a final safety layer, and this should work even in the event of failures in the Localization or Perception system.

Reference implementation is in [Out of Lane Module](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_velocity_out_of_lane_module/). | - Primitive objects | ![aeb](image/features-aeb.drawio.svg) | +| Minimum Risk Maneuver (MRM) | Provide appropriate MRM (Minimum Risk Maneuver) instructions when a hazardous event occurs. For example, when a sensor trouble found, send an instruction for emergency braking, moderate stop, or pulling over to the shoulder, depending on the severity of the situation.

Reference implementation is in TODO | - TODO | WIP | +| Trajectory Validation | Check the planned trajectory is safe. If it is unsafe, take appropriate action, such as modify the trajectory, stop sending the trajectory or report to the autonomous driving system.

Reference implementation is in [Planning Validator](https://autowarefoundation.github.io/autoware.universe/main/planning/planning_validator/). | - None | ![trajectory-validation](image/features-trajectory-validation.drawio.svg) | +| Running Lane Map Generation | Generate lane map from localization data recorded in manual driving.

Reference implementation is in WIP | - None | WIP | +| Running Lane Optimization | Optimize the centerline (reference path) of the map to make it smooth considering the vehicle kinematics.

Reference implementation is in [Static Centerline Optimizer](https://autowarefoundation.github.io/autoware.universe/main/planning/static_centerline_optimizer/). | - Lanelet map (driving lanes) | WIP | + + + +### Reference Implementation + +The following diagram describes the reference implementation of the Planning component. By adding new modules or extending the functionalities, various ODDs can be supported. + +_Note that some implementation does not adhere to the high-level architecture design due to the difficulties of the implementation and require updating._ + +![reference-implementation](image/planning-diagram-tmp.drawio.svg) + +For more details, please refer to the design documents in each package. + +- [_mission_planner_](https://autowarefoundation.github.io/autoware.universe/main/planning/mission_planner/): calculate route from start to goal based on the map information. +- [_behavior_path_planner_](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_path_planner/): calculates path and drivable area based on the traffic rules. + - [_lane_following_](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_path_planner/#lane-following) + - [_lane_change_](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_path_planner/#lane-change) + - [_avoidance_](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_path_planner/#avoidance) + - [_pull_over_](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_path_planner/#pull-over) + - [_pull_out_](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_path_planner/#pull-out) + - _side_shift_ +- [_behavior_velocity_planner_](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_velocity_planner/): calculates max speed based on the traffic rules. + - [_detection_area_](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_velocity_detection_area_module/docs/detection-area-design/) + - [_blind_spot_](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_velocity_blind_spot_module/docs/blind-spot-design/) + - [_cross_walk_](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_velocity_crosswalk_module/docs/crosswalk-design/) + - [_stop_line_](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_velocity_stop_line_module/docs/stop-line-design/) + - [_traffic_light_](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_velocity_traffic_light_module/docs/traffic-light-design/) + - [_intersection_](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_velocity_intersection_module/docs/intersection-design/) + - [_no_stopping_area_](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_velocity_no_stopping_area_module/docs/no-stopping-area-design/) + - [_virtual_traffic_light_](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_velocity_virtual_traffic_light_module/docs/virtual-traffic-light-design/) + - [_occlusion_spot_](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_velocity_occlusion_spot_module/docs/occlusion-spot-design/) + - [_run_out_](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_velocity_run_out_module/docs/run-out-design/) +- [_obstacle_avoidance_planner_](https://autowarefoundation.github.io/autoware.universe/main/planning/obstacle_avoidance_planner/): calculate path shape under obstacle and drivable area constraints +- [_surround_obstacle_checker_](https://autowarefoundation.github.io/autoware.universe/main/planning/surround_obstacle_checker/): keeps the vehicle being stopped when there are obstacles around the ego-vehicle. It works only when the vehicle is stopped. +- [_obstacle_stop_planner_](https://autowarefoundation.github.io/autoware.universe/main/planning/obstacle_stop_planner/): When there are obstacles on or near the trajectory, it calculates the maximum velocity of the trajectory points depending on the situation: stopping, slowing down, or adaptive cruise (following the car). + - [_stop_](https://autowarefoundation.github.io/autoware.universe/main/planning/obstacle_stop_planner/#obstacle-stop-planner_1) + - [_slow_down_](https://autowarefoundation.github.io/autoware.universe/main/planning/obstacle_stop_planner/#slow-down-planner) + - [_adaptive_cruise_](https://autowarefoundation.github.io/autoware.universe/main/planning/obstacle_stop_planner/#adaptive-cruise-controller) +- [_costmap_generator_](https://autowarefoundation.github.io/autoware.universe/main/planning/costmap_generator/): generates a costmap for path generation from dynamic objects and lane information. +- [_freespace_planner_](https://autowarefoundation.github.io/autoware.universe/main/planning/freespace_planner/): calculates trajectory considering the feasibility (e.g. curvature) for the freespace scene. Algorithms are described [here](https://autowarefoundation.github.io/autoware.universe/main/planning/freespace_planning_algorithms/). +- _scenario_selector_ : chooses a trajectory according to the current scenario. +- [_external_velocity_limit_selector_](https://autowarefoundation.github.io/autoware.universe/main/planning/external_velocity_limit_selector/): takes an appropriate velocity limit from multiple candidates. +- [_motion_velocity_smoother_](https://autowarefoundation.github.io/autoware.universe/main/planning/motion_velocity_smoother/): calculates final velocity considering velocity, acceleration, and jerk constraints. + +### Important information in the current implementation + +ハイレベルなデザインと比較したときの重要な違いは、「シナリオレイヤーの導入」と「behavior/motionの明確な分離」です。これらは現時点での性能や実装的な課題から導入されています。これらをハイレベルなデザインとして定義するか、それとも実装の一部として改良していくかは議論の必要があります。 + +#### Introducing the Scenario Planning layer + +There are different requirements for interfaces between driving in well-structured lanes and driving in a free-space area like a parking lot. For example, while Lane Driving can handle routes with map IDs, this is not appropriate for planning in free space. The mechanism that switches planning sub-components at the scenario level (Lane Driving, Parking, etc) enables a flexible design of the interface, however, it has a drawbacks of the reuse of modules across different scenarios. + +#### Separation of Behavior and Motion + +One of the classic approach to Planning involves dividing it into "Behavior", which decides the action, and "Motion", which determines the final movement. However, this separation implies a trade-off with performance, as performance tends to degrade with increasing separation of functions. For example, Behavior needs to make decisions without prior knowledge of the computations that Motion will eventually perform, which generally results in conservative decision-making. On the other hand, if behavior and motion are integrated, motion performance and decision-making become interdependent, creating challenges in terms of expandability, such as when you wish to extend only the decision-making function to follow a regional traffic rules. + +To understand this background, this [previously discussed document](https://github.com/tier4/AutowareArchitectureProposal.proj/blob/main/docs/design/software_architecture/Planning/DesignRationale.md) may be useful. + +### Customize features in the current implementation + +現時点の実装でもモジュールレベルの機能の追加は可能ですが、全ての機能に対して統一的なインターフェースは提供されていません。モジュールレベルでの拡張を行うための、現時点での実装方法について簡単に説明します。 + +![reference-implementation-add-new-modules](image/reference-implementation-add-new-modules.drawio.svg) + +#### Add new modules in behavior_velocity_planner or behavior_path_plnner + +[behavior_path_planner](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_path_planner/) や [behavior_velocity_planner](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_velocity_planner/) などの ROS nodeは、pluginによるモジュールインターフェースが用意されています。これらの ROS nodeで定義されるモジュールのインターフェースに沿ってモジュールを追加することにより、動的にモジュールのload/unloadが可能となります。具体的なモジュール追加の方法については、各パッケージのドキュメントをご確認ください。 + +#### Add a new ros node in the planning component + +Motion Planningにおいてモジュールを追加する場合は、モジュールをROS Nodeで作成し、planning componentの中に統合する必要があります。現時点の構成は、上流で計算される目標軌道に対して情報を付加する形となっており、その過程に ROS Node を導入することによって機能の拡張を可能とします。 + +#### Add or replace with scenarios + +今の実装には、まとめて複数のモジュールを切り替えるための方法としてシナリオレベルでの切り替えロジックが導入されています。これを用いることによって、新たなシナリオ(例えばhighway drivingなど)の追加が可能と成ります。 + +実際にシナリオをros nodeなどで作成し、scenario_selectorというros nodeをそのシナリオに対応させれば統合は完了します。このメリットは、他のシナリオ(Lane Drivingなど)の実装に影響を与えずに、大きな新規機能を導入することができます。一方で、既存のplanning moduleレベルでの連携を行うことはできず、シナリオの切り替えによるシナリオレベルでの連携しかできません。 + + diff --git a/docs/design/autoware-architecture/planning/index.md b/docs/design/autoware-architecture/planning/index.md index 1cfbd97c1a2..98db42aacf1 100644 --- a/docs/design/autoware-architecture/planning/index.md +++ b/docs/design/autoware-architecture/planning/index.md @@ -1,46 +1,106 @@ # Planning component design -## Overview +## Purpose -The Planning component generates the trajectory message that will be subscribed to by the Control component based on the environmental state obtained from the Localization and the Perception components. +The role of the Planning Component in autonomous driving systems is to generate a target trajectory (path and speed) for autonomous vehicles that is safe and following traffic rules, in order to fulfill a given mission. -## Requirements +This document summarizes the requirements and design of planning in Autoware. This will enable developers to understand how the Planning Component is designed and how to extend its capabilities. -The goal of the Planning component is to generate a trajectory (path and velocity) of the ego vehicle that is safe and well-regulated while satisfying the given mission. +The first half of the document discusses high-level requirements and design, while the latter half covers actual implementations and provided functionalities. + +## Goals and non-goals + +Our goal is not the development of just an autonomous driving system, but the provision of an autonomous driving "platform." On this platform, anyone can extend the functionalities of autonomous driving based on their needs. + +In Autoware, we employ the concept of a [microautonomy architecture](https://autowarefoundation.github.io/autoware-documentation/main/design/autoware-concepts). Microautonomy is a design concept for autonomous driving systems focused on high extensibility, based on appropriate functional modularity and clear interface definitions. + +With this in mind, the design policy for the Planning component is not to solve all the complex use cases of autonomous driving (as that is a very challenging problem), but **to provide a Planning development platform that can be customized according to user needs and easily extended by anyone**. We believe that as our platform gains extensibility to various needs, many complex use cases will ultimately be resolved. + +To clarify this policy, Goals and Non-Goals are listed below. **Goals:** -- The basic functions are provided so that a simple ODD can be defined. -- The functionality is modularized to accommodate the third-party components. That is, a complicated or realistic ODD needs not be defined by the basic functions provided by default. -- The capability is extensible with the third-party components or the decision of human operators. -- The mechanism and policy are separated to allow the system or operators to change the behavior of the ego vehicle. Ultimately speaking, the policy can be set to crash an obstacle and the mechanism always follows. Otherwise, the system is not safe from the design point of view. +- **To have the minimum basic functions necessary for autonomous driving** + - Prior to extension of functionalities, the Planning Component must offer essential functionalities for autonomous driving. This includes basic planning like moving forward and backward, stopping, and turning, as well as lane changes and obstacle avoidance in relatively safe and simple situations. +- **Provided functionalities are modularized, and anyone can extend them** + - This means being able to respond to the expected ODD with extended functionalities. If anyone can extend functionalities like a plugin, systems tailored to various needs can be provided (e.g., Lv4/Lv2 autonomous driving, public/private road driving, large vehicles, small robots). + - Additionally, the ability to reduce functionalities for limited ODDs (e.g., obstacle-free managed private roads) is important from the platform point of view. Disabling modularized functions can reduce power consumption or requirement for sensing systems, which can fits to someone's needs. +- **Capability enhancement through cooperation with operators** + - Assistance by operators is also a form of functional extension. This means that even in very complex and difficult use cases, the system can cope through functional extension by human assistance. The specific type of operator is not defined here. It might be a person accompanying in the vehicle during the prototype development phase or a remote operator connected in emergencies during autonomous driving services. **Non-goals:** -- The Planning component is not self-contained but can be extended with third parties. -- The Planning component is not aimed at the complete functionality and capability. -- The Planning component is not designed to always outperform human drivers. -- The Planning component is not capable of “never crashes”. +The Planning Component is intended to be extended by third-party modules. Therefore, the following are excluded from the goals of Autoware's Planning Component alone: + +- Providing all the functionalities needed by users solely with Autoware +- Complete functionality and performance as an autonomous driving system +- Performance consistently exceeding human capabilities or providing complete safety. + +Note that these requirements come from the perspective of an autonomous driving "platform" and are not generally applicable to the Planning Component of a typical autonomous driving system. + +## High level design + +This diagram shows the high-level architecture of the Planning Component. Note that this is an ideal high-level design and the current implementation does not fully comply with it. Please refer to the latter part for detailed implementations. + + + +![overall-planning-architecture](image/high-level-planning-diagram-miyake-reviewed.drawio.svg) + +Here, we adopt a modular system framework following the microautonomy architecture. The functions of Planning are implemented as modules, which are dynamically/statically loaded/unloaded according to the given use cases. This includes, for example, lane change, intersection, and pedestrian crossing modules. + +The Planning Component consists of several sub-components such as: + +- **Mission Planning**: Calculates routes from the current location to the goal for autonomous driving missions based on map information. Comparing to existing services, this module takes on functions like FMS (Fleet Management System) mission management or car navigation route searching. +- **Planning Modules**: Plans the behavior of the vehicle, such as target trajectory and turn signals, for the defined mission. This sub-component consists of several modules responsible for functionalities. These modules are conveniently categorized into Behavior and Motion. + - **Behavior**: Calculates appropriate routes considering traffic rules and safety. It handles safe confirmations and execution decisions for lane changes, entering intersections, and stopping at signals. + - **Motion**: Calculates target trajectories considering vehicle motion and ride comfort in collaboration with Behavior modules. Specifically, it consists of lateral planning that calculates route shapes and longitudinal planning that calculates speeds. +- **Validation**: Validates the calculated target trajectories, ensuring safety and responding in emergencies. If the trajectory calculated by Planning is inappropriate, it notifies the System of an Emergency or generates a provisional trajectory. + +### Highlights + +Important points in this high-level design are listed below. + +#### Modulation of each function + +Functions necessary for Planning, such as route generation, lane changes, intersections, and pedestrian crossings, are managed as modules. These modules are provided with standardized interfaces, following which anyone can add or extend modules. Details of the interfaces will be discussed later. + +#### Separation of Mission Planning sub-component + +The role of Mission Planning is to substitute for existing services like FMS (Fleet Management System). By complying with the high-level defined interfaces of Mission Planning, easy integration with these third-party functions can be achieved. + +#### Separation of Validation sub-component + +Given the nature of the Planning Component, which can be easily extended by anyone, it is difficult to ensure the expected level of safety in each function. The Validation function of Planning is managed separately from modules that actually perform planning, ensuring a certain level of safety even if arbitrary changes are made to the modules. + +#### Interface for HMI (Human Machine Interface) + +The integration with Human Machine Interface is essential for smooth cooperation with human operators. Through the interfaces between these components, coordination with accompanying operators or remote monitoring systems is enabled. -## High-level architecture +#### Trade-offs for the separation of planning and other components -This diagram describes the high-level architecture of the Planning Component. +In the overall design of Autoware, attention is needed for the trade-offs when designing Planning as an isolated Component. By developing components such as Planning, Perception, Localization, and Control separately, cooperation with third-party components becomes easier. However, there are trade-offs between performance and extensibility. For example, ideally, the Perception component should only recognize objects needed by the Planning component, but separating components makes such close communication difficult, necessitating processing even unnecessary objects. Also, separating planning and control has performance drawbacks, such as difficulty in considering vehicle dynamics during planning. To compensate for this, increasing the amount of information in interfaces or increasing computational load is necessary. -![overall-planning-architecture](image/high-level-planning-diagram.drawio.svg) +## Customize features -The Planning component consists of the following sub-components: +One of the most important features of the Planning Component design is its integration with external modules. As shown in the diagram below, there are several ways to incorporate external functionalities. -- **Mission Planning**: Calculates the route based on the given goal and map information. -- **Scenario Planning**: Determines the trajectory based on the current scenario, such as Lane Driving or Parking. - - **Lane Driving**: Calculates the trajectory for driving within constructed lanes. - - **Behavior Planner**: Calculates suitable path based on safety considerations and traffic rules. - - **Motion Planner**: Calculates suitable trajectory for the vehicle by taking into account safety factors, vehicle motion considerations, and instructions from the behavior planner. - - **Parking**: Calculates the trajectory for parking in unstructured areas. -- **Validation**: Verifies the safety of the trajectory. +![how-to-add-new-modules](image/how-to-add-new-modules.drawio.svg) -Each component contains some modules that can be dynamically loaded and unloaded based on the situation. For instance, the Behavior Planning component includes modules such as lane change, intersection, and crosswalk modules. +### 1. Adding New Modules to the Planning Component -Our planning components are built based on the microautonomy architecture with Autoware. We adopt a modular system framework where the tasks are implemented as modules that can be dynamically loaded and unloaded to achieve different features depending on the given use cases. +Users can replace or add functionalities to Planning as modules. This is the most common method of extending functionalities. This allows for the addition of missing functionalities in the desired ODD or, conversely, the simplification of existing functionalities. + +However, to add these functionalities, it is necessary that the interfaces of each module are properly organized. As of November 2023, such an ideal module system is not provided, and there are some limitations. For details, check the Reference Implementation section [Customize features in the current implementation](#customize-features-in-the-current-implementation). + +### 2. Replacing Sub-components of Planning + +Some users may be interested in collaboration and extension at the sub-component level. This could include, for example, replacing Mission Planning with an existing FMS service, or replacing the route generation functionality with a third-party product while using the existing Validation functionality. + +Following the [Internal interface in the planning component](#internal-interface-in-the-planning-component) described later, it is possible to collaborate and extend at the sub-component level. While complex coordination with existing Planning functionalities is not feasible, it enables collaboration between some functionalities of the Planning Component and external modules. + +### 3. Replacing the Entire Planning Component + +Companies or research labs developing autonomous driving Planning systems may be interested in evaluating the entire autonomous driving system by integrating their own Planning products with Autoware's Perception or Control modules. This is possible by replacing the entire Planning system. It is easy to replace by following the most robust and stable interfaces defined between components. However, coordination with existing planning modules is not possible. ## Component interface @@ -62,7 +122,7 @@ This section describes the inputs and outputs of the Planning Component and of i - **From Human Machine Interface (HMI)** - Feature execution: Allows for executing/authorizing autonomous driving operations, such as lane changes or entering intersections, by human operators. - **From API Layer** - - Goal: Represents the final position that the Planning Component aims to reach. + - Destination (Goal): Represents the final position that the Planning Component aims to reach. - Checkpoint: Represents a midpoint along the route to the destination. This is used during route calculation. - Velocity limit: Sets the maximum speed limit for the vehicle. @@ -91,11 +151,9 @@ This section describes the inputs and outputs of the Planning Component and of i - **Validation to Control Component** - Trajectory: Same as above but with some additional safety considerations. -## How to add new modules (WIP) +## Detailed design -As mentioned in the goal session, this planning module is designed to be extensible by third-party components. For specific instructions on how to add new modules and expand its functionality, please refer to the provided documentation or guidelines (WIP). - -## Supported Functions +### Supported features | Feature | Description | Requirements | Figure | | -------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | @@ -139,13 +197,13 @@ As mentioned in the goal session, this planning module is designed to be extensi -## Reference Implementation +### Reference Implementation The following diagram describes the reference implementation of the Planning component. By adding new modules or extending the functionalities, various ODDs can be supported. -_Note that some implementation does not adhere to the high-level architecture design and require updating._ +_Note that some implementation does not adhere to the high-level architecture design due to the difficulties of the implementation and require updating._ -![reference-implementation](image/planning-diagram.drawio.svg) +![reference-implementation](image/planning-diagram-tmp.drawio.svg) For more details, please refer to the design documents in each package. @@ -158,17 +216,16 @@ For more details, please refer to the design documents in each package. - [_pull_out_](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_path_planner/#pull-out) - _side_shift_ - [_behavior_velocity_planner_](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_velocity_planner/): calculates max speed based on the traffic rules. - - [_detection_area_](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_velocity_detection_area_module/) - - [_blind_spot_](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_velocity_blind_spot_module/) - - [_cross_walk_](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_velocity_crosswalk_module/) - - [_stop_line_](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_velocity_stop_line_module/) - - [_traffic_light_](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_velocity_traffic_light_module/) - - [_intersection_](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_velocity_intersection_module/) - - [_no_stopping_area_](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_velocity_no_stopping_area_module/) - - [_virtual_traffic_light_](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_velocity_virtual_traffic_light_module/) - - [_occlusion_spot_](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_velocity_occlusion_spot_module/) - - [_run_out_](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_velocity_run_out_module/) - - [_no_drivable_lane_](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_velocity_no_drivable_lane_module) + - [_detection_area_](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_velocity_detection_area_module/docs/detection-area-design/) + - [_blind_spot_](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_velocity_blind_spot_module/docs/blind-spot-design/) + - [_cross_walk_](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_velocity_crosswalk_module/docs/crosswalk-design/) + - [_stop_line_](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_velocity_stop_line_module/docs/stop-line-design/) + - [_traffic_light_](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_velocity_traffic_light_module/docs/traffic-light-design/) + - [_intersection_](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_velocity_intersection_module/docs/intersection-design/) + - [_no_stopping_area_](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_velocity_no_stopping_area_module/docs/no-stopping-area-design/) + - [_virtual_traffic_light_](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_velocity_virtual_traffic_light_module/docs/virtual-traffic-light-design/) + - [_occlusion_spot_](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_velocity_occlusion_spot_module/docs/occlusion-spot-design/) + - [_run_out_](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_velocity_run_out_module/docs/run-out-design/) - [_obstacle_avoidance_planner_](https://autowarefoundation.github.io/autoware.universe/main/planning/obstacle_avoidance_planner/): calculate path shape under obstacle and drivable area constraints - [_surround_obstacle_checker_](https://autowarefoundation.github.io/autoware.universe/main/planning/surround_obstacle_checker/): keeps the vehicle being stopped when there are obstacles around the ego-vehicle. It works only when the vehicle is stopped. - [_obstacle_stop_planner_](https://autowarefoundation.github.io/autoware.universe/main/planning/obstacle_stop_planner/): When there are obstacles on or near the trajectory, it calculates the maximum velocity of the trajectory points depending on the situation: stopping, slowing down, or adaptive cruise (following the car). @@ -181,6 +238,41 @@ For more details, please refer to the design documents in each package. - [_external_velocity_limit_selector_](https://autowarefoundation.github.io/autoware.universe/main/planning/external_velocity_limit_selector/): takes an appropriate velocity limit from multiple candidates. - [_motion_velocity_smoother_](https://autowarefoundation.github.io/autoware.universe/main/planning/motion_velocity_smoother/): calculates final velocity considering velocity, acceleration, and jerk constraints. +### Important information in the current implementation + +An important difference compared to the high-level design is the "introduction of the scenario layer" and the "clear separation of behavior and motion." These are introduced due to current performance and implementation challenges. Whether to define these as part of the high-level design or to improve them as part of the implementation is a matter of discussion. + +#### Introducing the Scenario Planning layer + +There are different requirements for interfaces between driving in well-structured lanes and driving in a free-space area like a parking lot. For example, while Lane Driving can handle routes with map IDs, this is not appropriate for planning in free space. The mechanism that switches planning sub-components at the scenario level (Lane Driving, Parking, etc) enables a flexible design of the interface, however, it has a drawbacks of the reuse of modules across different scenarios. + +#### Separation of Behavior and Motion + +One of the classic approach to Planning involves dividing it into "Behavior", which decides the action, and "Motion", which determines the final movement. However, this separation implies a trade-off with performance, as performance tends to degrade with increasing separation of functions. For example, Behavior needs to make decisions without prior knowledge of the computations that Motion will eventually perform, which generally results in conservative decision-making. On the other hand, if behavior and motion are integrated, motion performance and decision-making become interdependent, creating challenges in terms of expandability, such as when you wish to extend only the decision-making function to follow a regional traffic rules. + +To understand this background, this [previously discussed document](https://github.com/tier4/AutowareArchitectureProposal.proj/blob/main/docs/design/software_architecture/Planning/DesignRationale.md) may be useful. + +### Customize features in the current implementation + +While it is possible to add module-level functionalities in the current implementation, a unified interface for all functionalities is not provided. Here's a brief explanation of the methods of extending at the module level in the current implementation. + +![reference-implementation-add-new-modules](image/reference-implementation-add-new-modules.drawio.svg) + +#### Add new modules in behavior_velocity_planner or behavior_path_plnner + +ROS nodes such as [behavior_path_planner](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_path_planner/) and [behavior_velocity_planner](https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_velocity_planner/) have a module interface available through plugins. By adding modules in accordance with the module interfaces defined in these ROS nodes, dynamic loading/unloading of modules becomes possible. For specific methods of adding modules, please refer to the documentation of each package. + +#### Add a new ros node in the planning component + +When adding modules in Motion Planning, it is necessary to create the module as a ROS Node and integrate it into the planning component. The current configuration involves adding information to the target trajectory calculated upstream, and the introduction of a ROS Node in this process allows for the expansion of functionality. + +#### Add or replace with scenarios + +The current implementation has introduced a scenario-level switching logic as a method for collectively switching multiple modules. This allows for the addition of new scenarios (e.g., highway driving). + +By creating a scenario as a ros node and aligning the scenario_selector ros node with it, the integration is complete. The benefit of this is that you can introduce significant new functionalities without affecting the implementation of other scenarios (like Lane Driving). However, it only allows for scenario-level coordination through scenario switching and does not enable coordination at the existing planning module level. + + diff --git a/docs/design/autoware-architecture/planning/planning-system-literature.png b/docs/design/autoware-architecture/planning/planning-system-literature.png new file mode 100644 index 00000000000..ce1c81aba37 Binary files /dev/null and b/docs/design/autoware-architecture/planning/planning-system-literature.png differ