Práctica 2: Follow Line

 

Welcome!

Figure 1. Formula 1 car

Goal:

In this exercise we are going to perform a PID reactive control (represented in a Formula 1 car) capable of following the red line painted on the middle on the road of the racing circuit.

Explanation:

In this exercise we were asked for a program that would allow a F1 car to travel the circuit as fast as possible using image filters and a controller from the PID family.

In my case I have opted for a PD controller, whose formula is as follows:

                Picture 2. Controller used in this exercise

When I was doing it using this method I have realized something that has seemed quite curious to me, and that is that after numerous attempts giving values to the constants of each controller (Kp and Kd) I have realized that the oscillation of the car is null when both constants have the same value.

I have considered the linear speed constant, varying it between a range of 2 and 2.5 when doing this practice. After several attempts I have obtained that with a linear speed of 2 it runs the circuit in a time of 3:45 (approx), and with a linear speed of 2.5 it oscillates a lot in certain sections and always ends up colliding in one of the last curves. So that´s why I have decided to take a middle point and set the linear speed to 2.25, where it completes a lap in just over 3 minutes (3:10-3:20 approx).

MULTIMEDIA CONTENT (SIMULATION IN UNIBOTICS):

Image: Representation of the route through image filtering

For the image filtering part I have used the one shown in the image, a point that is within the center line of the track, which must be kept as long as possible (if not the entire execution time) within the center line.

Picture 3. View of the F1 car in first person

Video: Execution of the program

 

Comentarios

Entradas populares de este blog

Práctica 1: Vacuum Cleaner

Práctica 3: Obstacle Avoidance