How to get biped Pete walking PROPERLY?

hey guys,

ive finally got my biped Pete together and running so i have made a few attempts at getting him walking. although he does walk, i’m really looking to learn how to do it properly.

what methods are you guys using for walking? how do you obtain the walk sequence?

at the moment all i am doing is running a list of hservo commands for the positions i need the servos to be in to make him walk, then looping through the sequence.

any help on this topic, would be great

I don’t have a Biped Pete, just my little Loki! A little simpler. I used SEQ initially to move my servos, but I can do it in Loki’s code now. I save all four servo positions for each state in a gait sequence I’m generating. This way, I can step through the sequence in either direction.

I initially thought I’d work out the IK code for Loki’s gaits, but I still haven’t found it necessary. A little different then a hexapod. I’ve found that I can get a full gait cycle in about 6 states. And I can loop through them repeatedly as you’ve discovered to accomplish my walks and turns.

Alan KM6VV

I have the original bi-ped pete, and I wrote my own “sequencer” software package that writes the code to use a Basic Stamp to drive the SSC-32 to control the robot. Some pictures of it can be seen on my website.

Basically I created a set of special routines. All based on a single reference point, Standing Still.

Here are some of the basic routines I use:

  1. Step forward from the Standing Still reference.
  2. Step forward from a previous Step Forward positon
  3. Step forward to the Standing Still reference from a previous Step Forward position.
  4. From a Standind Still reference do a twist turn 45 degrees (actal angle changes based on the surface the robot is on).

With these four basic routines, I group them together to get different walking sequences.

Each routine will have a several servo move sequences. The key is to make sure that each one blends together. I determined mine via the old fashion trial and error approach. Once I had each sequence figured out, I made a set of subroutines that the microcontroller would call to get the robot to work.

Conceptually this isn’t hard to do, but more time consuming. Especially when you end up writing your own sequencer program long before the sequencer program existed.

Pete

Curious, what is your website Pete? I would love to check out your bipeds…

When I did my biped, I found out similar groups of sequences as well. There’s a difference between taking the first step standing still versus taking subsequent steps once it is started. The sequences in the Bioloid Humanoid walking gait, there’s a set of motions from standing still and taking the first step forward and there’s another set of motions that assume that the legs are already in a “scissor” type of configuration when taking the next step.

What I did with my biped scout, I started by defining the max and min of each servo joint and then making sure that none of the moves are stepping beyond these boundaries (you don’t want the servos to get stuck). Then, I made myself a spread sheet to go through each of the sequences.

What I’ve learned most from this experience is the resolution of entire sequence. The more sequences you have for a given move, the finer the resolution, therefore giving you a smoother motion. Once you solved for the initial step and subsequent steps, you can then loop it forever until an event happens, like a sensor reading perhaps. Once you solve for these values, you can get even more fancier and group each set of moves so that you can control the motion of the biped at a higher level to interface it easier with higher level code (such as decision making from sensors and telemetry and forming a statistics perhaps).

To get any legged creature to walk is quite a challenge. You shouldn’t worry whether the sequence is perfect to begin with. Once you have a sequence to make it walk, then you should start refining for better balance, performance, and/or higher foot clearance.

The best thing you can do for yourself up front is to make sure you gather tons of info for your sequence and keep those documented clearly, so that you can always refer back to it and refine those data…

My website is www.walkingrobots.com

Not a lot there right now. I will be adding stuff as I have time, or if others get me motivated towards certain topics. I have a lot of stuff written for the 5 years of Servo Magazine articles so converting them shouldn’t be that tough.

You are correct, there are a set of moves from the standing to a motion position. And move sequences from a motion position to another motion position. I just wanted to keep it simple in my earlier reply.

This is probably one of the things I should write up is the procedure to get a robot to walk from scratch.

Pete

thanks for the info guys.

i have followed the same type of plan that was mentioned. i cycle through a sequence of positions i need to walk.

at the moment the problems i am having with my sequence are
1/ violent rocking that eventually makes the robot tip over.
2/ twisting and turning of robot resulting in not walking straight.

not sure what i can do about 1 apart from testing, testing and more testing. has anyone had similar problems? Pete is walking pretty slowly but not slowly enough to be considered jerky. from what i can tell this may be what is causing the rocking that eventually tips him over.

2 seems to be a result of not being able to shift the weight properly from one leg to the other. i cant seem to get the servos to do this action smoothly because one servo is always getting to the required position quicker than the others, resulting in the feet not being exactly flat so then Pete twists as he transfers weight.
i have been experimenting with the math that calculate the required speed so that the servos get to the same position at the same time. just seems like a lot of work for something that is conceptually so simple!

any suggestions?

Violent rocking? With no movement commanded? Are you using the SSC32 or just a Bot Board?

