Skip to content

Planning component design#

The planning component makes the target trajectory (a path and a speed profile) that the vehicle follows. The trajectory must be safe, obey the traffic rules, and complete the mission.

This page has two parts. The first part gives the high-level requirements and design. The second part describes the reference implementation and the features that it supports.

Planning in Autoware 2.0

Autoware 2.0 uses the generator-selector architecture. A generator makes candidate trajectories, and a selector picks one. The rule-based scenario planner on this page is the default generator. The planning_setting launch argument selects the generator:

  • rule_based (default): scenario planning makes the trajectory, as this page describes.
  • diffusion_planner: the Diffusion Planner, a learned planner, makes the trajectory. Mission planning and the planning validator still run.

The Autoware 2.0 architecture page gives the details.

Goals and non-goals#

Autoware is an "autonomous driving platform". Users extend the driving functions for their own needs. Autoware follows the microautonomy architecture concept: high extensibility, modular functions, and clearly defined interfaces.

For this reason, the planning component does not try to solve every complex driving scenario. Instead, it gives a planning development platform that you can customize and extend easily. With this platform, users can solve many complex use cases for their own needs.

Goals#

  • The basic functions are provided, so that you can define a simple ODD. Before you extend the functions, the planning component must give the basic functions of autonomous driving. These functions include moving, stopping, and turning. They also include lane changes and obstacle avoidance in relatively safe and simple situations.
  • The functions are modular, so that users can extend them. The system adapts to different operational design domains (ODDs) with extended functions. Modules work like plug-ins. You can build systems for different needs, for example Level 4 or Level 2 driving, public or private roads, large vehicles, or small robots.
    • You can also remove functions for a specific ODD, for example a private road with no obstacles. As a result, the system can use less power or fewer sensors.
  • Human operators can extend the capability with their decisions. With operator assistance, the system can handle complex and difficult scenarios. This page does not define the type of operator. It can be a person in the vehicle during prototype development, or a remote operator who connects in an emergency during an autonomous driving service.

Non-goals#

Third-party modules can extend the planning component. As a result, these items are not goals of the planning component of Autoware:

  • To give all the functions that users need by default.
  • To give the complete functions and performance of an autonomous driving system.
  • To give a performance that is always better than human drivers, or to guarantee absolute safety.

These non-goals come from the "platform" vision of Autoware. They do not apply to a typical planning component.

High-level design#

This diagram shows the high-level architecture of the planning component. It is an ideal design, and the current implementation is different in some areas. The reference implementation section describes the implementation.

The high-level design of the planning component: mission planning, behavior and motion planning modules, and validation, with inputs from other components and the trajectory output to Control.API layerMapHuman machineinterfacePerceptionLocalizationSystemPlanning componentMission planningRoute planningGoal planningMore modulesPlanning modulesBehaviorLane changeIntersectionCrosswalkStop lineAvoidancePull overParkingMore modulesMotionPath planningVelocity planningDrivable areaFree spaceObstacle stopSlow downML plannerMore modulesValidationCollision checkTTC checkComfort checkMore modulesControlTrajectory
The planning component has three sub-components: mission planning, planning modules, and validation.

The planning component follows the microautonomy architecture and uses a modular framework. Each planning function is a module, for example lane change, intersection, or crosswalk. You can add or remove modules statically or dynamically for each use case.

The planning component has these sub-components:

  • Mission planning: calculates a route from the current position to the destination with the map data. It is similar to the route planning of a fleet management system (FMS) or a car navigation system.
  • Planning modules: plan the behavior of the vehicle for the mission, for example the target trajectory and the turn signals. There are two types of modules:
    • Behavior: calculates a safe route that obeys the traffic rules. It decides on lane changes, on the entry into intersections, and on stops at stop lines.
    • Motion: works with the behavior modules to calculate the trajectory of the vehicle. It considers the vehicle motion and the ride comfort. It includes lateral planning (the path shape) and longitudinal planning (the speed).
  • Validation: makes sure that the planned trajectory is safe and correct, and responds to emergencies. If a planned trajectory is not correct, it starts an emergency response or makes an alternative path.

Highlights#

  • Modular functions

    Route planning, lane changes, intersection handling, and other planning functions are modules with standard interfaces. You can add or change a module easily. To enable or disable a module, see how to enable or disable a planning module.

  • Separate mission planning

    Mission planning can replace the functions of an existing service, for example an FMS. With the interfaces of the high-level design, you can connect third-party services easily.

  • Separate validation

    The planning component is extensible, so it is difficult to keep the same safety level for all functions. For this reason, validation is independent of the planning modules. It keeps a minimum safety level, even when you change the planning modules.

  • Interface for the HMI

    The human machine interface (HMI) lets the planning component work with human operators, in the vehicle or remote.

