This thesis deals with a controller of an autonomous vehicle in a simulated environment. The vehicle has a mounted camera that captures images of the environment around the vehicle. The images are then processed by passing them through a machine vision algorithm. This allows the controller to regulate the position of the vehicle to follow the driveway. Another feature of the controller, stopping at traffic lights, is implemented in a similar fashion. The vehicle also has a mounted lidar system that supplies us with information of objects in the proximity of the vehicle. This data is then processed in order to detect and avoid obstacles on the driveway. The solution is coded in the C programming language in the WeBots robotics simulator.