PDA

View Full Version : [Project] RPi Hexapod



ben
01-01-2017, 03:49 PM
Some of my goals for 2016 were to learn how to code and gain some proficiency in electronics and CAD. I always need a challenging project to get motivated so I decided on a hexapod - writing the control software and designing all the required physical parts felt like a good learning opportunity.

The code is written Python and loosely based on member TXBDan's code for his hexapod Beth (https://github.com/TXBDan/BETH_Raspi). In the course of getting things up and running I made substantial changes to how the code works but as a basis for understanding Dan's work was crucial. As of now I am using real time inverse kinematics at 60 (or 120 hz) with limited to a hexapod gait. It can strafe and rotate any direction, and combine these motions. The step time is fixed and velocity is controlled by relative step length. Control is via a PS3 controller over bluetooth.

I'm using a mix of AX12+ and AX12A's I bought used from various sources and a USB2AX. The legs, body and Pi housing are made from laser cut acrylic and were designed in Fusion 360.

A video of it in action: https://youtu.be/_YbJ1N4wZq8

This forum has been a huge source of inspiration and knowledge for me, thanks!

ben
01-01-2017, 03:55 PM
Future plans in 2017 include:

- an RPi-based custom controller with two analog sticks and a touchscreen
- an onboard camera streaming video to the controller
- a claw on the front to interact with the world
- more gaits and natural stepping with variable step durations
- real time body translation and xyz rotation while walking
- using a Lidar lite for world mapping and autonomy

Meanwhile I have another stack of AX12's on hand - I'm thinking a dog-like 4dof quadruped would be a fun next project.

KurtEck
01-02-2017, 10:25 AM
Looks great!

Zenta
01-02-2017, 02:52 PM
Nice work and good design! Great progress and the hex seem to perform nice. What do you mean by "natural stepping with variable step duration"?

Looking forward to follow your project(s).

r3n33
01-02-2017, 02:56 PM
Cool project!

How did you like using Fusion 360? I know of a few people who've tried it out recently and made some neat things :)

Your future plans look interesting, hope to see more for sure

ben
01-03-2017, 01:55 PM
Nice work and good design! Great progress and the hex seem to perform nice. What do you mean by "natural stepping with variable step duration"?

Looking forward to follow your project(s).

Thanks! In terms of the step algorithm it currently uses a fixed step time (around 200 ms) with a defined maximum translation / rotation per step. As a result, slow movement uses very small steps per 200ms while at faster speeds each step simply moves further. I think this looks too robotic at times, and would like to walk slowly with longer, slower steps. I see your robots creep along this way and it looks more like a real creature.

During development I built a simulator in pygame that shows a 2d top down view of the legs when walking. Using this I found that if the step time was too long, it would result in clashes between legs when unless the max speeds were set very low.

ben
01-03-2017, 01:59 PM
Cool project!

How did you like using Fusion 360? I know of a few people who've tried it out recently and made some neat things :)

Your future plans look interesting, hope to see more for sure

Fusion 360 is fantastic, and my only concern is the complete commitment to cloud storage which has resulted in problems at times, especially when their servers are down. For software that is free to use for students and hobbyists, it is amazingly full featured.

Zenta
01-04-2017, 06:34 AM
Ok, I see. I'm also working on a new gait algorithm and also find accelerated moves a bit challenging, but I hope to solve it too.

I can confirm your thoughts about Fusion 360. A great program and easy to use/learn. I'm not a fan of "sky-savings" only either. At least you can export a project just in case..

KurtEck
01-04-2017, 09:19 AM
I am also using Fusion 360. But I use it only in the simplest form. That is I more or less only do Sketches with push/pull....

For example a WIP case I am doing for my Well monitor board (Teensy 3.5 or 3.6 board that is size of PJRC touch screen, which has connections to screen plus LoRa + sound + a Neopixel)...
6813
Need to slightly modify top and reprint...

Also not fan on cloud storage, especially when my 1 year subscription that came with my 3d printer ran out and did not have access. I had purchased a 2nd year through Amazon for $25, which for awhile did not appear to be connected up to my account. Also was told now by email that I should also be able to use the free access as I don't sell anything... I probably should export my stuff in case I lose access again!

I have also used it (once so far) to design 3d parts to use in the 3d viewer of Diptrace. Example here is a 3d output from Diptrace that includes a my 3d Teensy 3.5/6 part, which is on a board (hat)I have to mount on an RPI or my case more likely an Odroid or UP board (although may try on RPI3)...
6814
Sorry for maybe being slightly off topic here.

Zenta
01-04-2017, 10:58 AM
I am also using Fusion 360. But I use it only in the simplest form. That is I more or less only do Sketches with push/pull....

You can do a lot with a good sketch!
Nice boards and cases Kurt.