Trade-offs of a separate planning component#

Autoware separates planning, perception, localization, and control into different components. This separation makes it easier to work with third-party modules. But there is a trade-off between performance and extensibility. For example, perception can process objects that planning does not need, because perception is separate from planning. Also, when planning is separate from control, it is difficult for planning to consider the vehicle dynamics. To decrease these problems, the interfaces can carry more information, or the components can do more computation.

Customize features#

The planning component can work with external modules. This diagram shows three ways to add external functions.

Three ways to extend planning: add or replace modules, replace a sub-component such as mission planning, or replace the whole planning component. In all three, planning keeps the same interfaces to the API layer, map, HMI, perception, localization, system, and control.1. Add or replace modulesAPI layerMapHMIPerceptionLocalizationSystemPlanningMission planningRoute planningGoal planningBehaviorLane changeMy moduleMotionObstacle stopMy moduleValidationCollision checkMy checkControl2. Replace a sub-componentAPI layerMapHMIPerceptionLocalizationSystemPlanningThird-partymission planningBehaviorLane changeAvoidanceMotionPath planningObstacle stopValidationCollision checkTTC checkControl3. Replace the whole componentAPI layerMapHMIPerceptionLocalizationSystemThird-partyplanning componentControlYour own or a third-party part. The other parts are from Autoware.
Add or replace modules, replace a sub-component, or replace the whole planning component.

1. Add or replace modules#

You can add new modules to the planning component, or replace existing modules. This is the usual way to extend the functions. For example, you can add a function that your ODD needs, or simplify an existing function.

To do this, the module interfaces must be well organized. The current implementation does not have a fully modular system yet, so this approach has limits. For more information, see Customize features in the current implementation and how to enable or disable a planning module.

2. Replace a sub-component#

You can also work at the sub-component level. For example, you can replace mission planning with an existing FMS service. Or you can use a third-party trajectory generator together with the existing validation.

If you follow the internal interfaces of the planning component, you can extend planning at this level. Close coordination with the existing planning modules can be limited, but you can connect some planning functions with external modules.

3. Replace the whole planning component#

Companies and research groups that develop their own planning system can use it with the perception and control components of Autoware. To do this, replace the whole planning component and follow the stable interfaces between the components. In this case, you cannot coordinate directly with the existing planning modules.

Component interface#

This section describes the inputs and outputs of the planning component and of its sub-components. The topics are the defaults of the reference implementation. The planning component interface page gives more details.

Inputs#

FromDataDescriptionTopic
MapVector mapAll static information about the environment: the lane connections for route planning, the lane shapes for the reference path, and the traffic rule information./map/vector_map
PerceptionDetected objectsObjects that the map does not know, for example pedestrians and other vehicles. Planning plans maneuvers that prevent collisions with these objects./perception/object_recognition/objects
PerceptionDetected obstaclesThe positions of obstacles. This data is more primitive than the detected objects. Planning uses it for emergency stops and other safety functions./perception/obstacle_segmentation/pointcloud
PerceptionOccupancy grid mapWhere pedestrians, vehicles, and occluded areas are./perception/occupancy_grid_map/map
PerceptionTraffic light statesThe current state of each traffic light. Planning finds the traffic lights on the path and decides whether to stop./perception/traffic_light_recognition/traffic_signals
LocalizationVehicle motionThe position, velocity, and acceleration of the ego vehicle./localization/kinematic_state, /localization/acceleration
SystemOperation modeWhether the vehicle drives in autonomous mode./system/operation_mode/state
Human machine interface (HMI)Operator approvalsA human operator starts or approves a maneuver, for example a lane change or an entry into an intersection. This is the request to cooperate (RTC) interface.Services under /planning/cooperate_commands/
AD APIDestination (goal)The final position that the vehicle must reach.Services /planning/set_waypoint_route and /planning/set_lanelet_route
AD APICheckpointsPositions on the way to the destination. Route planning uses them.Part of the route request
AD APIVelocity limitThe maximum speed of the vehicle./planning/scenario_planning/max_velocity_default

Outputs#

ToDataDescriptionTopic
ControlTrajectoryA smooth sequence of poses, twists, and accelerations that the control component must follow. The trajectory is usually 10 seconds long with a 0.1 second interval./planning/trajectory
ControlTurn signals and hazard lightsThe commands for the turn indicators (right, left) and the hazard lights, from the planned maneuvers./planning/turn_indicators_cmd, /planning/hazard_lights_cmd
SystemDiagnosticsThe state of the planning component: whether the processing runs correctly, and whether the plan is safe./diagnostics
Human machine interface (HMI)Maneuver availabilityThe state of the maneuvers that the operator can start or must approve, for example a lane change or an entry into an intersection./planning/cooperate_status/<module>
Human machine interface (HMI)Candidate pathThe path that the vehicle will drive after the operator approves the maneuver./planning/path_candidate/<module>
AD APIPlanning factorsThe reasons for the current planning behavior, for example the position of an object to avoid or of an obstacle that causes a stop./planning/planning_factors/<module>

