Lane follower robot

Description

The concept of the project is to create a robot that can follow a lane, as fast as possible while using an onboard camara and computing unit (Raspberry pi). In my implementation I used OpenCV for image processing and a raspberry pi camara for faster video refresh rate.

My contribution

OpenCV 

The image processing was implemented using OpenCV where the frontal camara of the robot can detect the lines. Through image transformation the system can obtain a "birds eyes view" of the lines, eliminating depth of field and knowing where the trend of the lines is going. With HSV color filter and Hough lines the profile and trend of the lines can be detected aiding the robot determine the center point of the lane plus the strength of the curve to act accordingly.

control loop for lane following

Knowing that the robot needs to have as close to the center of the lane as possible, two references are place which is then compared to the feedback, giving us all the tools necessary to create a PID system. In this application a discrete control loop allowed the robot to transform the image into steering movement keeping the robot as close to the line as possible. It’s important to note that having a limited computing unit (Raspberry Pi) plus image processing is intensive providing the system with a slow frequency of around 40 Hz. 

Implementation


The robot was able to successfully go through the lanes, but due to the slow control frequency (low computing power) the robot would have little time to compensate for the error creating an over actuated system. It is important to note that this is not a problem at lower speeds.