## Bing 3

Discussions regarding building a walking robot at home. Most of the robots participating at Robo-One competitions are custom fabricated.
134 postsPage 8 of 91 ... 5, 6, 7, 8, 9
134 postsPage 8 of 91 ... 5, 6, 7, 8, 9
To help me think about the things involved in this balance problem, I thought it might be fun to see if a computer simulation could be of use.

So I went and grabbed the code for the Open Dynamics Engine http://www.ode.org

This is a little physics simulation package. I put together a simplified but more or less accurate model of Bing focusing only on one fwd/back ankle joint, and I can write little bits of code to try different control strategies.

Here's a snapshot from a test of a (very unsuccessful) balancing attempt. The simulation puts an impulse into the model (simulating the poke in the chest). In this picture, the algorithm overcompensates and Bing is in the process of violently falling over.

bigger: http://happyrobots.com/bing3f3.jpg

I am not sure how helpful this is going to be -- I am hoping to use it to get ideas for strategies, but I don't think the simulation is accurate enough to just transfer the code directly.

I need to make a couple things more realistic -- in particular, time delays for sensor readings / motor actuations, and a more realistic model of the servo in the ankle.

It probably won't be of much use, but it's been interesting to play with so far.
To help me think about the things involved in this balance problem, I thought it might be fun to see if a computer simulation could be of use.

So I went and grabbed the code for the Open Dynamics Engine http://www.ode.org

This is a little physics simulation package. I put together a simplified but more or less accurate model of Bing focusing only on one fwd/back ankle joint, and I can write little bits of code to try different control strategies.

Here's a snapshot from a test of a (very unsuccessful) balancing attempt. The simulation puts an impulse into the model (simulating the poke in the chest). In this picture, the algorithm overcompensates and Bing is in the process of violently falling over.

bigger: http://happyrobots.com/bing3f3.jpg

I am not sure how helpful this is going to be -- I am hoping to use it to get ideas for strategies, but I don't think the simulation is accurate enough to just transfer the code directly.

I need to make a couple things more realistic -- in particular, time delays for sensor readings / motor actuations, and a more realistic model of the servo in the ankle.

It probably won't be of much use, but it's been interesting to play with so far.
DerekZahn offline
Savvy Roboteer

Posts: 141
Joined: Wed Mar 16, 2005 1:00 am
Location: Boulder CO, USA

This ankle system is fairly complicated! To help me get a feel for control strategies, I decided to build a version of the simulation that I could control manually.

bigger: http://happyrobots.com/bing3g3.jpg

Because it's sort of fun, I decided to let other people download it and try it (Windows only, sorry). Here's a zip file with the program inside:

http://happyrobots.com/anklegame.zip

The black number in the display is in milliseconds of the simulation.

After 100 milliseconds, an impulse is delivered to the model. The idea is to use the ankle servo to minimize the worst tilt that occurs, and bring it to stability as quickly as possible.

To control the servo, put the mouse cursor inside either the "Counterclockwise" or "Clockwise" boxes. Doing so sets a desired servo angle. The magnitude of the angle corresponds to the distance from the center line. You can see the joint angle with the red display. The units are tenths of a degree, and the joint angle is graphed.

The Blue and Green display/graph values are the tilt (in hundredths of a degree) and gyro reading (in tenths of a degree per second).

The model has a delay built in for the sensor readings in the graph (set to 15 milliseconds) to simulate the time delay for sensors, hardware low pass filtering, and delivering the sensor data to the code. However, that delay does not really factor into the interactive game because the 3D display is always accurate real-time.

A delay is built in to the servo control. Servo commands (desired servo positions) do not take effect for 20 milliseconds. This is to simulate the transmission delay of Bing's serial protocol and also the time in between pulses sent to the servos (which will average 10 ms).

The servo model is not as realistic as I'd like -- it has a fixed operating speed of 3 radians per second (0.3-ish seconds for 60 degrees), a large torque limit, and no acceleration delay. I'm not sure the physics is accurate enough for me to bother with a more sophisticated model anyway.

A lot of the important dynamics seem to revolve around border issues such as when the foot breaks contact with the ground, exactly how "bouncy" the foot is, and so on.

Press the SPACE bar to pause the simulation.

It's interesting to play around with, and it's giving me some insight into the issues involved in trying to use these sensors in a closed loop way to do things like maintain balance.
This ankle system is fairly complicated! To help me get a feel for control strategies, I decided to build a version of the simulation that I could control manually.

