dlime / Deep-Learning-RC-Car-Data-Collector

Modified version of Sunfounder RasperryPi Car intended for deep learning data collection WORK IN PROGRESS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Deep learning data collector for Sunfounder Raspberry Pi Car Kit

Summary:

About this project:

Simple client/server application for deep learning data collection. The purpose of this project is to collect images from the front camera together with the steering wheel angle. These data can be then used to train a Deep Neural Network and achieve autonomous driving.

This code has been written for the Berlin Autonomous Robo-Race meetup

Forked from: Sunfounder Smart Video Car Kit for Raspberry Pi

Prerequisites:

This project is written for Python 2.7

On both PC and car clone the project:

            https://github.com/dlime/Deep-Learning-RC-Car-Data-Collector.git

Install the necessary libraries:

On PC:

            sudo apt-get install python-tk

On car:

            sudo apt-get install python-dev python-smbus

Install opencv2 (follow this guide)

How to run car calibration:

  • Set HOST with your car IP in client/car_calibration_client.py
  • From your car run cd server; sudo python2 car_calibration_server.py
  • From your car PC cd client; python2 car_calibration_client.py
  • Tune the parameters and press Confirm

How to run data collection:

Before proceeding:

  • Check that you installed all the required libraries
  • You have calibrated your car
  • Your PC can ping the car: ping pi@<rasperry-pi-IP>
  • You have set HOST with your car IP in client/client_app.py

From Rasperry PI run the server routing:

            cd server
            sudo python2 tcp_server.py

From user computer run the client + GUI application:

            cd client
            python2 client_app.py

Once the GUI is shown, click on RECORD or press Space to start recording webcam images. Press Space again to stop recording.

Recorded data will be stored in this way:

            server/IMG/central-N.jpg
            server/IMG/driving_log.csv

driving_log.csv file format:

            image_path,steering_angle

You'll find it very handy to make the car go at a constant speed while recording data. To do so, just press Enter or click on button AUTO RUN. The auto run will use the current speed set, beware of high values!

About Sunfounder Car Kit:

The SunFounder Smart Video Car Kit for Raspberry Pi is composed of Raspberry Pi, DC-DC Step-down Voltage Module, USB camera, DC motor driver, and PCA9685-based Servo Controller. From the perspective of software, the smart car is of client/server (C/S) structure. The TCP server program is run on Raspberry Pi for direct control of the car.
The TCP client program is run on PC to send the control command. Both the client and server programs are developed in Python language. The smart car is developed based on the open-source hardware Raspberry Pi and integrates the knowledge of mechanics, electronics, and computer, thus having profound educational significance.

Notice:

This project is meant to be used with Sunfounder Rasperry Pi Car Kit

Before you run any client routine, you must first run the server routine.


Contact:

E-mail: dario.limongi at gmail dot com

About

Modified version of Sunfounder RasperryPi Car intended for deep learning data collection WORK IN PROGRESS

License:GNU General Public License v3.0


Languages

Language:Python 100.0%