Are you moving the servos in groups? That might explain one servo getting someplace before the others. Possibly the speed calculated for each servo is off. I tell my servos to all move within a specified time, so I don’t do any speed calcs. It probably works out the same as far as the calcs go, but I like it that way.

My balance tasks are different, of course for Loki.

Maybe just a bad servo?

Alan KM6VV

As Alan pointed out, take advantage of the group moves.

One of the things I do is make all of my initial movements really slow to make sure they are smooth. Later I can change the group move timing.

It is like a tiachi (did I spell that right?) movements, each sub-sequence the robot is balanced, and there is no shaking going on.

Slow steady movements. I mean slow.

One of the other things I do is use a benchtop power supply to power the robot during the motion sequence development. I keep an eye on the current draw during each set of movements. I then make small adjustments to the servo positions to minimize the overall current draw. This helps to keep the robot motion more stable since it helps minimize how much the servos have to work to keep the robot’s motion stable.

By the way, what servos are you using? I have the HS-5645 servos in mine.

Pete

i’m using a bot board with the atom pro and a few different types of servos. initially i bought a whole bunch of HS322HD’s and a few HS475HD but quickly found out that in a few joints the 322’s just weren’t gonna cut it. after some hunting around i found the MG995 and MG945’s so i purchased one of those for trial which is in the right ankle. the other one is in the mail.

1/ the violent i mentioned only happens at the point when i shift side to side in the walk sequence. it seems to compound as the walk goes on. i get the feeling its made worse by having 2 different servos in each ankle. i only just found out that different servos require different values for the same amount of travel. what i have done is made some constants like degree_45 and so on that i add or subtract to servo center positions.

2/ i don’t think the atom pro supports the timed group movements. if it does i haven’t worked out how to do it yet. that would be great though. seems like it would be very efficient. until then i will just have to implement the calcs into the shifting of the weight to get a smooth transition.

in my 4th revision of walking i might try the super slow approach and see how it goes. do you pause between gait sequences or make it run continuously Pete?

just thought i might post the walk gait sequence i’m currently using. maybe you guys can same me a few revisions and tell my if im on the right track:)

loop
gosub SHIFT_WEIGHT_RIGHT ;shift CG over right leg from standing straight
gosub SWING_ARMS_LEFT
gosub LIFT_LEFT_LEG
gosub LOWER_LEFT_LEG
gosub SHIFT_CG_CENTRE_LEFT ;shifts CG to the center (scissor position) with left leg forward
gosub SHIFT_CG_LEFT_LEG ;shif CG entirely onto left leg (similar to shift_weight_right but from scissor position)

gosub SHIFT_WEIGHT_LEFT			
gosub SWING_ARMS_right
gosub LIFT_RIGHT_LEG	
pause 2000
gosub LOWER_RIGHT_LEG
gosub SHIFT_CG_CENTRE_RIGHT
gosub SHIFT_CG_RIGHT_LEG

goto loop

so there are a few hservowait] commands and what not but thats the general sequence. if any of the subroutines need explaining let me know.

Andrew

Unfortunately your servos are way under powered, as I believe Pete has already suspected. 645 servos are the minimum for bipeds, and honestly I have never seen a successful biped with the analog 645, most use the digital 5645 servo for bipeds.

I’m not saying you will never be able to get it to walk. However it will be so incredibly difficult to try and program around the week servos, you may drive yourself crazy in the process.

To drive servos directly from the Atom Pro you can borrow the BRAT code found in this tutorial.
lynxmotion.com/images/html/build130.htm

There is a limit on how many servos can be plugged into the Bot Board, and I don’t remember you stating how many servos you are using. The code is basically an SSC-32 emulation for the T (timed group move) function.

Here’s an idea. You probably already have the stuff to make this, so it won’t cost anything extra. It will work with 322’s although 475’s are a significant improvement.



And we have created a pretty good tutorial for autonomous control.
lynxmotion.com/images/html/build130.htm

We have the little guy walking with GP2D12 obstacle avoidance, and XL3223 accelerometer assisted routines so the robot can get up from any position if started in the laying down position, or if the robot falls. It’s easy to modify the code too. It’s an option to consider till you get more powerful servos anyway. 8)

This is the way I built MsBRAT, with the U channel opening facing forward. I have the Sharp IR Ranger installed now too. :slight_smile: I got the power wires resolders to the Bot Board II, and am just getting ready to try out the new software. I’m glad I have the HS-475HB servos, because I think anything less would just frustrate me.

8-Dale

RobotDude you hit the nail right on the head. its driving me crazy! looks like i might upgrade all the leg servos to digital. has anyone used the MG995’s or MG945’s? i have seen a few photos about of robots built entirely of them. can anyone give me any feedback? id rather not throw another 150 bucks down the drain in “development”.

at the moment i am using 16 D.O.F. i should probably post a photo and some video of my Pete and the walk. am i going to have to do the video through youtube?

the timed group move function is essentially the same thing i am doing with the calculation i was talking about. nice to know i’m on the right track!

