Follow Line PID
In this exercise we are asked to make a car follow a red line using a PID control in a reactive loop. To know the error we will compare the x coordinate of the red line centroid we obtain from the image that returns the car's camera with the centre of the image.
In a first version, using only a proportional controll, we can prove that it tends to oscillate by seeing how it tries to stay in the line just after taking the first turn:
To solve the oscilation problem we intoduced a derivate part to the contoller. Then, by adjusting the proportional and derivative constants, and mantaining a stable linear speed, the car completes the circuit in 7 minutes(the video is reproduced at a faster speed):
The next step is to increase the linear speed and change the controller constants depending on the error to achieve a better performance.
Comments
Post a Comment