Let's Make Robots!

Robots With Legs; How to Walk or Run

Does your robot walk like this? http://www.youtube.com/watch?v=WTHI8o5ZOFk&feature=related Notice the heavy jarring to the machine and to the inhabitants inside. This jarring is not good for the machine, especially at the joints and may eventually break  something.

While this is about robots, I want to ask you, "How do YOU run?" Do you come down on the ball of your foot, or on your heel? Professional runners, whether sprinters or distance runners tend to run on the balls of their feet. The sprinter gets better speed and the distance runner gets less tired in a long run. If you come down on your heel, your foot takes a load from one and a half to three times your body weight. This is like having someone smacking each heel bone with a mallet about a thousand times per mile with a force equal to one and a half to three times your weight.  Special running shoes can take up some of this jarring, but only about 10% of it. With this extra compression to your ankle, knee and hip cartilage, you are much more likely to need surgery on those joints eventually. If you come down on the balls of your feet, there is essentially NO extra force than your own body weight.

Back to robots. Robots are the same in this respect.  When you move your robot at full speed (a.k.a.running) whether your robot has ankle joints or not (and I know that most do not) before setting the leg down, extend the joints (ankle, knee and hip) to nearly full extention as the leg moves forward. As the leg comes down and takes on the weight of the body, allow the joints to contract* slightly. Besides removing the jarring effect and saving your servos from early death, there is a bonus. The body of the robot will tend to stay more even and level as it moves forward.

*[ A little side note on how you might easily make shock-absorbing feet: You do not really have to use servos to do this; you can use a rubber band or a spring. Think of the bone structure of a leg and foot made like a human's. There is a heel bone sticking out the back while the main part of the foot sticks forward. Now on your robot's foot bone structure, hook a rubber band from the back of the leg down to the heel bone. When the leg is lifted, the toes naturally extend and then when the foot is set back down, as it comes down the toes/ball-of-the-foot take up the weight of the robot as the rubber band stretches. You could play with different rubber bands to get the right tension for the weight of your own robot. This could also be done with actual springs which come in a multitude of weights and sizes. ]

In walking movement notice this quadruped (4 legs) and how much more fluid its movements look. http://www.youtube.com/watch?v=nUQsRPJ1dYw  Note the flexing and fluid springiness the programmer has built into this robot's movements. And yes, proper walking versus poor jerky movement in a robot as we build them is mostly programming. Some of it can relate to using servos that are too small or driving them with too low of battery voltage (making them slip and chatter), but programming is the main thing. Keeping the body level while moving gives it a more animal-like appearance. Another key aspect is balance. You will need servos that allow the leg to move to left and right as well as the normal ones which give you front and back movement. As your robot moves forward and puts more weight onto a leg, the right/left servo should pull in towards the center of gravity so the weight of the robot moves over that foot. If this is done right, the robot could balance on that single foot. Everyone has probably noticed how a persons hips sway back and forth as they walk. This is the result of the person shifting his or her body weight to the left or right with each step.

As to learning more about how animals move here is a link that shows 2-legged, 4-legged and even 6-legged creatures movements. When you start programming your walking robot's movement, I think you may find this quite useful.  http://www.3dcognition.com/theoryBiomech.php

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Interesting topic -- walking (not running though) has been on my mind for quite some time...

I've come to think that smoothness of movement is not something that can be achieved programmatically only (of course you can always fake it). But, if you do it right, the smoothness comes as an added bonus. I mean, it's not something to pick as a goal, but it will be the result of properly implemented movement capability.

When people walk forward (basically just "controlled falling"), it seems smooth because we are balancing as well. Balancing is key here. The more sensors to know your position, heading and speed, and some (mechanical) components to counteract gravity, the smoother movement can be possible. Especially for two-legged creatures you would need to be able to throw around the weight while you move from one leg to the other to keep from falling down. We can do that with our body but most we do with our feet and toes; while, for instance, chimpansees need some extra assist from their arms (they prefer to use their feet to hang from trees).

Creatures that did prefer the ground on all fours can balance easier. But it takes some practice. Ever since I started this comment, I can't help but think of a newly born deer that can hardly stand on its own four legs and wiggles a lot. It needs some time to adjust and calibrate its gravity- and pressure-sensors and its "center-of-gravity-shifting-apparatus". After some experience, it will have no problems walking, running, or even jumping.

Same applies to robots and, yes, it does get down to programming, as all the information from all the sensors must be processed.

The aforementioned deer does not need to have as much assistance from feet as we do: it is easier to stay upright with "stumps" at the end of their legs.

A two legged creature must really have a good balancing act going, with feet that sense pressure and can shift the center of gravity in all directions -- and logic that combines it all. You could try to push it over and it should stay upright. If you did it right, it can balance on one leg, even -- by only a slight change in the angle of the feet relative to the leg (and possibly the knee and something in the hip).