Internal interfaces#

From → toDataDescription
Mission planning → scenario planningRouteThe way from the start to the destination, as lane IDs of the map. The route does not select one specific lane, so it can contain more than one lane. The topic is /planning/mission_planning/route (autoware_planning_msgs/msg/LaneletRoute).
Behavior planning → motion planningPathA rough position and velocity for the vehicle. The path points are usually about 1 m apart. Other intervals are possible, but they can affect the precision or performance of planning. The message is autoware_planning_msgs/msg/Path.
Behavior planning → motion planningDrivable areaThe area where the vehicle can drive, for example inside the lanes or a physically drivable area. Motion planning calculates the final trajectory inside this area. The left and right bounds of the path message carry it.
Scenario planning → validationTrajectoryThe target positions, velocities, and accelerations that the control component follows. The trajectory points are about 0.1 seconds apart. The message is autoware_planning_msgs/msg/Trajectory.
Validation → controlTrajectoryThe same trajectory after the safety checks of the planning validator.

Supported features#

This section lists the features of the reference implementation. Each feature names the module that implements it and the map data or other input that it needs. The reference implementation section lists all modules and the launch arguments that enable them.

The drawings use these conventions:

  • The blue vehicle is the ego vehicle. Traffic keeps to the left.
  • The green line with an arrow is the planned path.
  • A cyan area is a section where the ego vehicle slows down.
  • A red area is a section that the ego vehicle must not enter yet. A red line across the lane is a stop point.
  • A red vehicle, person, or cone is an object that causes the planning behavior. A grey vehicle is another vehicle.

Route and path planning#

Route planning#

Plan a route from the position of the ego vehicle to the destination.

The route goes on the road network from the start, through two checkpoints, to the goal.StartCheckpoint 1Checkpoint 2Goal
Route planning on the road network, through the checkpoints, to the goal.

Path planning from the route#

Plan the path that the vehicle follows on the route (lane following).

The ego vehicle follows the center of its lane on a straight road with two lanes.Path along the lane center
Lane following: the path follows the lane center.
  • Module: Behavior Path Planner. As an alternative, the Path Generator of Autoware Core makes a path without the behavior path modules (behavior_path_planner_type:=path_generator).
  • Needs: Lanelet map (driving lanelets).

Lane change#

Plan a path that changes lanes to reach the destination.

The ego vehicle changes from the upper lane to the lower lane to reach its destination.Lane change to the lane on the route
Lane change to the lane on the route.
  • Module: Lane Change. Launch arguments: launch_lane_change_right_module, launch_lane_change_left_module.
  • Needs: Object information and Lanelet map (adjacent lanes, where the type of the line between the lanes permits a lane change).
  • Demonstration: lane change video (2023).

Obstacle avoidance#

Plan a path that steers around obstacles.

A parked vehicle blocks part of the ego lane, so the ego vehicle plans a path that moves around it.Parked vehicleAvoidance path
Avoidance of a parked vehicle.
  • Modules: Static Obstacle Avoidance (launch argument launch_static_obstacle_avoidance) and Path Optimizer (launch argument motion_path_planner_type:=path_optimizer, the default).
  • Needs: Object information and Lanelet map (the ego lane, and the adjacent lanes that the use_lane_type parameter permits).
  • Demonstration: avoidance video (2023, when the module had the name Avoidance).

Path smoothing#

Plan a path for smooth steering.

The upper lane ends, and the ego vehicle follows a smooth path into the lower lane.Lane endsSmooth path
A smooth path into the next lane where a lane ends.

Narrow space driving#

Plan a path inside the drivable area. If the vehicle cannot stay inside the drivable area, stop the vehicle before it leaves the area.

The ego vehicle drives through a narrow crank-shaped road, and its footprint stays inside the drivable area.Footprints inside the drivable area
The footprint of the vehicle stays inside a narrow drivable area.
  • Module: Path Optimizer. The parameter enable_outside_drivable_area_stop enables the stop.
  • Needs: Lanelet map (high-precision lane boundaries).
  • Demonstration: narrow space video (2024).

Pull over#

Plan a path that pulls over to park on the road shoulder.

The goal is on the road shoulder, so the ego vehicle pulls over from the lane to the shoulder and stops at the goal.Goal on the shoulderPull over path
Pull over to a goal on the road shoulder.

Pull out#

Plan a path that pulls out from the road shoulder to start driving.

The ego vehicle starts on the road shoulder and pulls out to the lane.Pull out path
Pull out from the road shoulder to the lane.

