Wheeled and tracked robots are easy mode, and thanks to some helpful online tutorials for inverse kinematics, building quadruped, hexapod, and octopod robots is getting easier and easier. [deshipu] came up with what is probably the simplest quadruped robot ever. It’s designed to be a walking robot that’s as cheap and as simple to build as possible.
The biggest problem with walking robots is simply the frame. Where a wheeled robot is basically a model car, a walking robot needs legs, joints, and a sturdy frame to attach everything to. While there are laser cut hexapod frames out there, [deshipu]’s Tote robot uses servos for most of the skeleton. The servos are connected to each other by servo horns and screws.
The electronics are based on an Arduino Pro Mini, with a PCB for turning the Arduino’s pins into servo headers. Other than that, a 1000uF cap keeps brownouts from happening, and a 1S LiPo cell provides the power.
Electronics are easy, and the inverse kinematics and walking algorithms aren’t. For that, [deshipu] has a few tutorials for these topics. It’s a very complete guide to building a quadruped robot, but it’s still a work in progress. That’s okay, because [deshipu] says it will probably remain a work in progress until every kid on Earth builds one.
53 thoughts on “The Simplest Quadrupedal Robot Ever”
What if i told you you only need 2 servo’s per leg.
What if I told you hackaday.io host such a project.
https://hackaday.io/project/3301-pico-kubik-quadruped-robot (search for nano-kubik – simplified version)
Yes, that’s also mine :)
Kudos on all of these bots – really nice work. The Tote site is probably the most helpful IK explanation I have come across. I recently started work on my own quadrupedal robot, and I was very interested to learn that you abandoned the IK stuff for the 2DoF per leg robots – is that simply because you cannot get a wide enough range of motion out of 2 DoF?
I didn’t abandon it for all 2dof robots — tha mammal-like Katka still uses per-leg IK, albeit only in two dimensions — because that’s what you can do with 2 degrees of freedom. What I abandoned is the idea of doing a kind of global, all-legs-at-the-same-time IK for spider-like 2dof robots. There are multiple reasons for abandoning it. The math is pretty hard, but I think I could still get it to work with some optimization algorithms. There is an assumption that the floor is perfectly flat — which kinda defeats the main advantage of legs over wheels. Finally, controlling the legs doesn’t really get that much easier. You don’t really gain much compared to hardcoded sequences this way.
Actually Pico Kubik also has three servos per leg, only smaller.
Sure, you can build a quadruped robot with two servos and a 555, or something, and have it limp around somewhat predictably on your desk. But what I am aiming at here is not an equivalent of a wind-up toy that just goes in a straight line. I wanted a robot that you could actually experiment with and get useful results. For that, you need three degrees of freedom per leg.
I did a lot of experimenting, and I actually *started* with two servos per leg. Then I tried various different configurations, including a very cool quadruped in a mammalian configuration that could walk very nicely like a cat — but had a lot of trouble with turning, as that required its leg to slip. This robot does not slip. You can calculate how much it moved from the starting position. You can experiment with different gaits, with full inverse kinematics for the body, etc.
I did attempt a quadruped in the spider configuration with two servos per leg and full inverse kinematics, but the math quickly became too complicated to handle even by my PC, not to mention the Arduino. I would be super-happy if you could point me to a closed-form solution for its inverse kinematics equations :)
If you really want to minimize the number of parts, then consider this one: https://www.youtube.com/watch?v=Cn7TKL8Kux4
rock ‘n roll…check.
I love it!
Built this one a few months ago.
have a look at NUKE – Trossen Robotics.
It’s open source, and is designed for use with Dynamixel ax-12 servos but you can stip the kinematic engine out and right your own servo code. It’s written for Arduino too.
I know NUKE, but it’s written for legs with three degrees of freedom. I have that solved.
What I was trying to do was to build a robot in a spider configuration with two degrees of freedom per leg, and full-body inverse kinematics that would allow me to set the point at which each of the legs touches the ground. This is non-trivial, because unlike the case with 3 degress of freedom, all the legs affect each other, so you have to solve it for all of them at once, including the position of ground relative to the robot. It’s basically solving an equation for intersection points of 4 tori (toruses) and a plane, or at least that’s what I came up with.
What if i told you you just need only 2 servo for the whole robot?http://letsmakerobots.com/robot/project/hand-drawn-2-servo-four-legged-insect-robot
You actually only need one:
What if I replied that even though it may be simpler and work it is not as versatile and less likely to achieve human like standing stability, or in other words astable dynamic balance.
Im can easilly think of how to use only one servo peer leg. The dificulty is just have less servos than legs in a quadrupedal robot, and make it able to turn… Yet with a bit more thinking i think i can get one with only 2 servos, for 4 legs and turning..
Think about how the tanks, and some heavy machines work…
You can hardwire the whole gait in a set of mechanical levers and gears, and have it run on a single motor or even spring. Like the Strandbeest, for example: http://www.strandbeest.com/ or the hexbugs https://www.hexbug.com/
But that is a very limited toy. It can only “walk” on a level surface, doesn’t know where it is (as the legs are slipping) and can’t do anything else with its legs. It’s “done” and you can’t really extend it. And it really doesn’t have any advantage over normal wheels, maybe apart from looking a little bit more cool.
At the same time, with a robot that has 3 degrees of freedom, you can add sensors that will let it pick the best places to put the legs down, walk through uneven terrain, balance on moving surfaces, climb, dance, or even 3D print (http://www.instructables.com/id/Geoweaver-Walking-3D-Printing-Hexapod/). Sure, it is extremely difficult to program it to do that. But that’s the whole point — you can do something original and awesome. Not just another RC toy.
Although admittedly you are starting with what basically is an RC toy, you can extend it.
About inverse kinematics, anybody know some decent tuts? been reading into it for a while but my maths are just not good enough or something, a tut/guide that goes at it in great detail is what i will be needing.
I recommend you try neural networks and evolutionary algorithms instead. These types of quadruped robots have too many degrees of freedom to get the IK down to simple terms. You’ll end up just hard coding sequences of movements which isn’t particularly useful. Better to define the fitness function and let the neural network figure out the abstraction middleware.
That is actually completely untrue.
Neural networks and evolutionary algorithms are not a silver bullet — they are actually the hard way to do things. It only makes sense to use them for things that we don’t know any other way for, and even then you need to put a good deal of work to come up with the right representation and fitness functions and so on.
Also, using a neural network doesn’t mean you don’t need the inverse kinematics — it will actually be much easier if you put your sophisticated control algorithms, whatever they are, on top of inverse kinematics for your robot. Consider this quadruped: https://hackaday.io/project/3229-pengu-q1-quadruped — it uses a very cool dynamic spring-based algorithm for its gait, yet it has normal inverse kinematics underneath.
Even our own bodies have a lot of their movement-related computations hard-coded in the muscles, nerves and spinal cord. Chickens will run with their head cut off just fine — that’s because the low-level controls are hardwired.
Finally, it’s not that complicated after all, if you just take it step by step and layer by layer. The tutorial I wrote, which is linked from this article, should give you a start at least. The source code is available too, so you can even simply copy the relevant parts without understanding them, and tweak them until you get the idea.
I agree with deshipu. While I suppose you may not “get the IK down to simple terms” there are lots of examples of real time IK calculations with walking robots.
Besides deshipu’s robots there’s Stubby which uses IK with a single microcontroller:
Here’s another hexapod (mine) which uses a single microcontroller to compute all 18 servo’s IK positions at 50Hz.
Do you have any examples of walking robots which use neural networks or evolutionary algorithms? IK is kind of complicated but I think it’s a simpler solution than neural networks or evolutionary algorithms.
I know at least two examples, and they are published precisely because it’s so hard to do. It’s amazing they even walk (well, crawl, really) considering they learned it all by themselves. One of them is on youtube:
As someone who also programmed a 20dof hexapod from scratch, I completely agree with deshipu.
The IK is very easy to solve for 3 dof legs. Only thing you need is trigonometry.
Figure out how to convert from angles to 3d positions and back again. Use deshipu’s guide for a good idea on how to do this.
My algorithm from ‘wanted movement’ to servocommands is as follows:
You have to determine the position you want the tips of legs to be in ‘robotspace’. This can be done by looking at gaits of animals and figuring out how you want the legs to behave with respect to each other. Easiest here is to choose a simple cycle like ripple gait or tripod gait, but more complicated stuff is also possible for fun. If you work with a cycle, determine depending on the phase of the cycle for each leg if it’s up in the air, or on the ground. Move the ground positions in the opposite direction you want to go (or rotate in the opposite rotation you want to rotate the robot), and your robot will move in the direction you want. You’ll need to convert from robotspace to worldspace and back for this. Now if a leg is in his stage of the cycle where it’s up, linearly interpolate to a neutral position in robotspace up in the air. Determine the new position on the ground to move to and interpolate down again.
Once you have the position for each leg tip in robotspace, apply the inverse trig to determine angles of the servos, convert to servo timings and send them away over whatever interface needed.
deshipu’s quadrupeds are really cool but he doesn’t call them the “simplest ever” anywhere I can find. Why add unneeded hyperbole? IMO, deshipu’s bot’s are cool enough to stand (and walk) on their own merits without the need to exaggerate their significance.
“Simplest” is one of those extreme words (like “never” and “always”) to be used with caution. As soon as you use one of these words people will be quick to point out examples why the term is incorrect (as has already happened). IMO, the use of “simplest” almost begs to be disputed (as if we need any encouragement for dispute in the comment section).
With 12 servos, deshipu’s quadrupeds are far from the simplest. They’re pretty close to being the “simplest” 12 servo bot and I think his robots are a great example to those wanting to get involved with robotics. You don’t need an expensive kit, just some servos, a battery, a microcontroller and a few odds and ends to make a very interesting robot.
I also think it shows how software is a huge component of robotics. I think many of us could build one of these quadrupeds in a single day but I doubt many of us could write the IK and other required code these need to walk in a day.
I think the word you looking for is ‘opinion’, as in ‘in my opinion, it’s the simplest robot ever’! I am not saying that was how Brian’s intended it to be read, it’s probably more along the lines of journalistic freedom. You read the post correct? then his job is done.
As far as simple goes, Mark Tilden’s Roboquad design used one DC motor per leg. through a combination offsetting the foot from the rotation axis and angling the rotation axis from the body each leg effected a “rowing” motion and walking in any direction could be acheived by varying the direction and phasing of the legs independently an amazing degreem of control and motion was achieved
By the time it gets your drink from the kitchen it’s achieved room temperature. ;) Looks like a good platform to mod for better legs.
I was poking around the site and did not see any video of the robot in action. Is there some out there? Did I just miss it?
I didn’t record a video of this particular version yet, but I have videos of earlier prototypes:
As usual, very cool stuff deshipu. It’s great to see Hackaday acknowledge your cool quadrupeds. I’m sure I’ll want to make one of these sometime myself. They look so cool when they walk.
Please do, and send photos! I’d love to see more of them!
The biggest problem? Is not the frame,but the servos which wear out pretty fast, mostly because of the jittering.
Dynaxel are great but too pricey for such an application… so you go cheap, and, after a while, loose any interest.
Sounds like a better deal than buying a bunch of expensive dynamixels and then losing interest :)
I’ve been wanting to build a robot, but living in an apartment It’s not easy to cut/drill/shape metal for a frame. The assembly of this robot is genius. That and after finding SG90 servos on amazon for cheap I may give this a try.
If you want it cheap, try aliexpress. But be sure to order one or two more than you need, because the quality varies wildly.
If you can find servos capable of running off a 2S LiPo, you’ll save yourself a lot of trouble with voltage regulation. The HXT900 servos from HobbyKing will smoke if attached to a 2S LiPo but ICStation claims their 9G TowerPro will run off a 2S LiPo. I’m building a hex with the ICStation servos now. Hopefully what they claim is true.
I’m actually dropped the voltage regulator and just used a 1S LiPo. That’s why an earlier prototype used those small, sub-micro servos — they are rated at 3.7V. But then I tried with the cheaper SG90 servos, which theoretically require about 5V, and they worked fine too (albeit a little slower), so that’s what I’m using here, without a voltage regulator.
In a prev post, http://hackaday.com/2015/02/21/fold-a-hexapod-from-pilfered-office-supplies/ [Joshua Vasquez] mentioned to me about the OKL2-T/20-W12 Series that can output 20 amps at 5 volts.
This is great. Wonderful explanation of the math and motions. I definitely want to build one.
If anyone has bought PCBs and can spare me one I’d be happy to buy one for $5 or $10.
I can send you one if you are in EU. Shipping it over the pond doesn’t make much sense, though.
I’m in Canada but at us$10 it still makes sense to me if you’re willing to take the trouble. I’m sure I would get it in a couple of weeks. My alternative is $14 and eight weeks or an extra $19 to speed it up.
My hotmail I’d is bill_rowe_ottawa. If you send me a paypal address I can send $10 and my address.
Um, I sent you an e-mail two weeks ago, asking for your address, and still no answer. Can you just e-mail me? My address is on my homepage: http://sheep.art.pl/Radomir%20Dopieralski
Thanks, email sent.
I got my PCBs from Dirty PCBs a couple of days ago so I’m excited to get going. If anyone in North America wants one, I have lots of spares!
It looks like I have the back half of the original Tote working. I had a little trouble with the servo linkages but worked through it. It helps to drill the holes in the horns out to 1/16 inch and i used #1 machine screws and hex nuts for attaching to the PCB. One of the servos is quite jittery but i have to order more to complete it anyway. Thanks for the design, pcbs, and assembly instructions. I’m looking forward to doing more with it when i get enough servos.
I’m interested in a couple PCBs. If you add @gmail.com to my user name you get my email.
Servo jitter can be caused by bad servos but I’ve found servos can very sensitive to power supply issues. If the servos don’t get enough current or if the voltage is wrong (too high or too low), they’ll jitter.
Email sent. I’m traveling but I have one with me that I can send.
I’m so happy to see it! Can’t wait to see it walking. I see you went for a mix of the two possible ways of populating the board — the servo plugs on the bottom, but the Pro Mini plug on the top. How is that working for you?
How are you powering the servos? The jitter should go away once you are on battery power, and once the robot stands on the ground — load on the servo should help with the inertia. If that doesn’t help, you might need replacing the servo.
“I see you went for a mix of the two possible ways of populating the board — the servo plugs on the bottom, but the Pro Mini plug on the top. How is that working for you?”
Haha: done by mistake I assure you. The only real problem is that I put the battery header and switch on the bottom which is totally not workable.
Good to know that load may help with the servos – I’ll wait til I can try it.
I flipped it upside down to put the servo headers on top. This neatened up the wiring and exposed the power switch(because nobody wants a robot with no off switch). I also put the legs on the “front”. The gait does look like a forward movement but different from the rear. Also, at the end of the sequence, the legs are at full extension instead of folded up – is that correct or have i got something wrong?
The video says that it’s private, so I can’t see it, and it’s hard to say anything about the leg sequence. It will look differently for the front legs, because the direction they try to propel the robot in is different, so I wouldn’t worry much. It’s also possible, that the servos you have are reversed, but that’s easily solved by flipping the flags in servos.ino. You could try to plug one leg as front and one as hind and see if the movement makes sense together, I suppose.
Did you get it to work? Should I add you to the list of people who build their own robot based on Tote?
Not quite yet but I did get the last few servos last week so soon!
Please be kind and respectful to help make the comments section excellent. (Comment Policy)