"To be able to run, you must first learn to walk -- but to walk you must first learn to balance.

(Although in fact, you'll have to learn how to crawl first. Added benefit of that is that you have extra set of legs where needed, and then program your robot to prefer to fall over forward, just like we do.)

The "springy" effect of running on the ball of our feet is also not the intension, but more of a coincidence. When walking normally, the foot has to make a little flick to allow for the leg to move forward again (we don't usually drag our foot over the ground). After that 'flick', the heel will touch the ground so the other leg can move forward. That describes normal, slow, stable movement for us humans. We can walk on the balls of our feet slowly, but I find it to be harder to balance.

Increase the walking speed, putting your whole foot down is a waste of time and energy. Nature does not like waste -- and it does not need to: the forward movement (G-forces) changes the whole balancing act -- no real finetuning has to be done, a rough, yet calculated "push" by the ball of your foot is enough. It touches the ground and applies the pressure in the angle that was calculated by your calibrated sensors and processing units...   And cat-like hunters [and I'm sorry to hear about your cat, antonio], which have to respond quickly to a deers' rapid evasive manouvres, also have a tail to throw around to abruptly alter the direction.

Apart from running being an interesting subject, "stopping running" is another. Somehow, you will slowly have to apply a force to counter the momentum. If not done correct, your robot will fall over forward. Or backward. Again, some form of balancing seems required.

Oh, man, how I wish I had loads-of-money for lots of sensors, a 3D printer for parts and lots and lots of tiny and very powerful servo's -- and take this from a theoretical to a practical level ;-)

[Meanwhile I kind of forgot where I was heading with this comment -- the point kind of got burried in all the text. But seeing all the effort I put in, I thought I'd post it anyway. ;)]

That's a lot to consider, so I will attempt to answer at least partially.

You gave the example of a fawn, and I know they can stand the same day they are born, but then I look at a baby human, and see a creature that takes months before it can stand on its own [and even some time before it can move on all fours (crawl)]. I am tempted to say that robots could come in either category. I read that when OddBot first made his Chopsticks robot, he had to help it stand on its own at first and found he need to put in stronger servos to do the job. This could be seen as the robot's equivalent of developing stronger muscles.

On the subject of stopping a run, I am reminded of a horse. It extends its forward legs and throws its weight (CoG) rearward to stop quickly. We do something similar and it seems logical that a robot can be programmed to do so as well. (A self-teaching robot would have to come upon this through trial and error, which is close to how baby humans learn -lots of falling on their well-padded rumps and sometimes on their faces.) Another method for a robot to stop might be one used in automobiles, that being to turn, redirecting and dissipating the force through circular motion, though admittedly it would work better with wheeled robots than walking ones.

You said, 'The "springy" effect of running on the ball of our feet is also not the intension, but more of a coincidence'. Here I tend to disagree. Take a look at the horse again. It is walking or running on its toes all the time. Moving on our toes does a couple things. First and foremost, it makes the legs longer, but secondly it adds the ability to take up the shock of movement slowly, rather than suddenly as in the case of coming down on your heels.  Also, I was not so much speaking of running solely (pun intended) on the balls of your feet, but that it is better to come down first on the balls of the feet before the heel touches down, letting that act as a shock absorber while moving. The legs does in this fashion shorten slightly in movement, and this also gives the possibility to recoil or push off as that legs move to the rear. On that movement reference page, it mentions the dog walking or running like this, extending its legs as they come forward, to let them take up the shock of moving.

Your statement about walking being controlled falling, reminds me of the cartoon movie, Toy Story, wherein Buzz's flying is said to be "falling with style".

Balance is a learned reaction, which in the robot, we call programming. Our bodies have "accelerometer" balance sensors in the form of our inner ears. The input of those sensors to the brain are acted upon by learned responces in the brain of what to do, -how to move to avoid falling. Again we look at the baby human. They cannot balance automatically, it must be learned through time and lots of falling (-without style in this case). Next go to the child of 3, 4, and 5. Now they are starting to run more...  but think how many skinned knees, abrasions on arms, and bruised faces they must endure before they get it down to the point that they no longer fall.

I studied martial arts and one of the things we had to do was further train our balance to a level greater than a normal human. For instance there is one stance referred to as Cat Stance which relies greatly on balance and moving on the balls of your feet. In that, moving on the balls of the feet is the intension, not coincidence. I might also mention a dancer, specifically a ballet dancer who moves about on her toes. Another example from martial arts is, everyone can learn to throw a kick, but can you stand on one foot and throw multiple kicks to the front, side and rear without falling and without the need to set your raised foot on the floor/ground again. I can, but it was a learned ability; in other words, it is our version of programming. The inner ear does not hook directly to the leg or back muscles; just as with the sensors of a robot, it signals the brain and acts as inputs triggering programmed responces.

 

 

 

Oh yes you are right about the horse. I didn't realise this morning that horses and (most) other four-legged walk on their toes. Their feet aren't stumps at all. :)  That also explains the initial wiggle -- it's an extra joint that can flex.

And perhaps there's a language barrier that made that come out all wrong, my (non-)point was more that it's an observable effect of learning how to feel and use those muscles, it's not because us two-legged really are springy (our ankles and muscles are not really elastic and springy).

But yes, balance helps us a lot and we can even do the mentioned cat stance, but waiting for prey behind a tree thousands of years ago, or now, waiting in line at the groceries, it is not optimal.

(BTW, I guess you're also familair with extending your one leg forward, and then bending the leg you stand on, until your behind almost touches your heel, and then un-bend your leg. All while balanced, and the extended leg parallel to the floor. That calls for some interesting sensors and programming. Pretty cool if a robot can do this, all while getting external disturbances like wind, or people pushing at it.)

Different animals seem to have their specialities. If your robot stands in line at the groceries it calls for a different design than a fast runner. Or something that should jump and duck. It's hard to make one thing that can do it all (yet it is challenging to think it).

There's so much stuff that kind-of relates to this, like having a skin for instance -- it not only helps grabbing an egg without breaking it, but also supplies us with interesting info to base our "next step" choices on, or even abort the current step. The skin helps us to detect things that are too hot or too spiky to stand on -- and even if we mis-stepped. And, as you mentioned, while we learn to walk we get our skin bruised and feel the pain to remember us of how not to do it. :)

[Edit: Oh, and yes, I can ;-)]

Yes, I am not one who takes well to standing in line at a grocery. I will walk around the store waiting for the line to shorten, or I have even been known to put things down and go to another store that was not so busy.

" I guess you're also familair with extending your one leg forward, and..." Yes, and there is a variant where you come off the floor by pushing up with one leg only while bringing your back leg around in a round-house kick that is quite devastating, since it had so much time and distance to build up speed. Several of the other students with me and even my own students later had trouble with this one, where it seemed to come naturally to me. Everyone has their own moves they are better at than others. Those are the ones you concentrate on and perfect. (My spinning back-fist was a knockout -heh heh) Three or four good moves you are especially good at is all you need to win a (full contact) match. You mentioned, "Different animals seem to have their specialities." and that applies to humans as well. For instance, I never did get good at the flying kicks, (I learned the techniques, but was not good at them) whereas a couple of my own students mastered them very well.

--and no, I have not fought in over a decade, nor even taught. Even though I am getting pretty out of shape, I will always have the belt levels.

Posted 14 July 2011: That avatar picture of me this date is about 15 years old, back when I was still fighting. I am definitely looking old now...  CANCELLED -I took that picture back off again.

i don't think the comparison to animals is fair to take that far.
i mean one of the reasons for building robots is to do away with
such incontinent flaws as growth and having to wait for it.
in this capacity, its really just an excuse for not getting it right the first time.

be honest, you started this topic just to have an excuse to tell people u know martial arts didn't you? :P

btw: frog stance > cat stance :P

...but seriously, some observations:

the human brain does a ton of calculations to make all these things happen.
to have people develop them in software you end up with a timespan and budget equal to
that university dog robot, theres no way around it.
and even then u have a robot that is in no way dynamic. it has a limited range of capabilities,
which cannot adapt on he fly to adjust to the environment.
if the robot runs into a situation that was not programmed for, it will simply fail.

this is where we differ from robots, as we write our own software on the fly.
thats why i posted the BEAM robot video, as we need to stop looking at mammals
and start looking at insects.
if we can answer why an insect can do so much with such a tiny tiny brain, we will know how
to make robots smarter then the ones we have today.

the biggest difference i can spot between an insect and a mammal is that proportionate to its tiny brain
it does seem capable of processing rather large range sensory input.
their weakest sense by far is sight, and if u look at that our robots are nearly blind compared to them.
and most robots have only sight and nothing else.

also if i observe my own mind, it occurs to me that robots have only one conciousness, and we have several.
we make decisions with our conscious mind about where to go etc, but the actual walking is not really a matter of decision.
you don't think about every step and fall when distracted, you just chose to walk, and your legs do the rest.
so then when i compare typical robots with BEAM robots, it seems like they both have one half of that equation.
the MCU robots have a higher brain, and the BEAM bots only have a lower brain.
or you might look at it as the MCU bots having a lower brain, and the BEAM bots having only a nerve system and no brain at all.

also on subconscious locomotion, it seems to me that when i run and my posture changes, all i am really doing
is automatically looking for the most comfortable posture.
comfort has allot in common with efficiency, and it seems all that really happens is that we simply
distribute the force over as many joints as possible, so as to lighten the load on them individually,
and likewise with muscles.

lastly something that popped into my head reading all this; special olympics.
have u seen the prosthetic legs that amputee runners use?
tons of research went into developing those things, and when u see them in action, those guys can really haul @$$.
might be worth looking at...

"i don't think the comparison to animals is fair to take that far." --I make the comparison to animals because most of the people building 2-legged and 4-legged walking robots look at the animal kingdom and man himself as models to emulate. Locomotion by walking and running has been perfected over the last few million year to where it works pretty darned well. Robots are not trying to "improve" upon the animal methods (i.e. do away with flaws). We are trying rather to approach their abilities at some point.

You mentioned insects. I think the makers of 6-legged walkers do look to the insect world for inspiration. (And at arthropods/spiders for 8 legged robots.)

While the "little dog" robot I mentioned above looked a wee bit more cat-like in its movements to me, there is another robot project you may not have seen, Big Dog. The designers have allowed a degree of freedom for the legs to move out to the side as a real animals legs can, and even when one of the guys gives him a solid push / kick to the side, he does not tip over, but compensates by side-stepping. This clip shows how he almost falls different times on hillsides and even on an icy surface, but manages to recover. It is a little hard to look at a couple of those spots and realise it is a robot, not a living creature. http://www.youtube.com/watch?v=3gi6Ohnp9x8

When I saw this: "be honest, you started this topic just to have an excuse to tell people u know martial arts didn't you? :P" at first I thought, can this guy be serious? but then I noticed the   :P   at the end of the sentence.

As to writing our own software on the fly, I should mention that in the upper eschelons of robotics, there are robots that learn from experience and rewrite their own software. We saw it first in some advanced games that learn how the player plays and compensates getting better and harder to beat each time around (game AI). While still in trial stages, they are using those same principles in some robots now.

"also if i observe my own mind, it occurs to me that robots have only one conciousness, and we have several." --Actually my robot Schrödinger has two consciousnesses. It has been a problem for me to get the two brains to talk to each other and say useful things. [His left brain is in charge of movement in various direction, range sensors and obstacle avoidance, whereas his right brain controls his (meager) facial expressions, his head movements, his mood and emotions, his various lights and his eye covers.] So he is approaching the human three-brain style, (but at maybe only one billionth the actual capacity).

"...we make decisions with our conscious mind about where to go etc, but the actual walking is not really a matter of decision.
you don't think about every step and fall when distracted, you just chose to walk, and your legs do the rest." ha ha, some people do...  Haven't you heard of people being distracted and walking into a door? (grins)  Anyway, as to chosing to walk and your legs doing the rest, that is not quite so. The brain is still controlling the movements but our "consciousness" simply ignores that part, when it has little to do with another task we are concentrating on.

frog stance? hmmm. I once fought a guy who used a form I had not seen before, called "Drunken Monkey", He had some moves that were almost froglike. [I beat him but he actually came very close to winning. Luckily he repeated a move he got me with the first time around, but that time, knowing(guessing) what he was going to do, I got him. --another example of humans learning from experience.]

lol yeah everything above 'but seriously' probably shouldn't be taken seriously.

i don't see how walking into a door relates to this, seems more like a navigational misadventure to me.
but yeah thats what i was thinking of, there seems to be a bit of hierarchy in brain functions.
primary conscious routines are associated with subconscious automatic routines.

the point being that there are distinct individual process running. and i get the impression that the
process governing our body movements really come down to 2 things: maintaining balance; constant
adjustment of the center of mass, and optimizing distribution of power over the muscles; making it easy on ourselves.

imo this should be attainable IF there is enough sensory input data to derive accurate information from.
i feel this is where robots are more handicapped then anywhere else.
with the right input data it should just be a matter of clever feedback circuits or mathematical algorithms.

frog stance = feet 10-15cm apart, toes at 45 degrees outward, knees slightly bent.
it is the quintessential, and pretty much only stance in Judo (Japanese midget toss).

"Oh, man, how I wish I had loads-of-money for lots of sensors"

thats why i was thinking of piezo elements.
they are dirt cheap.

also i don't see why balance could not be achieved trough analog circuits.
http://www.youtube.com/watch?v=Y-afnY32RrY&feature=channel_video_title

 

In all honesty, me neither. :) Basically, whether you are programming in code, or in circuit, it comes down to the same thing really.

Regarding the piezo elements, I am not sure how that could work, but a quick Google reveals it is possible.

Anything that is small and can give you an output range from zero to at least twice the weight of your robot could work. (Twice, because, when you are able to detect more weight, you'll know that the top is obstructed by, for instance, a ceiling.) They may be tricky to calibrate though, but for their price, it could be a cheap alternative worth investigating.