Skip to content

Planning component design#

Overview#

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.

Requirements#

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.

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.

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”.

High-level architecture#

This diagram describes the high-level architecture of the Planning Component.

overall-planning-architecture

The Planning component consists of the following sub-components:

  • 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 trajectory 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.

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.

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.

Component interface#

The following describes the input/output concept between Planning Component and other components. See the Planning Component Interface (WIP) 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
    • 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.

How to add new modules (WIP)#

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#

Feature Description Requirements Figure
Route Planning Plan route from the ego vehicle position to the destination.

Reference implementation is in Mission Planner, enabled by launching the mission_planner node.
- Lanelet map (driving lanelets) route-planning
Path Planning from Route Plan path to be followed from the given route.

Reference implementation is in Behavior Path Planner.
- Lanelet map (driving lanelets) lane-follow
Obstacle Avoidance Plan path to avoid obstacles by steering operation.

Reference implementation is in Avoidance, Obstacle Avoidance Planner. Enable flag in parameter: launch obstacle_avoidance_planner true
- objects information obstacle-avoidance
Path Smoothing Plan path to achieve smooth steering.

Reference implementation is in Obstacle Avoidance Planner.
- Lanelet map (driving lanelet) path-smoothing
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.
- Lanelet map (high-precision lane boundaries) narrow-space-driving
Lane Change Plan path for lane change to reach the destination.

Reference implementation is in Lane Change.. Enable flag in both parameters:
- Lanelet map (driving lanelets) lane-change
Pull Over Plan path for pull over to park at the road shoulder.

Reference implementation is in Goal Planner.
- Lanelet map (shoulder lane) pull-over
Pull Out Plan path for pull over to start from the road shoulder.

Reference implementation is in Pull Out Module.
- Lanelet map (shoulder lane) pull-out
Path Shift Plan path in lateral direction in response to external instructions.

Reference implementation is in Side Shift Module.
- None side-shift
Obstacle Stop Plan velocity to stop for an obstacle on the path.

Reference implementation is in Obstacle Stop Planner, Obstacle Cruise Planner. launch obstacle_stop_planner and enable flag: TODO, launch obstacle_cruise_planner and enable flag: TODO
- objects information obstacle-stop
Obstacle Deceleration Plan velocity to decelerate for an obstacle located around the path.

Reference implementation is in Obstacle Stop Planner, Obstacle Cruise Planner.
- objects information obstacle-decel
Adaptive Cruise Control Plan velocity to follow the vehicle driving in front of the ego vehicle.

Reference implementation is in Obstacle Stop Planner, Obstacle Cruise Planner.
- objects information adaptive-cruise
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.
- objects information cut-in
Surround Check at starting Plan velocity to prevent moving when an obstacle exists around the vehicle.

Reference implementation is in Surround Obstacle Checker.
- objects information surround-check
Curve Deceleration Plan velocity to decelerate the speed on a curve.

Reference implementation is in Motion Velocity Smoother.
- None decel-on-curve
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.
- objects information
- Lanelet map (static obstacle)
decel-on-curve-obstacles
Crosswalk Plan velocity to stop or decelerate for pedestrians approaching or walking on a crosswalk.

Reference implementation is in Crosswalk Module.
- objects information
- Lanelet map (pedestrian crossing)
crosswalk
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.
- objects information
- Lanelet map (intersection lane and yield lane)
intersection
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 Intersection Module.
- objects information
- Lanelet map (intersection lane)
blind-spot
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.
- objects information
- Lanelet map (intersection lane)
intersection-occlusion
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.
- objects information
- Lanelet map (intersection lane)
intersection-traffic-jam
Traffic Light Plan velocity for intersection according to a traffic light signal.

Reference implementation is in Traffic Light Module.
- Traffic light color information traffic-light
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.
- objects information run-out
Stop Line Plan velocity to stop at a stop line.

Reference implementation is in Stop Line Module.
- Lanelet map (stop line) stop-line
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.
- objects information
- Lanelet map (private/public lane)
occlusion-spot
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.
- Lanelet map (no stopping area) no-stopping-area
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.
- objects information
- Lanelet map (private/public lane)
WIP
Speed Bump Plan velocity to decelerate for speed bumps.

Reference implementation is in Speed Bump Module.
- Lanelet map (speed bump) speed-bump
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.
- Lanelet map (detection area) detection-area
Out of ODD area Plan velocity to stop before exiting the area designated by ODD (Operational Design Domain).

Reference implementation is in (WIP).
- Lanelet map (invalid lanelet) WIP
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.
- 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.
- objects information
- Lanelet map (parking area)
parking
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.
- Primitive objects aeb
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.
- None trajectory-validation
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.
- 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 and require updating.

reference-implementation

For more details, please refer to the design documents in each package.

Important Parameters#

Package Parameter Type Description
obstacle_stop_planner stop_planner.stop_position.max_longitudinal_margin double distance between the ego and the front vehicle when stopping (when cruise_planner_type:=obstacle_stop_planner)
obstacle_cruise_planner common.safe_distance_margin double distance between the ego and the front vehicle when stopping (when cruise_planner_type:=obstacle_cruise_planner)
behavior_path_planner avoidance.avoidance.lateral.lateral_collision_margin double minimum lateral margin to obstacle on avoidance
behavior_path_planner avoidance.avoidance.lateral.lateral_collision_safety_buffer double additional lateral margin to obstacle if possible on avoidance
obstacle_avoidance_planner option.enable_outside_drivable_area_stop bool If set true, a stop point will be inserted before the path footprint is outside the drivable area.

Notation#

[1] self-crossing road and overlapped#

To support the self-crossing road and overlapped road in the opposite direction, each planning module has to meet the specifications

Currently, the supported modules are as follows.

  • lane_following (in behavior_path_planner)
  • detection_area (in behavior_velocity_planner)
  • stop_line (in behavior_velocity_planner)
  • virtual_traffic_light (in behavior_velocity_planner)
  • obstacle_avoidance_planner
  • obstacle_stop_planner
  • motion_velocity_smoother

[2] Size of Path Points#

Some functions do not support paths with only one point. Therefore, each modules should generate the path with more than two path points.