amaanabbasi / projectpi

converting a human controlled RC car into a self-driving.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Final Year Project

The main objective of this project is to develop an autonomous ground vehicle. We will be converting a human controlled RC car into a self-driving. For that will make use of computer vision and image recognition techniques to make the car understand about its environment and drive safely, will go a step further and use state of the art deep learning techniques to train the car. Consequently, we will be developing a framework for effective data collection for the vehicle to train the deep learning model on.

Data collection is the most important part for a machine learning or a deep learning model. Hence will put a lot of effort in making the process of data collection efficient and effective. So as to not miss any details that might be required by the deep learning model.

Demo Video

IMAGE ALT TEXT HERE

Components

image

Raspberry pi 3 or Rpi3 will be the main component of the project and it can be called the brain of the car. It is powered by a portable power source through a usb 2.0 port on the Rpi3. This particular version of Rpi3 has a WIFI module preinstalled, which will allow us to control the car over WIFI and send/receive data. It has 40 GPIO pins that are used to attach sensors to the Rpi3. Which we will be using to control the DC motors through a motor driver (L298N). The camera is attached to the front usb port. Rpi3 is basically a mini computer that needs an operating system. We have installed headless Raspbian OS on the raspberry pi, which has extremely low storage requirements (less than 2GB).

We have two dc motors connected to a L298N motor driver. This circuit is responsible for the movement of our car. Connecting DC motors directly to the GPIO pins of Rpi3 can damage the pins hence a motor driver is used as shown in Figure

Circuit

The circuit as shown in the figure below, is responsible for controlling the motors. It contains basically two circuit boards - the green colored one is the Rpi3 (left) and the red one is the L298N (right) motor driver. The Rpi3 has four usb ports, one of which is used by a usb camera

image

Data Flow

Data flow diagram of the Vehicle image

Controlling the Car

Controlling the car manually using a keyboard, this is going to be the first approach in which we will be controlling the car remotely. In this approach, will have a web browser that will be serving a frontend to control the car and also displaying the video stream from the car’s camera. Key controls as follows:

w -> forward s -> reverse a -> left d -> right p -> stop

The car has a usb camera attached at the front so that the user can get a live video and navigate the car safely. We are using flask a python micro web framework as the web application backend. After we boot up the car (booting up the Rpi3) we need to run the flask server on it, which is going to serve a webpage at the Rpi3’s local Ip address. The user can then access the web page from a pc connected to the same network. The user is going to be presented with a live stream from the car’s usb camera and an interface to communicate with the car. The user can now navigate the car using the key controls mentioned above.

image

Circuit Diagram

image

Training

image image image

Results

image image

About

converting a human controlled RC car into a self-driving.


Languages

Language:Python 93.7%Language:HTML 6.1%Language:Shell 0.2%