bigger: http://happyrobots.com/bing3g3.jpg

Because it's sort of fun, I decided to let other people download it and try it (Windows only, sorry). Here's a zip file with the program inside:

http://happyrobots.com/anklegame.zip

The black number in the display is in milliseconds of the simulation.

After 100 milliseconds, an impulse is delivered to the model. The idea is to use the ankle servo to minimize the worst tilt that occurs, and bring it to stability as quickly as possible.

To control the servo, put the mouse cursor inside either the "Counterclockwise" or "Clockwise" boxes. Doing so sets a desired servo angle. The magnitude of the angle corresponds to the distance from the center line. You can see the joint angle with the red display. The units are tenths of a degree, and the joint angle is graphed.

The Blue and Green display/graph values are the tilt (in hundredths of a degree) and gyro reading (in tenths of a degree per second).

The model has a delay built in for the sensor readings in the graph (set to 15 milliseconds) to simulate the time delay for sensors, hardware low pass filtering, and delivering the sensor data to the code. However, that delay does not really factor into the interactive game because the 3D display is always accurate real-time.

A delay is built in to the servo control. Servo commands (desired servo positions) do not take effect for 20 milliseconds. This is to simulate the transmission delay of Bing's serial protocol and also the time in between pulses sent to the servos (which will average 10 ms).

The servo model is not as realistic as I'd like -- it has a fixed operating speed of 3 radians per second (0.3-ish seconds for 60 degrees), a large torque limit, and no acceleration delay. I'm not sure the physics is accurate enough for me to bother with a more sophisticated model anyway.

A lot of the important dynamics seem to revolve around border issues such as when the foot breaks contact with the ground, exactly how "bouncy" the foot is, and so on.

Press the SPACE bar to pause the simulation.

It's interesting to play around with, and it's giving me some insight into the issues involved in trying to use these sensors in a closed loop way to do things like maintain balance.
DerekZahn offline
Savvy Roboteer

Posts: 141
Joined: Wed Mar 16, 2005 1:00 am
Location: Boulder CO, USA

I added an acceleration limit to the servo which seems to make the simulation behave a little bit more realistically, so I uploaded a new anklegame.zip to the site.
I added an acceleration limit to the servo which seems to make the simulation behave a little bit more realistically, so I uploaded a new anklegame.zip to the site.
DerekZahn offline
Savvy Roboteer

Posts: 141
Joined: Wed Mar 16, 2005 1:00 am
Location: Boulder CO, USA

Hey Derek,

So, when I try and run it (not being a C++ developer), I get "MSVCP71D.dll not found".

This appears to be a debug version of some library...

- Jon
Hey Derek,

So, when I try and run it (not being a C++ developer), I get "MSVCP71D.dll not found".

This appears to be a debug version of some library...

- Jon
JonHylands offline
Savvy Roboteer

Posts: 512
Joined: Thu Nov 09, 2006 1:00 am

Hmm, sorry about that. I don't understand the project file that came with ODE very well. I didn't try to build a debug version of anything but it must have done so. Try the download again, I included that file and another one that is likely to be required.
Hmm, sorry about that. I don't understand the project file that came with ODE very well. I didn't try to build a debug version of anything but it must have done so. Try the download again, I included that file and another one that is likely to be required.
DerekZahn offline
Savvy Roboteer

Posts: 141
Joined: Wed Mar 16, 2005 1:00 am
Location: Boulder CO, USA

Derek,

What I found works best is if you wait for the first impulse motion to stop - where it stops after rocking back, but before it starts rocking forwards again - and you "flatten" the foot at that point, there is virtually no oscillation.

