A self-driving car needs different segments in order to function properly. One of the most important sections is Motion Planning. The main purpose of this article is to review this mechanism.
Prior to delving into this section, it is necessary to establish the position of Motion Planning by investigating the overall structure of the software components for autonomous vehicles (AVs). So, please stay with “Dr.Parsa” to examine the mentioned section in more detail.
Software section structure
In the picture below, you can see the different blocks that make up the software structure of AVs. In general, different structures can be proposed. Here we present one of the most commonly used existing frameworks.

In the following, we provide a brief explanation of each block in the picture.
Environment Perception
AVs have various sensors to gather data from their surroundings. Data from these sensors are generally raw, which should be processed by the Environment Perception block so that it can be interpreted by a computer.
This block has generally three main tasks. One is to determine the current position of the vehicle, and the second is to recognize the important elements of the surrounding environment including traffic signs, other vehicles, and obstacles. The final task is predicting the movement of objects around the vehicle.
Environment Mapping
This block has the task of providing a map of the vehicle surroundings, where the position of each object is known. This obtained map can be used for various cases such as collision avoidance, motion planning, etc.
Motion Planning
Using the information obtained from the previous two blocks, this block makes all the decisions about what actions should be performed and in which direction the vehicle should move.
The output of this block should be a safe, optimal, and comfortable path that the vehicle moves along to reach its destination. After explaining the other blocks, we will scrutinize this block in more detail.
Controller
The route specified by the Motion Planning block is given to the controller. By determining the steering wheel angle, the position of the gas and brake pedals, and the gear situation, this block controls the vehicle in such a way that it can travel the outlined route.
System Supervisor
As it can be obvious from its name, this block is responsible for overseeing various systems. The System Supervisor block itself includes two parts: Supervision of both AV software (various blocks that were explained earlier) and hardware sections.

A comprehensive review of the Motion Planning block
In this section, we will examine the Motion Planning block in more detail.
In general, the Motion Planning task is a convoluted task that needs to be divided into several layers as can be seen in the figure below. For illustration purposes, each layer should be briefly described.

The first layer is called Mission Planner, which is a high-level layer and determines the general direction of the vehicle on the map. This can be accomplished through many available apps, such as Waze, Google Maps, etc. One of the existing approaches in this regard is to equate the routes on the map in the form of a graph. Then, various algorithms like Dijkstra are implemented in order to find the shortest path on the graph so that the general direction of movement can be determined. It is said that this layer manages long-term planning.
The next layer, which is called the Behavior Planner, is in charge of managing short-term planning. This layer is responsible for specifying the various activities and maneuvers of the vehicle to be performed while passing the predetermined route. Also, this layer is responsible for determining a series of restrictions to fulfill each of the vehicle activities and maneuvers. One of the examples of the operation of this layer is that based on the determined speed and the predicted behavior of the surrounding vehicles, it decides whether the car should change its route or not.
One of the important methods of artificial intelligence called Reinforcement Learning can be used in this section.
Finally, the third layer (Local Planner) is responsible for immediate and reactive planning. Moreover, it is practically in charge of specifying a Path Planner and Velocity Profile in a short period of time. The output of this layer should be smooth, optimal, and safe; also, the restrictions determined by the previous layer should be considered in it.
By taking into account the information of both fixed and moving objects, the functional range, and the output of the previous layer, this layer is able to produce the result we are looking for.