Shop OBEX P1 Docs P2 Docs Learn Events
Biped - work in progress build thread — Parallax Forums

Biped - work in progress build thread

Spiral_72Spiral_72 Posts: 791
edited 2012-01-19 05:50 in Robotics
My latest work in progress. Spare time is hard to come by so I won't update every day. I've been toying with the idea of building a two legged walking talking..... uh, maybe I'll just work on the walking part.

It's my own creation and design, some details are probably subconsciously driven by what I've seen in the past, but I didn't copy anyone. The prototype is being built from 1/4" thick high density foam (Sintra) which is very light and fairly rigid. It glues nicelyl but machines poorly. It's a decent material to work out ideas with.

For the moment i have six HS-322HD servos and an assembled foot, a Basic Stamp and a PWMPAL. I also have no idea what I'm doing :lol:


Links to highlights of the build:
First construction image:
Motion study with walking consecutive images:
Computer simulation video with derived motion data points:
Where all the Prop code started, Duane was kind enough to give me a servo demo in SPIN from which all my code was built and from what I learned SPIN from:
Video #1:
http://forums.parallax.com/showthread.php?135112-Biped-work-in-progress-build-thread&p=1063489#post1063489

The first correctly working code using the Servo32_v7 object and my own servo ramping (I call it interpolation) routines. The data points still need work though:
http://forums.parallax.com/showthread.php?135112-Biped-work-in-progress-build-thread&p=1066962&viewfull=1#post1066962
1024 x 647 - 41K
1024 x 647 - 47K
1024 x 559 - 41K
«13