Path shift#

Shift the path sideways because of an external instruction.

An external request shifts the path of the ego vehicle sideways in its lane.Original pathPath shifted by the requested lateral offset
The path shifts sideways by the requested offset.
  • Module: Side Shift. Launch argument: launch_side_shift_module.
  • Needs: A lateral offset request on the lateral_offset input of the Behavior Path Planner.

Velocity planning for obstacles and road shape#

Obstacle stop#

Plan the velocity to stop for an obstacle on the path.

An obstacle is on the ego lane, so the ego vehicle stops before it.Stop pointObstacle on the path
Stop before an obstacle on the path.
  • Module: Obstacle Stop in the Motion Velocity Planner. Launch argument: launch_obstacle_stop_module.
  • Needs: Object information.
  • Demonstration: obstacle stop video (2023, recorded before this function moved to the Motion Velocity Planner in 2025).

Obstacle deceleration#

Plan the velocity to slow down for an obstacle near the path.

An obstacle is next to the ego lane, so the ego vehicle slows down while it passes the obstacle.Slow down near the obstacle
Slow down near an obstacle next to the path.
  • Module: Obstacle Slow Down in the Motion Velocity Planner. Launch argument: launch_obstacle_slow_down_module.
  • Needs: Object information.
  • Demonstration: obstacle deceleration video (2023, recorded before this function moved to the Motion Velocity Planner in 2025).

Adaptive cruise control#

Plan the velocity to follow the vehicle in front of the ego vehicle.

A vehicle drives ahead in the ego lane, and the ego vehicle follows it at a safe distance.Keep a safe distanceVehicle ahead
Follow the vehicle ahead at a safe distance.
  • Module: Obstacle Cruise in the Motion Velocity Planner. Launch argument: launch_obstacle_cruise_module.
  • Needs: Object information.

Deceleration for cut-in vehicles#

Plan the velocity to reduce the risk from a vehicle that cuts in to the ego lane.

A vehicle from the next lane cuts in between the ego vehicle and the vehicle ahead, so the ego vehicle slows down.Vehicle that cuts inSlow down and keep a gap
Slow down for a vehicle that cuts in to the ego lane.
  • Module: Obstacle Cruise in the Motion Velocity Planner.
  • Needs: Object information.

Surround check at start#

Plan the velocity to keep the vehicle stopped while an obstacle is near the vehicle. It works only when the vehicle is stopped.

A pedestrian stands next to the stopped ego vehicle, so the ego vehicle does not start.Do not start while an object is near
The stopped vehicle does not start while a pedestrian is near it.

Run-out check#

Plan the velocity to slow down or stop for objects that can run out into the path.

A pedestrian on the sidewalk moves toward the path, so the ego vehicle stops before the place where they would meet.Stop before the predicted collision point
Stop for a pedestrian who moves toward the path.
  • Module: Run Out in the Motion Velocity Planner. Launch argument: launch_run_out_module.
  • Needs: Object information.
  • Demonstration: run out video (2023). It shows the earlier Run Out module of the Behavior Velocity Planner, which Autoware removed in 2025.

Collision check when the vehicle leaves its lane#

Plan the velocity to prevent a collision with vehicles in another lane when the ego vehicle goes out of its own lane, for example when a large vehicle takes a narrow turn.

  • Module: Out of Lane in the Motion Velocity Planner. Launch argument: launch_out_of_lane_module.
  • Needs: Object information and Lanelet map (driving lanes).

Curve deceleration#

Plan the velocity to slow down in a curve.

The ego vehicle slows down before and in a sharp curve to keep the lateral acceleration low.Slow down for the curve
Slow down before and in a sharp curve.
  • Module: Velocity Smoother. It limits the lateral acceleration with the parameter lateral_acceleration_limits.
  • Needs: Nothing.

Curve deceleration for obstacles#

Plan the velocity to slow down in a curve when an obstacle near the path can cause a collision.

An obstacle is at the edge of a curve, so the ego vehicle slows down more in the curve.Obstacle near the pathSlow down more for the obstacle
Slow down more in a curve with an obstacle at its edge.
  • Module: Obstacle Velocity Limiter in the Motion Velocity Planner. Launch argument: launch_obstacle_velocity_limiter_module.
  • Needs: Lanelet map (line strings with a type from the static_map_tags parameter, guard_rail by default). The parameter obstacles.dynamic_source can add the point cloud or the occupancy grid as obstacle sources (static_only by default).
  • Demonstration: obstacle velocity limiter video (2023, when the function was a separate node).

Traffic rules#

Crosswalk#

Plan the velocity to stop or slow down for pedestrians who approach or walk on a crosswalk.

