Autoparking
We have to make a program that parks a car in a parallel disposition. To do so the car must follow a trajectory similar to the one in this image:
On the hardware part, we can access three 2D lasers positioned on the front, right and rear of the car. We can also send linear and angular speed commands.
The software implementation is based on a finite-state machine architecture.The algorithm can be divided into four main states:
-First we have to find a free space and advance some distance to have enough space to move in reverse.
-Secondly we move backwards and move the steering wheel in the same direction of the space where we want to park.
-Then we steer in the other direction while moving backwards.
-Finally, to relocate the car into a position in line with the other car we can advance forward or backwards while steering to one side or the other depending on the situation.
To find a free space to park we check the right-side laser, until we find a position where a number of measures return enough space for the car to move into:
Then, using the rear laser, we move with the trajectory previously described without crashing with the other car. To align the car with the other we also use the rear laser, but in this case we do not only want to keep some distance with the car but also ensure that our position is similar to their.
An execution example can be seen here:

Comments
Post a Comment