Giter VIP home page Giter VIP logo

self-driving-car's Introduction

Self-Driving-Car

System Overview

This repository is an implementation of a very basic autonomous car using Python, ROS and OpenCV. This car is capable of lane following and detecting STOP signs. The car passes the images obtained from an onboard camera through a neural network to make a decision of its next control signal. This control signal is sent to an Arduino which drives the wheels. The car also uses a Haar feature-based cascade classifier to detect whether or not the current input image contains a STOP sign.

The Arduino code is currently not included in this repository.

I did this project a very long time ago when I did not realize the importance of structuring code (or making proper videos of results for that matter). The code in the repository can be a little difficult to understand and use but should be fairly straightforward if you go through this README file. I don't have the hardware I used to build the car anymore so I do not want to update the code too much. Feel free to send pull requests if you want to change something.

Who this project is for?

This project is recommended for you if you want to learn how to use very basic neural networks to program a small car to drive autonomously in structured environments.

Prequisites - basics of Neural Networks, OpenCV, Python, ROS, and Raspberry Pi. A basic understanding of cascade classifiers is also required for the STOP sign detection.

If you're interested in builing a more advanced system, I recommend you to look into Duckietown.

Hardware Requirements

You will need the following hardware to build your own autonomous car.

  • Raspberry Pi (one of the newer versions is preferable)
  • USB / Pi Camera
  • Arduino controlled RC Car

You could do away with the Arduino by directly connecting the motor driver to the Raspberry Pi. If you do use an Arduino, you may find it easier to connect it to the Raspberry Pi using a USB cable rather than using the RX and TX pins.

Code Organization

.
├── cascade_xml             # XML file for STOP sign detection using a Haar Cascade Classifier
├── computer                # Scripts which would run on your laptop/desktop rather than the Raspberry Pi
├── mlp_xml                 # XML file which stores the neural network which is used for lane following
└── pi                      # Scripts which would run on the Raspberry Pi

Setup

  1. Install ROS on your computer and the Raspberry Pi. You can also use an image for your Pi which comes preinstalled with ROS. Here's a video which shows how to do that on the Raspberry Pi 3.

  2. Ensure that your computer and the Pi are on the same network. You can do this by connecting them both to your home WiFi.

  3. Clone an instance of this repository on both your computer as well as the Pi using the following command:

git clone https://github.com/surirohit/Self-Driving-Car.git

You will also need to build a lane/arena to test the robot. You could build something like the setup below.

Results

You can find the video of the robot I developed on YouTube Self Driving Car using ROS Kinetic and Raspberry Pi

self-driving-car's People

Contributors

surirohit avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.