🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Balancing in robotics

Started by
5 comments, last by Calin 2 days, 23 hours ago

Let’s say we have a robotic stick made from several sections with joints between sections allowing it to bend and transform from a line to a semicircle shape. The upper sections are heavier then the lower ones. When the stick stands upwards let’s assume that its base only allows it to lean left or right. So the stick in the line state is placed in a standing position and then left unattended ( with no supports to keep it a vertical position) If the upper tip starts leaning/falling to the right if it bends the top in the opposite direction ( to the left) will that cause it to stop from falling and regain balance?

My project`s facebook page is “DreamLand Page”

Advertisement

Calin said:
If the upper tip starts leaning/falling to the right if it bends the top in the opposite direction ( to the left) will that cause it to stop from falling and regain balance?

If i get you right, the answer is no.

Imagine an astronaut floating in space. His center of mass is not moving relative to the nearby space station.
The astronaut forgot his thrusters, and he has no rope attached to the space station.
What can the astronaut do to get back to the station?
Nothing. If he starts waving a leg, all the other parts of his body will cancel out the acceleration. His center of mass will not start moving at all. He is lost.

Let's call his desperate movements ‘internal' motion. He can move his parts relative to each other, but due to conservation of energy, the sum on the center of mass is zero.
To accelerate the center of mass, we need a way to apply ‘external' force. For the balancing problem, this way is to apply a force to the ground from contacts.
In your case you have one contact, which is positioned left from the center of mass.
Imagine a vector from the contact to the COM, which goes to the left. This is the only direction you can generate some external force. All the rest remains internal and has no effect on COM trajectory.
For the current example any force on the contact can only generate acceleration of the COM to the left, which is the wrong way.
You can only accelerate the fall and make it worse, but you can not counteract or stop it.

There are only two ways to remain balanced:
1. Move the contact point to the left side of the COM and apply force to counteract the fall.
2. Attach a flywheel to the robot, generating a large torque around the contact so we rotate the COM in the right direction.

Option 2 is not available to natural life forms. They can rotate their limbs only a certain amount of degrees, but then a joint limits stops the motion. So it dos not work in practice. But we could build robots to do it.
Still, it's worth an attempt eventually.
If you stand on the edge of a cliff, and your COM is already beyond the edge, risking to fall down, you can try to swing your arms in circles, like in cartoons of the coyote or Tom & Jerry.
This does counteract the fall a little bit, but probably it won't be enough to prevent the fall.

Maintaining/correcting balance with just a single point of contact is difficult, but I don't think it's necessarily impossible. You need to look at the “foot” end of the robot, not the “head” end. By moving internal joints, you can push against the ground in various directions, which causes the ground to push back against you in an opposite direction as per Newton's laws of motions. Problem is, you need to react super quickly and super accurately because being even slightly off-balance is going to quickly turn into being completely off-balance if you let it.

Or you could jump around as if on a Pogo stick. It's more energy-intensive, but it gives you much stronger options for balancing. Even a trained human can do it.

Lesson learned, thanks guys.

My project`s facebook page is “DreamLand Page”

a light breeze said:
Maintaining/correcting balance with just a single point of contact is difficult, but I don't think it's necessarily impossible.

The way you say it, it sounds like that famous question ‘can you put an egg upright on the table, without it tipping over?’
In theory that's a yes, but in practice it's a no, i would say.

However, that's not what we're interested in, so i'll try to refine with that in mind…

Calin said:
Let’s say we have a robotic stick made from…

There is a common model for this, the ‘inverted pendulum’.
It's basically a point mass on a stiff stick. Much simpler than a human body, but as a model it's good to focus on the balancing problem.
The model uses a single contact point all the time.
To balance it, we are allowed to move the contact. Which is possible for any example:

If you balance an upright stick on your hand, you move the contact by moving your hand.
It feels easy to do so. The major reason it's easy is the moment of inertia of the stick. It hardly rotates perpendicular to it's long axis, so it falls slowly, giving you a lot of time to move your hands and finding sweet spots. The same is true for humans. Thus we should extend our simple pendulum model with inertia to control robots.

If students work on a controller for a physical inverted pendulum model, the pendulum sits on a cart.
The cart can drive left or right, and the students write controllers to drive the motor of the cart.
So the cart becomes the hand from the former example.

For a human or a robot, the exact same thing applies!
Instead a cart, we have ‘center of pressure’, which is a single point where our ground reaction force is focused.
We can move this point just like the cart, by increasing or lowering torque at the ankle joint for most.
So we can move the pressure from the toes to the heels at will, and we can do this very quickly.

Again, all those 3 examples are the same. So why is balancing a robot hard?

It is hard because we can not move the cart beyond our toes or heel.
When balancing a stick on your hand, you can even make some steps with your feet to bring your hand to the necessary position to balance the stick.
When driving the cart for the mechanical pendulum, the rail hosting the cart is mostly very long, often longer than the pendulum is high. The cart won't be limited by the length of the rails.

But to balance a humanoid robot, not allowing it to make a step, the area where we can move the pressure is very small. It's the convex hull from both feet, giving a ‘support polygon’. We can move our pressure top any point in that polygon, but not beyond it.
So we must plan ahead. If we want to lean forwards while standing on both legs, we must ensure that moving the pressure to the toe tips later can generate enough deceleration to stop our forwards motion at the edge of the support polygon, so we don't fall further forwards than we want, loosing balance and requiring to make a step.

Thus we must move our weight slowly all the time, to keep in balance. The cool thing about this is: Because we are so limited about speed, humans move their weight always as fast as possible, i claim. And because we can calculate this, math and physical limits already solves one of the hard animation problems: How fast should we move?
Thus i'm convinced realistic, procedural animation is not as hard as we might think. The guys who currently work on solving the problem with AI are just too lazy to figure out the actual math, hehehe \:D/

But well, since don't have much time to work on game robotics, i won't be first, if i get there at all… <:/

Interesting read JoeJ

My project`s facebook page is “DreamLand Page”

Advertisement