Giter Site home page Giter Site logo

donrv / carputer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from otaviogood/carputer

0.0 2.0 0.0 23.11 MB

Python 6.04% Jupyter Notebook 50.33% Arduino 1.58% C++ 3.06% Processing 0.27% C 0.05% Shell 1.15% ShaderLab 5.70% C# 21.04% HLSL 10.78%

carputer's Introduction

Carputer

Carputer is a 1/10th scale self driving car. It drives based on video camera and speedometer inputs. It uses a neural network to drive. The camera image and speedometer get sent to the neural network and the network outputs steering and throttle motor controls for the car.

Since the car uses a neural network for driving, it has to be trained. The training process is basically driving it around a track about 20 times or so using the car's radio control. During that driving, we record all of the radio control inputs along with the video and speedometer data. Once we have that, the neural network can learn how to mimic our driving style by outputting steering and throttle based on the video and speedometer.

The process is to record, train, and then run autonomously, as seen in the steps below.

This is an experimental setup, so it's not super-clean code or hardware.

Recording pipline

  1. Turn on ESC, RC controller. Plug in battery, USB. Start switch to off.
  2. Run InsomniaX and disable lid sleep and idle sleep.
  3. activate the virtualenv: source /path/to/venv/bin/activate
  4. run a script to drive and record training data: python main_car.py record -- this will let you have manual control over the car and save out recordings when you flip the switch

Run autonomously

  1. Turn on ESC, RC controller. Plug in battery, USB. Start switch to off.
  2. Run InsomniaX and disable lid sleep and idle sleep.
  3. activate the virtualenv: source /path/to/venv/bin/activate
  4. run a script to let tensorflow drive: python main_car.py tf -- when you flip the switch, you will lose manual control and the car will attempt to drive on its own
  5. for autonomous kill switch: pull throttle and turn the steering wheel
  6. to revive autonomous mode, hit the channel 3 button (near the trigger)

Training pipline

  1. convert TRAINING images to np arrays: python NeuralNet/filemash.py /path/to/data (Can be multiple paths)
  2. convert TEST images to np arrays: python NeuralNet/filemash.py /path/to/data --gen_test (Can be multiple paths)
  3. train a model: python NeuralNet/convnet02.py. Train for minimum 1500 iterations, ideally around 5000 iterations.
  4. use this model to drive the car (see above)

Analysis

  • for training info, see debug.html -- reminder: < 7 is right, > 7 is left
  • run analysis/make_video.py for debug videos
  • use analysis/plot_vs_time.py to view telemetry data

Hardware TODOs

  • Fix the radio control dropped signal error
  • Get the TX1 working
  • Get the IMU recording data

Software TODOs

  • Fix keepalive on Arduino
  • Look into remote SSH type software so we don't have to keep popping open the car.

Hardware setup

Updates - We no longer use the IMUs and we're no longer trying to run the NVidia TX1 computer. Macbook works better. Wiring diagram

Simulator

Work in progress, of course. The simulator runs in Unity. I didn't check in the lighting files because they are big, but if you build lighting, it should look like this... Unity sim

carputer's People

Contributors

otaviogood avatar gilborty avatar redsh avatar

Watchers

dvr avatar  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.