Code Monkey home page Code Monkey logo

fitrialif / shark Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tawnkramer/shark

0.0 2.0 0.0 25.8 MB

A framework for controlling, recording, training, and running a self driving robotic car. Focused now on an implementation that runs on 1/10th scale rc cars with pwm servo steering and ESC throttle controller driven by an 9865 Servo board with a RaspberryPi 3 or Jetson TX2.

License: MIT License

CMake 0.83% Python 17.38% Shell 0.06% C++ 56.13% Makefile 0.52% C 24.74% CSS 0.01% JavaScript 0.32%

shark's Introduction

shark.jpg

Shark

A framework for controlling, recording, training, and running a self driving robotic car. Focused now on an implementation that runs on 1/10th scale rc cars with pwm servo steering and ESC throttle controller driven by an 9865 Servo board with a RaspberryPi 3 or Jetson TX2.


IMAGE ALT TEXT

Goals

  • Use ZeroMQ and C/Python to create a mesh of components that are flexible and fast
  • Run all code on the robot ( pi 3 / jetson tx2 )
  • Manage things with a mobile device via web page and joystick controller
  • Train in the cloud

Build your bot

Once you are ready, you can install them as services. Check shark.service and sharkweb.service to run on startup.


Workflow

Check camera output:

  • Navigate to web page
  • Select 'robot'. You should see a live image from camera

Logging:

  • press X on PS3 Sixaxis controls to enable recording
  • left analog to steer, right analog forward to throttle
  • only recording when throttle is non zero
  • press X to disable recording

Edit logs:

  • Navigate to web page
  • Select 'log'
  • Select 'view/edit logs'
  • observe recorded logs
  • if unwanted frames, use slider, 'set trim start', and 'set trim end' to set range
  • use 'trim log' button to remove unwanted frames

Manual Training:

  • copy logs to your PC: scp [email protected]:~/projects/shark/log/*.jpg ~/projects/shark/log
  • train model on your PC: python train.py mymodel
  • cp mymodel to pi: scp mymodel [email protected]:~/projects/shark/model/
  • on the pi: python shark.py --model mymodel

Web EC2 Based Training:

  • check docs/aws_setup.md
  • Navigate to web page
  • Select 'ec2' button
  • Select 'start ec2'
  • Wait for 1 to 2 minutes and select 'check ec2' until the machine is ready.
  • Select 'prepare host' to copy code to remote host
  • From the home menu select 'log'
  • Select 'upload logs'
  • From the home menu select 'train'
  • Select 'model' and name the new model
  • Optionally select 'epochs' and set upper limit of epochs
  • Select 'train' to start training. Feedback varies depending on browser. Better luck from a desktop browser. Tested mostly on Firefox.
  • When complete, select 'push model' to tell robot predict loop to load that trained result.
  • Ready to test self driving
  • When you are done with server, select 'release ec2' to shutdown remote machine.

Self Driving:

  • hit triangle toggle start self driving.
  • use dpad up and down to modify throttle scale

shark's People

Contributors

tawnkramer avatar

Watchers

James Cloos avatar Mohd Fitri Alif Bin Mohd Kasai 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.