(bigger - http://www.bioloid.info/Bing-Test.PNG)

I don't know if this helps at all...

- Jon
Derek,

What I found works best is if you wait for the first impulse motion to stop - where it stops after rocking back, but before it starts rocking forwards again - and you "flatten" the foot at that point, there is virtually no oscillation.

(bigger - http://www.bioloid.info/Bing-Test.PNG)

I don't know if this helps at all...

- Jon
Last edited by JonHylands on Mon Feb 26, 2007 4:41 pm, edited 1 time in total.
JonHylands offline
Savvy Roboteer

Posts: 512
Joined: Thu Nov 09, 2006 1:00 am

Cool, so the strategy there is to "absorb" the perturbation then gradually straighten up again.

The opposite strategy involves turning hard the other way immediately to push the ankle joint past the center of mass and "catch" it (like balancing a pole). Then glide back down. The worst-case tilt is much better in this case though the whole thing takes a little longer and the gliding back down part is considerably more complicated.

Introspection and foolish-looking experimentation reveal that if I get poked in the chest I sometimes use the first strategy and sometimes the second (toes in the air). I'm not sure how I choose which to do.

Of course I also bend at the hips and my arms flail about and so forth, whichi should all be part of a real answer.
Cool, so the strategy there is to "absorb" the perturbation then gradually straighten up again.

The opposite strategy involves turning hard the other way immediately to push the ankle joint past the center of mass and "catch" it (like balancing a pole). Then glide back down. The worst-case tilt is much better in this case though the whole thing takes a little longer and the gliding back down part is considerably more complicated.

Introspection and foolish-looking experimentation reveal that if I get poked in the chest I sometimes use the first strategy and sometimes the second (toes in the air). I'm not sure how I choose which to do.

Of course I also bend at the hips and my arms flail about and so forth, whichi should all be part of a real answer.
DerekZahn offline
Savvy Roboteer

Posts: 141
Joined: Wed Mar 16, 2005 1:00 am
Location: Boulder CO, USA

### Modeling with Marilou Robotics Studio

Hi,

I'm very interesting in the ODE simulation you made. I've downloaded it and i will try it soon. I'm the founder of the Marilou Robotics Studio and i'm searching someone witch should be interested to try modeling these robot inside the Marilou simulator. You can create the entire robot, attach sensors like servo, motors , ir, us , laser and others ! I hope someone would be interested

Thank you

www.anykode.com
Hi,

I'm very interesting in the ODE simulation you made. I've downloaded it and i will try it soon. I'm the founder of the Marilou Robotics Studio and i'm searching someone witch should be interested to try modeling these robot inside the Marilou simulator. You can create the entire robot, attach sensors like servo, motors , ir, us , laser and others ! I hope someone would be interested

Thank you

www.anykode.com
Last edited by LR on Wed Aug 13, 2008 6:37 pm, edited 1 time in total.
LR offline
Robot Builder

Posts: 7
Joined: Tue Feb 13, 2007 1:00 am

Very nice video and informative.
Outstanding job building this humanoid.
You are to be greatly congratulated!
Why not try lowering the center of gravity
and have the knees bent somewhat... it
should do something to improve stability
and decrease rocking time, plus improve
walking. Just a thought...

Humanoido
Very nice video and informative.
Outstanding job building this humanoid.
You are to be greatly congratulated!
Why not try lowering the center of gravity
and have the knees bent somewhat... it
should do something to improve stability
and decrease rocking time, plus improve
walking. Just a thought...

Humanoido
Humanoido offline
Savvy Roboteer

Posts: 574
Joined: Tue Dec 05, 2006 1:00 am
Location: Deep in the Heart of Asia

Hi, thanks for the suggestion!

For now I'm just studying the stability and balance issue to see what might be done about it by reacting actively to imbalances. A lot of you have done nice work using gyros in your bots, and I'll probably end up doing something similar to what you guys have already done, but I'll get there at my own slow pace. It's fun to think about!

The Robo-one competitors use the "crouch walking" techinique to improve stability, but it's not very "realistic" in the sense of mimicking the way humans walk. It got so bad that they had to change the rules to limit the amount of knee bending that was permissible while walking. Some of the robots (like King Kizer) seem to still crouch down in that odd way when doing some attacks which is apparently not banned.

The latest "unrealistic" walking idea that the Robo-one bots seem to use is what I call "crab walking". Fast side-stepping appears to be more stable than fast normal walking (probably because the large front-back foot base can more effectively kill the forward momentum at the end of walking). So these bots tend to turn their sides toward the direction they want to go, then quickly crab-walk toward their target. It's kind of comical at first but after seeing it all the time I find it a bit irritating. I think it will be much harder for the Robo-one folks to ban crab-walking so we're probably stuck with it.

Both in the case of bent knees and side-stepping, I prefer to try for a more reasonable gait. I'm still a long way from taking any steps, so I can be an idealistic dreamer!
Hi, thanks for the suggestion!

For now I'm just studying the stability and balance issue to see what might be done about it by reacting actively to imbalances. A lot of you have done nice work using gyros in your bots, and I'll probably end up doing something similar to what you guys have already done, but I'll get there at my own slow pace. It's fun to think about!

The Robo-one competitors use the "crouch walking" techinique to improve stability, but it's not very "realistic" in the sense of mimicking the way humans walk. It got so bad that they had to change the rules to limit the amount of knee bending that was permissible while walking. Some of the robots (like King Kizer) seem to still crouch down in that odd way when doing some attacks which is apparently not banned.

The latest "unrealistic" walking idea that the Robo-one bots seem to use is what I call "crab walking". Fast side-stepping appears to be more stable than fast normal walking (probably because the large front-back foot base can more effectively kill the forward momentum at the end of walking). So these bots tend to turn their sides toward the direction they want to go, then quickly crab-walk toward their target. It's kind of comical at first but after seeing it all the time I find it a bit irritating. I think it will be much harder for the Robo-one folks to ban crab-walking so we're probably stuck with it.

Both in the case of bent knees and side-stepping, I prefer to try for a more reasonable gait. I'm still a long way from taking any steps, so I can be an idealistic dreamer!
DerekZahn offline
Savvy Roboteer

Posts: 141
Joined: Wed Mar 16, 2005 1:00 am
Location: Boulder CO, USA

A friend of mine just gave me a link to this page, which has a very cool video on it that amazingly illustrates some of the balancing stuff that I've been thinking about over the last few days:

http://paulgraham.com/anybots.html

Pay particular attention to the ankles at the beginning of the video. That's obviously way more advanced than anything I'm planning to do, but it's fascinating anyway and I thought you all would enjoy it if you hadn't seen it yet.
A friend of mine just gave me a link to this page, which has a very cool video on it that amazingly illustrates some of the balancing stuff that I've been thinking about over the last few days:

http://paulgraham.com/anybots.html

Pay particular attention to the ankles at the beginning of the video. That's obviously way more advanced than anything I'm planning to do, but it's fascinating anyway and I thought you all would enjoy it if you hadn't seen it yet.
DerekZahn offline
Savvy Roboteer

Posts: 141
Joined: Wed Mar 16, 2005 1:00 am
Location: Boulder CO, USA

Interesting. Maybe I'm kidding myself, but that's exactly what I'm planning on doing...

- Jon
Interesting. Maybe I'm kidding myself, but that's exactly what I'm planning on doing...

- Jon
JonHylands offline
Savvy Roboteer

Posts: 512
Joined: Thu Nov 09, 2006 1:00 am

Me too

Well, not the super-advanced stuff like homemade gyroscopes, fancy motors, etc, but the basic concept at least (figure out where the bot will fall and try to make sure a foot is there to catch it).

I think you're off to a great start Jon!
Me too

Well, not the super-advanced stuff like homemade gyroscopes, fancy motors, etc, but the basic concept at least (figure out where the bot will fall and try to make sure a foot is there to catch it).

I think you're off to a great start Jon!
DerekZahn offline
Savvy Roboteer

Posts: 141
Joined: Wed Mar 16, 2005 1:00 am
Location: Boulder CO, USA

It's time for Bing's first set of hardware tweaks. A bunch of issues have crept up that require a partial teardown to deal with -
* Some of the brackets have come a bit loose from the servo horns
* The foot pad attachment scheme is failing already and there's no way it can take the pounding, so I'm going to think about a better solution
* The attachment of the torso turn servo to the upper torso is not as strong as I'd like
* There are occasional intermittent losses of serial communication. Not often but troublesome enough to look into
* The bizarre dual-IMU setup that I ended up with will be too hard to deal with when the torso is turned so I need to combine the best of both into the lower torso. That means the gyros from the upper torso and the accelerometers from the lower torso, so it all has to be torn apart.
* One servo has become somewhat difficult to turn, and I need to check out what's wrong

So Bing will be torn apart for a while. I'm not surprised by this though I'd rather be making forward progress.

In the meantime I have a bunch of software stuff to work on. I'm going to let the 'balance' issue rattle around in my brain for a while and work on the next project:

So far I just have one "neutral pose" but actually I want to have a whole class of them, expressed in a way that I can specify the foot positions and angles, and torso height, and have the joint angles calculated automatically. More than that, I want to specify the foot positions in millimeters, which means that I need to figure out an Inverse Kinematics scheme to set the joint angles. If you haven't thought about how you'd do that, it actually is not a simple problem. In Bing's case it MIGHT be possible to find an analytic solution (making the computation easy), but so far I have not been able to figure one out, largely due to my rusty math skills but maybe because it isn't tractable. If I can't find such a solution I'll need another answer.

I have what I think is a good reason for wanting to specify exact foot positions like this -- it will allow me to keep the feet stationary and move the "robot zero" (and the center of mass) arbitrarily without the feet moving. I think this will be important for shifting weight as part of walking, and for killing momentum as part of balancing.

Not sure how long all this will take until a reassembled Bing will be running the new cool software features, but whenever it is, a video will be forthcoming!
It's time for Bing's first set of hardware tweaks. A bunch of issues have crept up that require a partial teardown to deal with -
* Some of the brackets have come a bit loose from the servo horns
* The foot pad attachment scheme is failing already and there's no way it can take the pounding, so I'm going to think about a better solution
* The attachment of the torso turn servo to the upper torso is not as strong as I'd like
* There are occasional intermittent losses of serial communication. Not often but troublesome enough to look into
* The bizarre dual-IMU setup that I ended up with will be too hard to deal with when the torso is turned so I need to combine the best of both into the lower torso. That means the gyros from the upper torso and the accelerometers from the lower torso, so it all has to be torn apart.
* One servo has become somewhat difficult to turn, and I need to check out what's wrong

So Bing will be torn apart for a while. I'm not surprised by this though I'd rather be making forward progress.

In the meantime I have a bunch of software stuff to work on. I'm going to let the 'balance' issue rattle around in my brain for a while and work on the next project:

So far I just have one "neutral pose" but actually I want to have a whole class of them, expressed in a way that I can specify the foot positions and angles, and torso height, and have the joint angles calculated automatically. More than that, I want to specify the foot positions in millimeters, which means that I need to figure out an Inverse Kinematics scheme to set the joint angles. If you haven't thought about how you'd do that, it actually is not a simple problem. In Bing's case it MIGHT be possible to find an analytic solution (making the computation easy), but so far I have not been able to figure one out, largely due to my rusty math skills but maybe because it isn't tractable. If I can't find such a solution I'll need another answer.

I have what I think is a good reason for wanting to specify exact foot positions like this -- it will allow me to keep the feet stationary and move the "robot zero" (and the center of mass) arbitrarily without the feet moving. I think this will be important for shifting weight as part of walking, and for killing momentum as part of balancing.

Not sure how long all this will take until a reassembled Bing will be running the new cool software features, but whenever it is, a video will be forthcoming!
DerekZahn offline
Savvy Roboteer

Posts: 141
Joined: Wed Mar 16, 2005 1:00 am
Location: Boulder CO, USA

Can I highly recommend the book: "Introduction to robotics, mechanics and control" by John J Craig for all your Inverse Kinematics needs? It's a great book, helped me a lot with my hexapod, and addresses the maths in a more practical way than most other books.

As for

(figure out where the bot will fall and try to make sure a foot is there to catch it).

as a robotics proff and my university says, it's all about having good mathematical models that don't needs a ton of conditional clauses to operate (so no individual pre-programmed movements, no 'if you feel yourself falling to the left, do this' type stuff), the model should take care of it all. As fas as i can tell, Zero Moment Point seems to be currently the most elegant way of doing it.

All the best, this really is a top-shelf project!
Can I highly recommend the book: "Introduction to robotics, mechanics and control" by John J Craig for all your Inverse Kinematics needs? It's a great book, helped me a lot with my hexapod, and addresses the maths in a more practical way than most other books.

As for

(figure out where the bot will fall and try to make sure a foot is there to catch it).

as a robotics proff and my university says, it's all about having good mathematical models that don't needs a ton of conditional clauses to operate (so no individual pre-programmed movements, no 'if you feel yourself falling to the left, do this' type stuff), the model should take care of it all. As fas as i can tell, Zero Moment Point seems to be currently the most elegant way of doing it.

All the best, this really is a top-shelf project!
eddymoore offline
Newbie

Posts: 4
Joined: Wed Feb 14, 2007 1:00 am

134 postsPage 8 of 91 ... 5, 6, 7, 8, 9
134 postsPage 8 of 91 ... 5, 6, 7, 8, 9