A pedestrian walks onto a crosswalk, so the ego vehicle stops before the crosswalk.Stop before the crosswalk
Stop before a crosswalk when a pedestrian walks onto it.
  • Module: Crosswalk in the Behavior Velocity Planner. Launch argument: launch_crosswalk_module.
  • Needs: Object information and Lanelet map (pedestrian crossing).
  • Demonstration: crosswalk video (2023).

Stop line#

Plan the velocity to stop at a stop line.

The ego vehicle stops at the stop line that the map defines.STOPStop at the stop line, then start again
Stop at the stop line of the map.
  • Module: Stop Line in the Behavior Velocity Planner (Autoware Core). Launch argument: launch_stop_line_module.
  • Needs: Lanelet map (a traffic sign regulatory element with a stop line).
  • Demonstration: stop line video (2023).

Traffic light#

Plan the velocity at an intersection from the traffic light signal.

The traffic light is red, so the ego vehicle stops at the stop line before the intersection.Stop at the stop line on red
Stop at the stop line when the traffic light is red.
  • Module: Traffic Light in the Behavior Velocity Planner. Launch argument: launch_traffic_light_module.
  • Needs: Traffic light state information and Lanelet map (traffic light regulatory elements with stop lines).
  • Demonstration: traffic light video (2023).

Intersection: oncoming vehicle check#

Plan the velocity for a right or left turn at an intersection, to prevent a collision with oncoming vehicles.

The ego vehicle turns right across the oncoming lane at an intersection and waits because an oncoming vehicle approaches.Oncoming vehicleWait before the turn
Wait before a turn across the oncoming lane.
  • Module: Intersection in the Behavior Velocity Planner. Launch argument: launch_intersection_module.
  • Needs: Object information and Lanelet map (intersection lanes with the turn_direction tag, and right_of_way regulatory elements with yield lanes).
  • Demonstration: intersection video (2023).

Intersection: blind spot check#

Plan the velocity for a right or left turn at an intersection, to prevent a collision with vehicles, motorcycles, or bicycles that come from behind in the blind spot.

The ego vehicle turns left, and a bicycle comes from behind on its left side, so the ego vehicle waits before the turn.Bicycle in the blind spotWait before the left turn
Wait before a left turn when a bicycle comes from behind.
  • Module: Blind Spot in the Behavior Velocity Planner. Launch argument: launch_blind_spot_module.
  • Needs: Object information and Lanelet map (intersection lanes with the turn_direction tag).
  • Demonstration: blind spot video (2024).

Intersection: occlusion check#

Plan the velocity for a right or left turn at an intersection, to reduce the risk from vehicles that can come out of an occluded area.

A large vehicle hides part of the oncoming lane, so the ego vehicle waits before it turns right across that lane.Large vehicleOccluded areaWait before the turn
Wait before a turn when a large vehicle hides part of the oncoming lane.
  • Module: Intersection in the Behavior Velocity Planner.
  • Needs: Object information, the occupancy grid map, and Lanelet map (intersection lanes with the turn_direction tag).
  • Demonstration: intersection occlusion video (2024).

Intersection: traffic jam detection#

Plan the velocity so that the vehicle does not enter an intersection when a vehicle is stopped after it because of a traffic jam.

Vehicles are stopped just after the intersection, so the ego vehicle does not enter the intersection.Stopped vehiclesDo not enter the intersection
Do not enter the intersection when its exit is blocked.

Merge from a private area to a public road#

Plan the velocity to enter a public road from a private area, to prevent a collision with pedestrians or other vehicles.

  • Module: the merge from private road function of the Intersection module. Launch argument: launch_merge_from_private_module (false in the default preset).
  • Needs: Lanelet map (an intersection lane with the turn_direction tag and the location=private tag, which leads to a lane that does not have the location=private tag). The function stops the vehicle once at the stop line. It does not read object information. The Intersection module checks the other vehicles.

No stopping area#

Plan the velocity so that the vehicle does not stop in an area where stopping is not permitted, for example in front of the exit of a fire station.

A vehicle stops just after a no stopping area, so the ego vehicle stops before the area and does not stop in it.No stopping area (for example, a fire station exit)Stop before the areaStopped vehicle
Stop before a no stopping area when a vehicle is stopped after it.
  • Module: No Stopping Area in the Behavior Velocity Planner. Launch argument: launch_no_stopping_area_module.
  • Needs: Object information (stopped vehicles after the area) and Lanelet map (a no_stopping_area regulatory element).

Detection area#

Plan the velocity to stop at the stop line of a detection area when an object is in the area.

An object is in a detection area of the map, so the ego vehicle stops at the stop line that belongs to the area.Stop lineDetection area with objects
Stop at the stop line when objects are in the detection area.
  • Module: Detection Area in the Behavior Velocity Planner. Launch argument: launch_detection_area_module.
  • Needs: Lanelet map (a detection_area regulatory element) and the obstacle point cloud. The target_filtering parameters can also select object classes from the object information (none by default).
  • Demonstration: detection area video (2023).

Speed bump#

Plan the velocity to slow down for a speed bump.

A speed bump is on the road, so the ego vehicle slows down before it and while it drives over it.Speed bumpSlow down
Slow down before and on a speed bump.
  • Module: Speed Bump in the Behavior Velocity Planner. Launch argument: launch_speed_bump_module (false in the default preset).
  • Needs: Lanelet map (a speed_bump regulatory element).
  • Demonstration: speed bump video (2024).

No drivable lane#

Plan the velocity to stop before a lane that is outside the operational design domain (ODD). If autonomous mode starts in such a lane, stop the vehicle.

The road ahead is a no drivable lane, so the ego vehicle stops before it.No drivable laneStop before the no drivable lane
Stop before a no drivable lane.
  • Module: No Drivable Lane in the Behavior Velocity Planner. Launch argument: launch_no_drivable_lane_module (false in the default preset).
  • Needs: Lanelet map (lanelets with the no_drivable_lane=yes tag).

Occlusion spot check#

Plan the velocity to slow down for objects that can come out of an occluded area, for example from behind a building or a large vehicle.

A building hides a side street, so the ego vehicle slows down in case a pedestrian comes out of it.BuildingBuildingOccluded areaSlow down near the occlusion spot
Slow down where a building hides a side street.
  • Module: Occlusion Spot in the Behavior Velocity Planner. Launch argument: launch_occlusion_spot_module (false in the default preset).
  • Needs: The occupancy grid map (detection_method: occupancy_grid, the default) or object information (detection_method: predicted_object). The occupancy grid method also uses object information. With use_partition_lanelet (the default), it also uses Lanelet map line strings of the types guard_rail, fence, and wall.
  • Demonstration: occlusion spot video (2024).

Parking#

Parking#

Plan the path and the velocity to a goal in a parking area.

The ego vehicle drives forward in a parking lot, then reverses into an empty parking space.Reverse into the empty parking spaceTurning point: forward, then reverse
Drive forward, then reverse into an empty parking space.

Safety#

Trajectory validation#

Make sure that the planned trajectory is safe. If it is not safe, take an action: for example, change the trajectory, stop sending it, or report the problem to the autonomous driving system.

The planning validator sends a valid trajectory to Control. A trajectory with a sharp zigzag fails the checks, and the validator replaces it with the last valid trajectory or reports it.Valid trajectory: passes the checks and goes to ControlInvalid trajectory (sharp zigzag): fails the checks. The validator replaces it or reports it.
A valid trajectory goes to Control. An invalid trajectory fails the checks, and the validator replaces it or reports it.

Autonomous emergency braking (AEB)#

Do an emergency stop if a collision with an object ahead is predicted. This function is the last safety layer. It must work even when localization or perception fails.

The ego vehicle comes too close to the vehicle ahead and brakes hard to prevent a collision.!Predicted collision: emergency braking
Emergency braking when the vehicle ahead is too close.
  • Module: Autonomous Emergency Braking in the control component. Launch argument: launch_autonomous_emergency_braking (control preset).
  • Needs: Primitive objects (point clouds).

Minimum risk maneuver (MRM)#

Give the correct minimum risk maneuver when a hazardous event occurs. For example, when a sensor fails, send an instruction for an emergency stop, a comfortable stop, or a pull over to the shoulder, for the severity of the situation.

Map tools#

Running lane map generation#

Make a lane map from the localization data that you record during manual driving.

  • Tool: bag2lanelet in autoware_tools.
  • Needs: A rosbag with the /tf topic, recorded while you drive the route.

Running lane optimization#

Optimize the centerline (the reference path) of the map, so that it is smooth for the vehicle kinematics.

Reference implementation#

This diagram shows the reference implementation of the planning component. You can add new modules or extend the functions to support different ODDs.

The implementation does not follow the high-level architecture in some areas, because of implementation difficulties. These areas need an update.

