Skip to content

Planning component design#

Overview#

Planning stack acts as the “brain” of autonomous driving. It uses all the results from Localization, Perception, and Map stacks to decide its maneuver and gives final trajectory to Control stack.

Role#

These are high-level roles of Planning stack:

  • Calculates route that navigates to desired goal
  • Plans trajectory to follow the route
    • Make sure that vehicle does not collide with obstacles, including pedestrians and other vehicles
    • Make sure that the vehicle follows traffic rules during the navigation. This includes following traffic light, stopping at stoplines, stopping at crosswalks, etc.
  • Plan sequences of trajectories that is feasible for the vehicle. (e.g. no sharp turns that is kinematically impossible)

Input#

The table below summarizes the overall input into Planning stack:

Input Topic Name(Data Type) Explanation
Vehicle Pose /tf (map->base_link)
(tf::tfMessage)
Planning requires vehicle pose in map frame, which is the frame where all planning takes place.
Vehicle Kinematics /localization/kinematic_state
(nav_msgs/msg/Odometry)
This includes vehicle's pose and velocity information. It is used to predict future pose on trajectory to detect collision with other objects.
Map data /map/vector_map
(autoware_auto_mapping_msgs/msg/HADMapBin)
This includes all static information about the environment, such as:
  • Lane connection information used for route planning from starting position to goal position
  • Lane geometry to generate reference path used to calculate trajectory
  • All information related to traffic rules
Detected Object Information /perception/object_recognition/objects
(autoware_auto_perception_msgs/msg/PredictedObjects)
This includes information that cannot be known beforehand such as pedestrians and other vehicles. Planning stack will plan maneuvers to avoid collision with such objects.
Detected Obstacle Information /perception/obstacle_segmentation/pointcloud
(sensor_msgs/msg/PointCloud2)
This includes information on the location of obstacles. This is more primitive information and is used for emergency stops, etc.
Occupancy Map Information /perception/occupancy_grid_map/map
(nav_msgs/msg/OccupancyGrid)
This includes information that cannot be known beforehand such as pedestrians and other vehicles. Planning stack will plan maneuvers to avoid collision with such objects.
TrafficLight recognition result /perception/traffic_light_recognition/traffic_signals
(autoware_auto_perception_msgs/msg/TrafficSignalArray)
This is the real time information about the state of each traffic light. Planning stack will extract the one that is relevant to planned path and use it to decide whether to stop at intersections.
Goal position /planning/mission_planning/goal
(geometry_msgs::PoseStamped)
This is the final pose that Planning stack will try to achieve.
Check point position /planning/mission_planning/check_point
(geometry_msgs::PoseStamped)
This is the midpoint that Planning will try to go at on the way to the destination. This is used when calculating the route.

Output#

The table below summarizes the final output from Planning stack:

Output Topic(Data Type) Explanation
Trajectory /planning/trajectory
(autoware_auto_planning_msgs/msg/Trajectory)
This is the sequence of pose, twist and acceleration that Control stack must follow. This must be smooth, and kinematically possible to follow by the Control stack. By default, the trajectory is 10 seconds long at 0.1 second resolution.
Turn Signal /planning/turn_indicators_cmd
(autoware_auto_vehicle_msgs/msg/TurnIndicatorsCommand)
This is the output to control turn signals of the vehicle. Planning stack will make sure that turn signal will be turned on according to planned maneuver.
Hazard Signal /planning/hazard_lights_cmd
(autoware_auto_vehicle_msgs/msg/HazardLightsCommand)
This is the output to control hazard signals of the vehicle. Planning stack will make sure that hazard signal will be turned on according to planned maneuver.

Implementation#

The implementation of the planning module in the latest version is shown as below.

reference-implementation

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

Supported Functions#

supported-functions

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.