daavidee / hexapod

WIP-A Hexapod robot based around Python and the Raspberry Pi
21 stars 7 forks source link

Note: This project is a work in progress.

About

This project is based around Python and the Raspberry Pi, a credit-card sized computer with GPIO, USB, 10/100 Ethernet and more. It is a 6-legged (hexapod) robot with 3 degrees of freedom per leg. Currently it can walk linearly with an optimized walking algorithm using memoization techniques, be controlled with a PS3 controller, stream video, talk via the flite TTS engine and an on-board speaker, perform basic object detection with an ultrasonic sensor using hardware interrupts offloaded to an ATmega328P, detect solid-coloured objects with the camera using a predictive object detection algorithm (currently being rewritten) and collect acceleration data from a BMA180 sensor. Additional movements, integration of all features and more are underway.

Hardware

Software Requirements

The following modules should be installed using apt-get after installing Raspbian on the Raspberry Pi:

You can then clone the repository.

I've included my sixAxis wrapper library and hcsr04 library to facilitate the addition of a ps3 and ultrasonic sensor to the robot.

The Adafruit_PWM_Servo_Driver library is also included in the source and is used for low-level control of the PCA9685 chip via the I2C bus. The NewPing and RunningMedian libraries were also used in the arduino sketch for interfacing the ultrasonic sensor.

Notes

Demo

Check out my YouTube channel for videos of the robot in action.