Planner+Control
I conclude my acquaintance with the control system of autonomous vehicle, a story about a planner and a controller. At first I thought of separating these two parts, since each of them deserves a separate post, but then I decided to combine them to make the story more interesting.
At the previous stage, the car formed an idea of the world with the most likely hypothesis of the development of events for a few seconds ahead. Now it is necessary to decide what to do for the car - to plan the trajectory of movement. Accelerate or slow down, change lanes or continue driving in your lane. Let's say the autopilot decides to overtake a slow-moving vehicle in front (the harvesting equipment is moving in the far right lane). By the way, determining that it is a slow-moving vehicle, and not a traffic jam due to an accident detour, is also not an easy task - I will tell you about this separately. It would seem that there is nothing difficult here: the speed of a slow walker is low, 300 meters along the left lane to the nearest car from behind, there is also no one in front. It's simple: turn on the left turn signal, turn the steering wheel to the left, accelerate, turn the steering wheel to the right, turn on the right turn signal, change lanes and return the steering wheel to the left. But it's not that simple. We are faced with the first difficulty. "Turn the steering wheel to the left" means to give the command to the electric booster to turn it by a certain number of degrees, with a given function of changing the rotation speed depending on the time and speed of the car.
I will explain in more detail. First, you need to start the turn slowly, accelerating it to the middle of the movement, and then slow down so that the lane change is smooth. Depending on the speed of the car, the speed of rotation of the steering wheel will also be different. If you turn the steering wheel at the same speed as when parking, the car will receive a fine for aggressive driving, if it stays in the lane at all. (If you do not turn on the turn signals, respect from BMW drivers is guaranteed). The same goes for acceleration – it should also be smooth. The maneuver algorithm is generally clear, the function is selected, the turn signal is on. But you do realize that the world is much more diverse than you can imagine? Here comes the second difficulty: what if an accident happens right in front of the car, and a truck is driving behind it? Its braking distance will be longer than the distance to the accident, and if you brake as prescribed by traffic regulations, then passengers will have little chance of survival. There is an empty left lane, which you can smoothly change to. But in such a situation, it needs to be done quickly. The computer makes such a decision in a split second, predicting the future. The autopilot must act like a professional racer. In other words, the planner and the controll should work differently in different situations. And there are countless such situations on the road.
If you think that these are all problems of the airframe and controller, I hasten to disappoint you – no. The third difficulty is the environment in which the car is located, and what kind of car it is. It's good when it's dry and warm, and our self-driving car is based on an all-wheel drive electric car. The electric car has almost no acceleration delay. By giving the command to increase acceleration (in other words, by pressing the gas pedal), the car reacts almost instantly. But with an internal combustion engine and a classic automatic transmission, this will not work. It is necessary to take into account the delay of a couple of seconds until the car switches gears down and the engine begins to transfer power to the wheels. Then a surprise appears again: on the left, without a turn signal, another car jumps out, and our maneuver is no longer safe, it needs to be canceled. Canceling a maneuver is also a maneuver, and this is also a task for the planner. It is especially difficult when the car has already left the lane and started to gain speed for overtaking, and now you need to slow down and get back in line.
领英推荐
And finally, we increase the complexity of the development of the planner by adding snow, rain, ice and other weather anomalies to the environment. If there are deep snowdrifts on the road, all our trajectories and acceleration functions need to be reviewed.
There are two approaches to airframe development. The first is an algorithmic description of all possible situations, using constructions like if ... then ... else, adding new conditions as they appear during operation. The second approach is to create a machine learning model (ML), which will take as input a hypothesis about the future development of the situation, and at the output issue commands to the steering wheel and acceleration (gas – positive acceleration, brake - negative). In the first case, a huge number of if conditions may at some point begin to negatively affect the speed of the airframe. And all the options are still not taken into account.
Therefore, I sincerely believe in the potential of an ML-based planner. However, in order for him to make 99.9% of the right decisions, he needs training on hundreds of millions of kilometers of road tests, where rare situations may occur infrequently. This makes learning a lengthy and extremely expensive process. The only logical solution is to create a simulator in which you can simulate all possible situations and "drive" millions of kilometers in one night. According to fat, you need to write a matrix, a simulation in which everything is real, in order to teach a drone to ride among people.