Skip to content

cjinn/rcdrive-raspberry

Repository files navigation

Summary

The goal of this project is to create a self-driving rc car using Raspbery Pi and a camera. The logic of steering the vehicle is done through TensorFlow on a combination of dashcam footage and iterations of the model. As of Septemeber 2019, this project is considered abandoned and is archived.

Objective

To reinforce our knowledge of electronics, machine learning and image processing in a team environment

Project Goals

RC Car

  • Purchase cheap RC car
  • Mount a Raspberry Pi and Camera
  • Implement basic control over RC car motors through Raspberry Pi

Raspberry Pi

  • Install OpenCV and Raspberry Camera
  • Stream and save raw camera footage
  • Implement edge detection

Neural Network

  • Deploy TensorFlow
  • Prepare data for inputs for TensorFlow
  • Implement model onto Raspberry Pi

Lane Detection

There are two approaches to lane detection:

  • Detection of shape (Object Detection)
  • Detection of colour (Colour Space)

Detection of colour

To select the road markings using colour, we convert the original image frame into HSV Colourspace. In OpenCV, the HSV parameters goes as follows:

  • H: 0 - 180
  • S: 0 - 255
  • V: 0 - 255

Since most road markings are white and yellow, the following HSV values are chosen:

  • White: (0, 0, 100)
  • Yellow: (62, 100, 50)

The only problem is that this is highly dependent on the camera colour calibration.

Detection of shape

With some margin of tolerance due to colour variations in road marking paint, weather, light conditions and camera colour calliberation, each value is given a tolerance of 10%.

Installation

pip dependencies

  • numpy
  • scipy
  • matplotlib
  • opencv
  • imutils
  • wiringpi
  • "picamera[array]"
  • Pillow
  • pololu-drv88350-rpi
  • gpiozero

References

About

Python deployment on Raspverry Pi for self-driving RC car

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages