Skip to content

yallport/sdc-EOgmaNeo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EOgmaNeo Self-Driving Car

Powered by Raspberry Pi 3B+ and Arduino

(Code not yet updated for the new version of EOgmaNeo, stay tuned for updates!)

Front side

Table of Contents

EOgmaNeo Self-Driving Car

OgmaNeo

Materials

Installation Instructions

Assembly Instructions

Train and Test


The program runs on the Pi, and performs all the online machine learning on the Pi's CPU. With the OgmaNeo library, there is no pre-training and no offloading to a more powerful machine. The network learns to predict the next command as you drive it. The car takes video from the camera and the steering angles as input, and uses a predictive hierarchy to predict the next desired steering angle. This greatly lowers the computational cost, as well as saves the time and work necessary for collecting data for other kinds of neural networks.

OgmaNeo is online (real-time) learning software. The OgmaNeo library contains implementations of Online Predictive Hierarchies based on the Feynman Machine.

If you have a machine learning problem that has to do with data changing over time, and the traditional approaches to machine learning don't work, check out OgmaNeo!

The Feynman Machine is a brain-inspired sequence prediction algorithm AI architecture for machine learning. It is a network of intercommunicating nonlinear dynamical systems, and each system can adapt to predict its future inputs. While the Feynman Machine is not for beginners due to the combination of hard math, neuroscience, and machine learning, Ogma has done an extraordinary job in packaging their software in a way that is approachable.

If you are interested in the inner workings of the Feynman Machine, read the paper "Feynman Machine: The Universal Dynamical Systems Computer" here!

EOgmaNeo is Ogma Corp's embedded version of OgmaNeo. For some tasks it is also much faster than OgmaNeo.

While OgmaNeo can run on large networks and parallel architectures like GPUs, EOgmaNeo runs on the CPU and is optimized for low-powered hardware.

EOgmaNeo is used for this SDC.

Misc:

Walkthrough for the installation process in my Docker container repository here.

  • Install the Steam controller on the Pi

  • Install Docker on the Pi

  • Ino build + upload in the Docker container

Docker image repository for setting up a Raspberry Pi 3 Stretch environment for the EOgmaDrive self-driving car.

DockerHub link.

Top

Arduino and Breadboard

The breadboard is used to multiplex the power and ground pins. There should be 3 in each + and -. The power and the ground cables connected at the breadboard are:

  • Arduino

  • Steering servo

  • Driving servo (back motor)

On the Arduino, here are the corresponding digital connections:

  • Digital 2: Driving Servo

  • Digital 3: Steering Servo

If you want, you can change the assignment in the .ino file.

The 2 remaining cables:

  • Red goes into 5V on the Arduino

  • Black goes into ground on the Arduino

Wiring

Arduino side

Steam Controller

The Steam controller dongle is directly plugged into the Pi. Steam controller installation instructions here in my Docker repository, or here, from the driver repo.

Important!

Push a button on the controller on reboot and after starting the daemon!

Traxxas Truck

I replaced the stock ESC with the Dynamite Brushed ESC because the one that comes with the car makes the car stutter randomly.

I couldn't get all the materials to fit under the truck case, so I ended up with a cable monster. You try it! Good luck!

Camera

The camera is mounted to the front of the truck.

To test if the camera works:

from picamera import PiCamera
camera = PiCamera()
camera.capture('image.jpg') 

I used this mount to mount the camera for the Raspberry Pi to the truck. It doesn't perfectly slide onto the truck, and is made for the GoPro, but with some epoxy, it got the job done. Please let me know if you find something better!

If you are using my Docker container, here are the instructions:

  • Connect all wires

  • Wait for the Pi to start

  • Pi will be looking for the controller, press a button for them to connect. After the controller is connected, you should be good to go!

To train the SDC, just drive it around for a bit. The button A switches between training and self-driving mode.


Ogma License and Copyright

OgmaCorp

The work in this repository is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. See the EOGMADRIVE_LICENSE.md and LICENSE.md file for further information. Contact Ogma via [email protected] to discuss commercial use and licensing options.

EOgmaDrive Copyright (c) 2017 Ogma Intelligent Systems Corp. All rights reserved.