2 Line following robot

The goal of this lab is to create a simulated line following differential drive robot.

Imagine that you have a differential drive robot with a camera mounted halfway between both wheels pointing down at the ground. On the ground is a black line representing the path that the robot is to follow. Starting near the beginning of the line, the robot is to follow the line to the end of the line.

In the two figures below are illustrated a simulated robot following a path and the view from its camera; in the camera view, the top of the image is the direction that the robot is travelling in, the right side of the image is on the right side of the robot (looking down on the robot), and the left side of the image is on the left side of the robot (looking down on the robot).

Based on the image obtained from the camera you need to find a way to control the robot so that it follows the line to its destination.