the brat actually isn’t a bad idea. looks like it would only cost me 30 bucks on servo brackets i don’t have:)

i’m still determined to get Pete 100% though. i’m actually looking at building a humanoid biped as part of my final year uni project, so i’m in no rush. would be great to get one made using the best of the best components when someone else is paying:)

H645MGs were underpowered when I used in my biped scout. I think the only way to get them powerful enough was if you pull the power up with a 6-cell sub-c packs.

I’ve used them briefly (I mean BRIEFLY as in 2-3 minutes) and it seems to give the servos a tremendous boost. It’d probably have enough power to walk with those packs, but heat was the major issue. I was operating the 645s beyond the recommended max, which is 6.0v. Under load, my pack can still hold high voltage as these were matched cells used for my R/C car…

I do not recommend using 6-cells at all, you’ll blow your servo out if you operate it any more then 5 minutes with full load (walking). The best way to go is to go all-out and go for the best and torqiest servos out there.

5645s are the digital ones, and they put out just a bit more torque, but again, my feeling on this is these are “minimal.” You probably can’t expect doing acrobatics or fancy karate moves with a humanoid using these servos.

If I was to build a Biped Pete, I’d go for broke and go all out on the servos. Outfit every joint with HSR-5990TGs and operate that sucker at 6.0V (for longevity, even though it’s rated at 7.2V). That way, you can focus on the programming/sequencing aspect and not have to worry whether your servos can hold the position.

Just my two cents… :wink:

Well, Couldn’t you just buy a pack so you can plug in the wall and keep your batteries when your going somewhere with your robot? I’m not sure if it will give enough amps thought.

thanks for the input.

can anyone confirm that if i was to go and buy some HS-5645MG’s they would do the job no problem??? at 60 bucks each i don’t want to be making any mistakes. is anyone running them in a Pete?

a little off topic, does anyone know if the servo angle relating to a pw is standard across a brand? eg will the pw for 90 degree be the same in my Hitec 311 and say a Hitec 5645?

as for the two cents tom if i was to go for it and outfit Pete in 130 buck servos i think i would just buy a KHR-1HV or something. its just too expensive. i’ll keep it in mind though if uni decides to fund it as a final year project

i’m running the servo’s from a 6v switch mode regulator as i have 1800MAh of LiPo power on board. might even up it to 3600MAh, so power is not a problem. no point getting a wall plug. i hate wires. ive mounted the batteries on the feets. Mystery 900MAh lipos fit PERFECTLY and are dirt cheap.

Correct me if I’m wrong, but I believe all the demo videos on LM’s shop site (.com) has the bipeds that are outfitted with the 5645s… i could be wrong though.

Also, I’ve considered buying a Kondo and/or a Robonovas also, but the servos that come with the Robonovas are waay underpowered (need to buy a new set of more powerful one to be able to do fancy things) and the ones that comes standard with the Kondos are equivalent the H645MGs in torque. I think the frames and the setup is lighter so they get away with it… However, I know that many Kondo owners blow out their servos because the default ones are quite weak. Many of the Kondos you see out in the competition is outfitted with a servo that is nearly equivalent in torque to a 5990s, however, these equivalent servos are not so equivalent in price. Powerful Kondo servos are about 180 bucks last time I remember, versus 129 for the 5990tg.

When I first got into this hobby, I thought spending $30 /servo was a high price to pay, seeing that I needed to buy 12 servos for the biped scout. However, the $125 /servo price isn’t so bad since you’ll end up spending that much in servos after you go through your 30-dollar servos. I’m just trying to save you the disappointment of your bot not quite performing as you imagined it should when you start to program it.

Dealing with weak servos are a pain, and you end up ponying up more $$$ for more torqier (is that a word?) servos anyways Might as well do it up front. But I don’t know your budget nor am I trying to tell you what to do. It’s just a friendly suggestion from my own experience.

But all is not in vain. I took my 12 H645MGs and bought 6 more H645MGs and more brackets to create a round hexapod out of it. The 645s are quite powerful for hexapods applications. But knowing what I experienced, my next LM biped will definitely have no less then H5990TGs, since anything less would just end up in a disappointment for me… :wink:

Keep in mind the quarter-scale SES brackets are now available, so you can also use the $70 5745 in some high-stress joints.

I agree with Tom about the 5990TG. It’s the best SES-compatible servo, and at $125 are a great torque-per-dollar value.

I personally would only use the 5645 in the arms. I think a combination of the 5990, 5745 and 5645 would give the best bang for your buck in a Lynxmotion biped.

I am running the HS5645 servos in my bi-ped Pete. I would say that they would be the minimum you would need. And from my experience, all the servos (except the one for the head) need to be the same strength servo.

If you are willing to spend some extra for more powerful servos, go with the HSR-5990SG servos. The more powerful the servos are, the more interesting things you can do.

Pete