Golang program for my junky hexapod
Switch branches/tags
Nothing to show
Clone or download
Permalink
Failed to load latest commit information.
bin Update scripts for Raspbian Feb 20, 2017
components Hack hack hack Feb 20, 2017
fake Add Head component Feb 12, 2016
main Hack hack hack Feb 20, 2017
math3d Fix/break many things Jan 2, 2017
servos Hack hack hack Feb 20, 2017
utils Implement State.FPS Jan 5, 2017
.gitignore Move Sync helper to utils Jan 30, 2016
README.md Add note about where to find STLs Oct 5, 2018
hexapod.go Hack hack hack Feb 20, 2017

README.md

Adam's Hexapod

This is the Go program which powers my hexapod. It runs on a Raspberry Pi B+, and is controlled by a Sony Sixaxis (PS3) controller. The hexapod itself is 50cm in diameter, and about 2kg. The chassis was 3d-printed with a Printrbot Simple Metal, and bolted to 24 Dynamixel AX-12A servos. Each leg has 4DOF, which makes the gait quite flexible.

Here's it is, as of June 2017:

hexapod photo

And here's an old GIF of it in action:

hexapod standing up

More GIFs here.
And here's a video.

Hardware

STL files are available at adammck/hexapod-parts, but should not be considered usable for any purpose. It's more fun to design your own, anyway. Email me if you want the SketchUp files.

Usage

  1. Spend countless hours and dollars printing and assembling the hexapod. Be sure to blow up RPi and trap fingers between moving parts for authentic experience.

  2. Provision the RPi using adammck/headless-raspbian and adammck/hexapod-infra. It runs Raspbian Jessie with QtSixa, the control program (this repo), and a few systemd services to glue everything together.

  3. Flip the power switch to boot the hexapod. If you're running tethered with an external PSU, make sure that the power switch is off to isolate the LiPo before plugging it in.

  4. Plug the Sixaxis controller in with a USB cable. You only have to do this once, to pair it with the Bluetooth adaptor. Give it a few seconds (to run sixpair), then unplug it.

  5. Build and deploy:

     bin/pi-deploy main/main.go
    

    This requires Go to be installed with cross-compilation support for Linux/ARM. That's outside of the scope of this document, but it's easy.

  6. Press the PS button to pair. The controller should rumble and flash its lights. The control program will now start, and the hexapod will initialize and stand up.

  7. Use the left stick to translate, and L2/R2 to rotate. Various other buttons do other things.

  8. Press Select and Start to shut down the servos and the RPi. Note that this doesn't entirely kill the power, so don't forget to disconnect the LiPo to avoid damaging it.

    Shut down remotely by running:

     bin/pi-poweroff
    

    Shutdown will automatically occur (with no warning) when the battery drops below 9.6 volts. This is to protect the LiPo. My 2200mAh battery usually lasts about 15 minutes on a full charge.

License

MIT