OpenCV Racecar simulation


This project is my work with an organisation - Unibotics, which is a learning academy for Robotics.


Racecar Simulation


There is a simulation of a world with an arbitary Racetrack, and the task is to code an algorithm to simulate the motion of a racecar on it, making sure the car doesn't deviate from the path.
The only inputs you can give to the car are linear and angular velocity.
The only sensory data you got from the car was the image of the road right in front from a camera mounted in front of the car.






I used the OpenCV library to map the image taken by the camera , and found the coordinates of center of the road ahead.Then I coded an inverse algorithm to direct the car to the center.


Code: link