The reference implementation of the planning component: mission planning, scenario planning with lane driving and parking, the velocity smoother, and the planning validator, with the Diffusion Planner as an optional trajectory source.AD APIGoal, checkpoints, velocity limitMap, perception, localization, HMILanes, objects, obstacles, traffic lights, ego state, approvalsPlanningMission planningmission_plannerRoute on the lanelet mapGoal, checkpointsScenario planningDefault trajectory source: planning_setting:=rule_basedLane drivingBehavior planningbehavior_path_plannerPath and drivable area: lane change, avoidance, start, goal, ...behavior_velocity_plannerVelocity for traffic rules: crosswalk, intersection, traffic light, ...RouteMotion planningelastic_band_smootherpath_optimizermotion_velocity_plannerObstacle stop, slow down, cruise, ...surround_obstacle_checkerOptional, off by defaultPathParkingcostmap_generatorOccupancy gridfreespace_plannerPath in free spaceRoutescenario_selectorLane driving or parkingvelocity_smootherVelocity, acceleration, jerkexternal_velocity_limit_selectorTrajectoryTrajectoryRouteVelocity limitAD API, other modulesValidationplanning_validatorChecker pluginsLearning-basedDiffusion Plannerplanning_setting:=diffusion_plannerControl/planning/trajectory
The reference implementation of the planning component, with the Diffusion Planner as an optional trajectory source.

The launch files are in autoware_planning_launch in autoware_launch. A module preset selects the modules that launch. The default preset is default_preset.yaml in autoware_planning_config. To use another preset, set the planning_module_preset launch argument. For more information, see how to enable or disable a planning module.

Nodes#

NodePackageWhat it does
mission_plannerautoware_mission_planner_universeCalculates the route from the start to the goal from the map. The route_selector node of the same package switches between the normal route and the MRM route.
behavior_path_plannerautoware_behavior_path_plannerCalculates the path and the drivable area from the traffic rules. It loads the behavior path modules as plugins.
behavior_velocity_plannerautoware_behavior_velocity_planner (Core)Calculates the maximum speed from the traffic rules. It loads the behavior velocity modules as plugins.
elastic_band_smootherautoware_path_smootherSmooths the path. Launch argument: motion_path_smoother_type (elastic_band or none).
path_optimizerautoware_path_optimizerCalculates a kinematically feasible path inside the drivable area. Launch argument: motion_path_planner_type (path_optimizer, path_sampler, or none).
motion_velocity_plannerautoware_motion_velocity_planner (Core)Adjusts the trajectory velocity for the obstacles around the vehicle. It loads the motion velocity modules as plugins.
surround_obstacle_checkerautoware_surround_obstacle_checkerKeeps the vehicle stopped while obstacles are near it. It works only when the vehicle is stopped. Launch argument: launch_surround_obstacle_checker.
costmap_generatorautoware_costmap_generatorMakes a costmap for the parking scenario from the objects and the lane information.
freespace_plannerautoware_freespace_plannerCalculates a trajectory in free space, for example a parking lot, and considers the feasibility (for example the curvature). The freespace planning algorithms page describes the algorithms.
scenario_selectorautoware_scenario_selectorSelects the trajectory of the current scenario (lane driving or parking).
external_velocity_limit_selectorautoware_external_velocity_limit_selectorSelects one velocity limit from the limits of the AD API and the planning modules.
velocity_smootherautoware_velocity_smoother (Core)Calculates the final velocity with the velocity, acceleration, and jerk limits. Launch argument: velocity_smoother_type (JerkFiltered by default).
hazard_lights_selectorautoware_hazard_lights_selectorSelects the hazard lights command from the behavior path planner and from the MRM operators.
planning_validatorautoware_planning_validatorMakes sure that the trajectory is valid before it goes to the control component. It loads the validator checkers as plugins.

Autoware Core also has a minimal planning pipeline in autoware_core_planning: the mission planner, the path generator, the behavior velocity planner, the motion velocity planner, and the velocity smoother.

Behavior path planner modules#

ModuleLaunch argumentDefault preset
Static obstacle avoidancelaunch_static_obstacle_avoidanceOn
Avoidance by lane changelaunch_avoidance_by_lane_change_moduleOn
Dynamic obstacle avoidancelaunch_dynamic_obstacle_avoidanceOff
Lane changelaunch_lane_change_right_module, launch_lane_change_left_moduleOn
External request lane change (autoware_behavior_path_external_request_lane_change_module)launch_external_request_lane_change_right_module, launch_external_request_lane_change_left_moduleOff
Goal plannerlaunch_goal_planner_moduleOn
Start plannerlaunch_start_planner_moduleOn
Side shiftlaunch_side_shift_moduleOn
Bidirectional trafficlaunch_bidirectional_traffic_moduleOn
Direction changelaunch_direction_change_moduleOff
Sampling planner (experimental)launch_sampling_planner_moduleOff

Lane following is not a separate module. The behavior path planner itself makes the reference path from the lane centerline.

Behavior velocity planner modules#