Comments

  • Spiral_72Spiral_72 Posts: 791
    edited 2011-10-12 13:57
    A few more bits:
    I design this with 1/8" wall architectural aluminum channel. I'll build it from aluminum after (if) the plastic model works.
    I'd like to hear opinions and criticism, so have at it!

    I built a bit of it last night. I'll post pictures soon.
  • ercoerco Posts: 20,256
    edited 2011-10-12 15:05
    Looks great, Spiral! I like the legs-only implementation. Lots of Lynxmotion Brats can't be wrong! http://www.lynxmotion.com/c-139-auton-combo-kit.aspx

    "Hey Robot, do those legs go all the way up?"
  • doggiedocdoggiedoc Posts: 2,241
    edited 2011-10-12 17:00
    Looks like a good start Spiral! Where do you get your Sintra?

    Paul
  • Spiral_72Spiral_72 Posts: 791
    edited 2011-10-12 19:54
    Thanks Erco! I'm working on it now :) and might finish the pair of legs tonight. The total height is about 8", a little bigger than I expected, but it should be ok. The servos should be far more power than required. The total weight is probably 8oz. I'll weigh it to make sure. Maybe I can get it to jump!

    Doggiedoc, We use sheets of the stuff at work. I snagged the drops before they go in the trash, one almost 3" wide, 24" long and another maybe 6" x 8". Way too small for work to do anything with but perfect for my uses. It's cheap if you buy the sheet, about $45 for 1/4" x 4ft x 8ft in lots of colors.

    Now what am I gonna name it?

    I still have no idea how to program this thing. I've also been trying to decide how many servos a BS can run simultaneously. RC systems pack 7 or more channels in a signal, but I'm not sure if the transmitted packet width is 20ms or not..... or if it's just the packet width out to the servos. I figure I'll need an 8ch servo controller and communicate serially. We'll see what happens.

    I DO know, revision #1 will be bonded with CA instead of hot glue. That hot glue is a mess!
  • ercoerco Posts: 20,256
    edited 2011-10-12 20:09
    That powerful, huh? WOW, I wanna see it jump.

    I'll share one thought I have about using servos if & when I build a servo biped. The current rage is to simply use the servo as the joint. This is convenient, quick, and makes sense, but in many cases it's only using the servo over a small portion of its full range of motion. There are 2 negatives about that. First, it wears out the feedback pot over a small area. After a while, you may see repeatability errors creep in if the resistance changes slightly. Second, you could get more torque at the joint if you geared the servo down or used a linkage to move the joint. It's extra work, so nobody does it. But... if ever given the choice, better to run a servo over a larger range of motion than smaller.
  • doggiedocdoggiedoc Posts: 2,241
    edited 2011-10-13 03:54
    Spiral_72 wrote: »
    ...bonded with CA instead of hot glue....
    Pardon my ignorance, but what is CA?
  • TorTor Posts: 2,010
    edited 2011-10-13 04:40
    It's probably cyanoacrylate, also known as superglue.

    -Tor
  • Spiral_72Spiral_72 Posts: 791
    edited 2011-10-13 05:51
    Doggiedoc, yes sir, what Tor said "superglue" or in the model airplane hobby, CA glue.... Sorry.

    Erco, again, a very good point. My first leg design used bearings and an axle on the joint and linkages to the remote servo. The leg didn't work very well, because it was a poor design, not because the bearing/axle and linkages would not work. What I would REALLY like to do, is tear open CD and DVD drives for the little motor / screw unit in there for the actuator! I bet there's an encoder built in. I've not seen it done and maybe for good reason, but the idea is sound I think.
    I used to do field service, for a company that made material (sheets, chords, web) guidance systems for the mfg companies, long story short, they used a $700 ~8" long linear pot for position feedback. If the system worked properly, the wiper on the pot would spend 24/7 on the same 1/2" element about the center of the pot..... just as you said, I changed a lot of em'
  • Spiral_72Spiral_72 Posts: 791
    edited 2011-10-13 05:55
    erco wrote: »
    Looks great, Spiral! I like the legs-only implementation. Lots of Lynxmotion Brats can't be wrong! http://www.lynxmotion.com/c-139-auton-combo-kit.aspx

    "Hey Robot, do those legs go all the way up?"

    Erco! Look at this picture off the link you sent me: http://www.lynxmotion.com/images/product/large/bratblk.jpg
    COOL! Lynx uses the sane joint configuration as I did :D Maybe it'll work this time eh?
  • Spiral_72Spiral_72 Posts: 791
    edited 2011-10-13 06:00
    Alright, an image of progress so far. All up height is 8" because I used 1/4" plastic instead of 1/8" wall aluminum.
    1024 x 768 - 59K
  • ercoerco Posts: 20,256
    edited 2011-10-13 09:02
    Tor wrote: »
    It's probably cyanoacrylate, also known as superglue.

    -Tor

    So true! It's all in the buzzwords: cyanoacrylate sounds more impressive than superglue. And the popular "reverse engineering" sounds better than COPY, which it really is.
  • HumanoidoHumanoido Posts: 5,770
    edited 2011-10-13 09:48
    Very nice start on this project! You could use more than one stamp to keep several things going simultaneously. I built a humanoid and progressed from one to five Stamps in newer versions. I always thought of those as little collectives in a Brain. This is how I got started on the BSS and the linked project. How many DOF are currently planned?

    http://forums.parallax.com/showthread.php?124495-Fill-the-Big-Brain
  • Spiral_72Spiral_72 Posts: 791
    edited 2011-10-13 10:14
    Humanoido, Thanks! It's a fun project for me, something challenging for my brain, to keep me sane for another week, or more :)
    I'm hoping the three DOF in each leg will be enough for walking and crossing thresholds (carpet to hard floor etc). We'll see though. It'll have some sort of a torso to house the controls and battery, but unless this project works better than I hope I don't plan to add arms and head. I expect the final unit to look something like the Star Wars two legged walker.

    I haven't run the math yet, but I have a feeling it'll need at least one Stamp dedicated to the legs. I have a feeling it'll need more though, perhaps one Stamp for each leg, or a Stamp and servo controller of some sort.

    I have a Prop..... still in the sealed pack, never opened, never even started learning Spin. This project might be a bit heavy for me to learn the Prop on though.

    One thing that bugs me is a rigid frame, no shock absorption. I wonder if shaped spring steel on the bottom of each foot would help? Then there's foam/rubber instead, but I dunno if that would help at all considering how little this thing weighs.
  • Spiral_72Spiral_72 Posts: 791
    edited 2011-10-13 11:18
    Thinking out load here:
    with the BS2px I have, each unit of "1" PULSOUT equals 0.81us of output on the pin according the the Parallax manual.

    Figuring a maximum valid position of PULSOUT 2000 for a servo, (approx 350-2000 valid depending) means hold the pin high for 2000*0.81us or 1.62ms. Round that to 2ms total execution for the PULSOUT instruction and given the 20ms (50Hz) servo updaate frequency, I should be able to update a maximum of ten servos in the 20ms timeframe if it were hard coded like [as in no other instructions] this:

    main:
    PULSOUT 1,2000
    PULSOUT 2,2000
    PULSOUT 3,2000
    PULSOUT 4,2000
    PULSOUT 5,2000
    PULSOUT 6,2000
    PULSOUT 7,2000
    PULSOUT 8,2000
    PULSOUT 9,2000
    PULSOUT 10,2000
    goto main

    which would send ten servos to a theoretical maximum position and hold the position.

    That doesn't sound right at all. Where is my error?

    It looks right, but of course that code does nothing. There's no support code, besides this runs the servos full speed to a final position and I don't know anyone that walks like that..... Well there was this one guy that worked at... never mind

    I guess I'm validating my calculations. I'll work on this some more.
  • ercoerco Posts: 20,256
    edited 2011-10-13 13:26
    Sure, it appears that a BS2px could hold static position on 10 servos if it didn't do anything else, but superglue could also hold the servos in static position. :) Realistically and at a minimum, you have to allow time for input from another processor that's crunching the numbers to tell the servo where to go. For bipedal walking, you probably need to get into servo velocities and accelerations, not just position info. Maybe even a gyro and/or accelerometer for smooth walking. You can probably get started with a Stamp for some crude motions, but my guess is that you'll hit the wall pretty quickly and change over to a dedicated servo controller.
  • Spiral_72Spiral_72 Posts: 791
    edited 2011-10-13 13:57
    Erco, I'm sure you are right unfortunately. It should even pull positions and update ten servos from a shared memory device with a master control. That sounds a little scary though. I sketched a way to put a canned walking cycle into the BS which should get it going using minimal code space and all the processing power. I'm not sure if I will pursue that or not. It may be a good exercise, but it also might be a waste of time. I guess I need to look into a servo controllers. The PWMPAL only controls four servos and I don't see any indication they are addressable (stack-able).

    Another option is do what (I think) most other people do and use their PC to send commands to an on-bot traffic controller. I'll need to put arms on the bot to carry the laptop around though :D

    I see I have much research and brain work ahead! I need to make a flow chart / systems diagram for this one. That'll be a first for me :)


    Tonight I hope to use that code above, send a center command to all the servos so I can fix the servo arms to the joints. From there it'll be all about the controls.
  • ercoerco Posts: 20,256
    edited 2011-10-13 16:07
    There's a Propeller servo controller but I haven't used that. I have a Pololu Micro maestro that handles 6 servos and is amazing. Shop around and see what works for you. BTW, I recommend against 5 ServoPals for your 10 servos! :)
  • Martin_HMartin_H Posts: 4,051
    edited 2011-10-13 17:57
    Cool project. I believe the propeller servo controller is based off Beau's Obex class with a serial command interface. I haven't used the official product, but the propeller chip is quite capable as a servo controller using the Obex code with more than enough horse power for other tasks.
  • Spiral_72Spiral_72 Posts: 791
    edited 2011-10-13 18:17
    Erco, Pololu Micro now controls EIGHT!!! servos for """$20"""" not too bad sir! I got it bookmarked now, thank you
    http://www.pololu.com/catalog/product/207

    Martin, I'm sure your are right. I need to look at Spin code to see how difficult it is. It's a shame to have the Prop sitting in a package on my shelf because I'm afraid to open it...... it'll do all I want plus some huh? I have 128 or 256k eeproms and crystals for it too!

    I had some interesting ideas for this and motion control on the drive home tonight. Let me develop them in my head a bit more and I'll let you know. I think it's brilliant :) unfortunately I'm probably not the first to think of it.


    Oh yea, I do have one question for y'all. What do you think about pressure sensors on the feet? Necessary? useless? limit switches? pressure sensitive resistive? one, two four sensors?
  • HumanoidoHumanoido Posts: 5,770
    edited 2011-10-13 20:30
    re: shock absorbers

    You mentioned shock absorbers. When Robonova first came out, it could walk good once it was fine tuned. But that wasn't enough and many people added gyros which significantly smoothed the walking and made it more stable and life-like. It would be useful to experiment with a low end mechanical approach as that also would mimic certain aspects of the human body which are highly successful in results.
  • Spiral_72Spiral_72 Posts: 791
    edited 2011-10-13 20:35
    With a little help from my beautiful assistant, instructed to "Walk like my robot", I charted angles for hip and knee. I also included anticipated angles for the ankle to move the center of mass when required. The point to this is researching my idea:

    If you think of an algebraic equation, the most popular I guess is Y=mX + b. While I suspect my function will not be a linear function, the plan is to generate an equation determined by each set of points with the data points, with relation to time. What I hope this will give me is an equation with constants for amplitude, phase shift for the other leg and allow changing the iteration of the time variable. Long story short: Increase amplitude and/or decrease time iteration for a brisk walk, decrease amplitude and/or time iteration for a shuffle.

    If all that "stuff" works, huge data tables won't be necessary and hopefully the movement will be more fluid than me entering data by trial and error.

    Did all that make any sense? Hey, it sounds good don't it? :D




    EDIT: The position chart at the bottom does not have a legend, SO:
    Blue = hip angle in relation to the vertical torso
    Green = knee angle related to the upper leg
    Magenta = estimated ankle angle

    WALK1A.jpg
    1024 x 540 - 73K
  • HumanoidoHumanoido Posts: 5,770
    edited 2011-10-13 20:37
    re: processors

    On the chip topic, certainly the BASIC Stamp will be the most easy to program and have the most resources in PBASIC, with numerous guides to follow. On the other hand, a Propeller chip is already "8 processors inside" which can all run at the same time, very fast. You would need 8 or more Stamps to do the same. Spin has a learning curve and a good starting point with many programs in the OBEX for servos and sensors. Any leftover processing power can go to the brain section. I'm modeling a very large brain for a humanoid robot using Stamps and Propeller chips. By the time you add torso, arms and a head, you'll have options and sources for brain technology.
  • ercoerco Posts: 20,256
    edited 2011-10-14 01:57
    I have the $20 Micro maestro, which still does 6 servos: http://www.pololu.com/catalog/product/1350 . They also make a 12-servo version for $30, an 18-servo unit for $40 and a 24-servo unit for $50. Excellent value and nice interface. It can be a slave unit or a standalone controller. Unused servo channels can be used as general purpose IOs.
    600 x 315 - 45K
  • Spiral_72Spiral_72 Posts: 791
    edited 2011-10-14 06:16
    Humanoido, did they use a spinning gyro like this: http://en.wikipedia.org/wiki/Gyroscope or a accelerometer and software? I planned to use the accelerometer for balancing, but that's it..... although I will entertain suggestions!

    Erco, OH! gosh I was looking at the Pololu serial controller. USB would make development a lot easier since control would be through the desktop, but I'll have to see how to communicate w/ USB through the Stamp.


    I didn't power the legs last night, therefore I didn't get anything mechanically done. I'm brainstorming and planning at the moment I guess.
  • HumanoidoHumanoido Posts: 5,770
    edited 2011-10-14 07:56
    re: gyro
    Spiral_72 wrote: »
    Humanoido, did they use a spinning gyro like this: http://en.wikipedia.org/wiki/Gyroscope or a accelerometer and software? I planned to use the accelerometer for balancing, but that's it..... although I will entertain suggestions!

    You can freely review the mods to the Robonova with the electronic gyro. It's not the type of large mass spinning gyro that we typically think of.

    For ideas, check out all the great posts at the Robosavvy Forums.

    http://robosavvy.com/forum/viewforum.php?f=4

    Gyro in Robonova-1

    http://robosavvy.com/forum/viewtopic.php?t=172

    Typically a good install would include the gyro and the accelerometer but the accelerometer is a very good start. Software controls the gyros. Typically you use more than one. Code can calibrate multiple gyros across several DOF in different mechanical planes which is remarkable.

    Also view the before and after gyros Robonova-1 walking vids - the results are remarkable.

    I think you should explore those mechanical options of shock absorbing. I don't see much information on this approach and there could be lots of merit in developing it.
  • HumanoidoHumanoido Posts: 5,770
    edited 2011-10-14 08:02
    re: shock absorbing

    I put cushions of the feet of my Robonova-1 to act as shock absorbers to explore more smooth and coherent walking. I found several factors to consider. The foam cushion must slide and not stick on the floor. This prevents the robot from doing changes in inertia during walking which affect balancing. The cushioning material must not go above 1/8th inch thickness or oscillatory motion is introduced. In actuality the robot picked up the spring constant from the thick material and introduced a mild oscillation. A small constant is ok if it can resettle quickly. Explore the resettle for the sweet zone.
  • ercoerco Posts: 20,256
    edited 2011-10-14 08:30
    You'll definitely have to completely retune your entire walking algorithms if you add foam cushions on the bottoms of the feet. But eventually the foam will compress and take a set (depending on which position it has been standing on the foam) and may change the walking parameters again. I'd stick with hard rubber sheet instead of foam.

    Collectors of old toy robots are fanatical about propping slightly them up on display (for years at a time!) to avoid getting flat spots on the rubber wheels.
  • Spiral_72Spiral_72 Posts: 791
    edited 2011-10-14 10:19
    Here are the motion curve profiles with center being standing / center of mass. The y-axis has been scaled X4 for illustration. Man I hope this works!

    P.S. Erco, you're right, there's not much servo movement through the entire profile.
    1024 x 640 - 32K
  • ercoerco Posts: 20,256
    edited 2011-10-14 11:18
    Spiral_72 wrote: »
    Erco, OH! gosh I was looking at the Pololu serial controller. USB would make development a lot easier since control would be through the desktop, but I'll have to see how to communicate w/ USB through the Stamp.

    I know it's heresy to even suggest it, but you might not even need a Stamp with a Maestro...
  • Spiral_72Spiral_72 Posts: 791
    edited 2011-10-14 11:42
    Humanoido wrote: »

    The videos are incredible! I have no idea what's going on or how it works, but it DOES work well! <sigh> looks like I have some more things to research. I know GWS parts, I guess I had no idea a gyro would be applicable here.
    erco wrote: »
    I know it's heresy to even suggest it, but you might not even need a Stamp with a Maestro...
    Blasphemy! I hadn't really considered not using a Stamp or Prop. After the development is done, I'd really like this "Thing" to be roaming around on it's own running onto furniture, falling over and driving the dog nuts.

    I hope to pull out my college books over the weekend and make a function that resembles the motion curves above. From there I should be able to simulate leg motion with my old 2D rotation / transformation routines.
Sign In or Register to comment.