ModuleLaunch argumentDefault preset
Crosswalklaunch_crosswalk_moduleOn
Walkwaylaunch_walkway_moduleOn
Traffic lightlaunch_traffic_light_moduleOn
Intersectionlaunch_intersection_moduleOn
Merge from private road (in the intersection package)launch_merge_from_private_moduleOff
Roundaboutlaunch_roundabout_moduleOff
Blind spotlaunch_blind_spot_moduleOn
Detection arealaunch_detection_area_moduleOn
Virtual traffic lightlaunch_virtual_traffic_light_moduleOn
No stopping arealaunch_no_stopping_area_moduleOn
Stop line (Core)launch_stop_line_moduleOn
Occlusion spotlaunch_occlusion_spot_moduleOff
Speed bumplaunch_speed_bump_moduleOff
No drivable lanelaunch_no_drivable_lane_moduleOff

Motion velocity planner modules#

ModuleLaunch argumentDefault preset
Obstacle stop (Core)launch_obstacle_stop_moduleOn
Obstacle slow downlaunch_obstacle_slow_down_moduleOn
Obstacle cruiselaunch_obstacle_cruise_moduleOn
Dynamic obstacle stoplaunch_dynamic_obstacle_stop_moduleOn
Out of lanelaunch_out_of_lane_moduleOn
Obstacle velocity limiterlaunch_obstacle_velocity_limiter_moduleOn
Run outlaunch_run_out_moduleOn
Boundary departure prevention (experimental)launch_boundary_departure_prevention_moduleOn
Road user stoplaunch_road_user_stop_moduleOn

Planning validator checkers#

CheckerLaunch argumentDefault preset
Latency checker (autoware_planning_validator_latency_checker)launch_latency_checkerOn
Trajectory checkerlaunch_trajectory_checkerOn
Intersection collision checkerlaunch_intersection_collision_checkerOn
Rear collision checkerlaunch_rear_collision_checkerOn

Important information in the current implementation#

The current implementation has two important differences from the high-level design: the scenario layer, and the clear separation of behavior and motion. The current performance and implementation difficulties are the reasons for these differences. It is still open whether to add them to the high-level design or to change the implementation.

The scenario planning layer#

Driving in structured lanes and driving in free space, for example a parking lot, need different interfaces. For example, lane driving can use a route of map IDs, but planning in free space cannot. The scenario layer switches the planning sub-components for each scenario (lane driving, parking, and others). This gives a flexible interface design. But it is difficult to use the same modules in different scenarios.

Separation of behavior and motion#

A classic approach divides planning into "behavior", which decides the action, and "motion", which calculates the final movement. But this separation decreases the performance, and the performance decreases more when the separation increases. For example, behavior makes decisions without the result of the motion calculation, so its decisions are usually conservative. If behavior and motion are one part, the motion performance and the decisions depend on each other. Then it is difficult to extend only the decisions, for example for the traffic rules of a region.

This earlier design discussion gives more background.

Customize features in the current implementation#

You can add functions at the module level in the current implementation. But not all functions have a common interface. This section describes how to extend the current implementation at the module level.

Where you can extend the current implementation: plugin modules in the behavior path, behavior velocity, and motion velocity planners and in the planning validator, new ROS nodes between the existing nodes, and new scenarios next to lane driving and parking.Lane drivingBehavior planningbehavior_path_plannerLane changeStatic avoidanceStart plannerGoal plannerSide shiftNew modulepath_with_lane_idbehavior_velocity_plannerCrosswalkIntersectionTraffic lightStop lineDetection areaNew moduleMotion planningpathelastic_band_smoother and path_optimizertrajectoryNew ROS nodetrajectorymotion_velocity_plannerObstacle stopObstacle cruiseSlow downRun outOut of laneNew moduleParkingcostmap_generatorfreespace_planneroccupancy_gridNew ROS nodetrajectoryNew scenarioFor example, highway drivingscenario_selectorSwitches between the scenariostrajectorytrajectorytrajectoryvelocity_smoothertrajectoryplanning_validatorLatencyTrajectoryIntersectionRear collisionNew checkertrajectorytrajectoryTo controlLegendROS nodePlugin moduleWhere you can extend
Extension points: plugin modules, new ROS nodes, and new scenarios.

Add a module to a planner node#

The behavior path planner, the behavior velocity planner, and the motion velocity planner load their modules as plugins. The planning validator loads its checkers as plugins too. If you write a module that follows the module interface of the node, the node can load and unload it. The documentation of each package explains how to add a module. For example, the template module is a starting point for a new behavior velocity module.

Add a ROS node to the planning component#

You can also add a function as a ROS node in motion planning. Each node in the current pipeline adds information to the trajectory that the nodes before it calculated. A new node in this pipeline can extend the functions.

Add or replace a scenario#

The current implementation switches between scenarios. With this switch, you can change many modules together. You can also add a new scenario, for example highway driving.

To add a scenario, make it a ROS node and connect it to the scenario_selector node. A new scenario can add large new functions without an effect on the other scenarios, for example lane driving. But scenarios coordinate only through the scenario switch. They cannot coordinate with the existing planning modules.