A stable Articulated Skeleton

Share with us how are you using the powerrrr of the force

Moderator: Alain

A stable Articulated Skeleton

Postby Sundown » Fri Jun 29, 2007 11:02 am

I'm currently looking at the idea of enhancing the physical presence of my simulation creatures, which you can see here :

OgreForums : http://www.ogre3d.org/phpBB2/viewtopic.php?t=33301
YouTube : http://www.youtube.com/watch?v=LTzY5kS-DVI

So currently the creatures sense and interact with the world via rigid body spheres that represent the ideal position of each foot, with Inverse Kinematics solving for a comfortable configuration. Procedural animation is generated via the paths of these rigid bodies. There's collision detection throughout the skeleton, but its too basic to gain full tactile feedback from the surface.

So as an alternative technique, I've written some code that takes the creature's skeleton, and from it automatically generate a corresponding collision mesh.

Image

You can see there the skeleton, and underlying collision mesh. The body chassis itself is a rigid body, the legs a chain of hinge joints. The main body is passed to each limb object on creation, and the first bone of the leg connected to the body via another hinge joint.

The limbs are powered by Inverse Kinematics, only this time the end-effector is just a point in 3D space (and not a rigid body like in my previous implementation). The idea is that I can move these 'targets' around (one for each leg), and the creature attempts to touch it at all times.

However, I can't get the creature to remain stable. If I move a target node (lets say for the front left limb), the limb moves perfectly fine, but it also has the effect on the rest of the creature (the body chassis will twist, pulling the other legs out of shape). I've disabled self-collision.

I guess before I spend more time on this, I'm wondering if this is a viable solution to begin with? I am aware I'm doing things backwards (i.e Inverse Kinematics), and Newton is Dynamics based system, so maybe that's the inherent problem?

I have to point out that the creatures don't actually push themselves across the ground, so I'm not looking to create a realistic model of an insect/spider walking - the physics are only used for getting feedback from the surface (i.e when a leg should terminate its stride, what is the friction at point of contact, pushing smaller objects out of the way etc). In a perfect world, the body chassis would remain unaffected by anything the legs do (like a rigid joint), but at the same time be capable of being moved via forces I apply (i.e velocity). Possible?
Sundown
 
Posts: 4
Joined: Mon May 14, 2007 4:12 pm

Postby Julio Jerez » Fri Jun 29, 2007 11:51 am

I saw the video, and I have to say it is quite impresive. :D :D
I wonder why do you want to change it if it is so nice? :o

I am confuse reading teh text of you post, you are saying you are using rigid bodies and then you mention you are using IK.
It is not clear to me if you are using a physics engine, your own physics implementation that somehow mix IK and animations.
if you are using rigid bodis it makes sence to talk of instability, when using IK I do not undertand what you mean by not remainimg stable.

BTW you are a little early, because the IK post matching solve is one of the new feature that come with Newton.
This is also call a motion adaptation, and basically you will be able to make a character walk on even terrain and taking food steps by just setting foot plants and some basics roles.
With not animation to set initial post it will look mechanics but physics possible, by adding a post from an animation (a walk cycle) then it will look more organic since optimization will have small error to adjust.
Kind of parametric animation systems with physics interactions.
All this will be possible in much larger scale that what Newton can do know now to the optimizations. This is not bluff this is quite real.

I see that what you are doing is similar but do not with not physics interaction.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Postby Sundown » Fri Jun 29, 2007 3:26 pm

I'm not using any key-frame animation, every step taken by the creature is basically 'blind' - it decides through its senses and inner state what length, speed, height and order to step in, but does not know ahead of time where the step will terminate - i.e all the animation comes from creature/environment interaction, similar to how the real thing does it.

At the moment the IK solves the leg configuration so that the foot of the creature (i.e the last bone in its skeleton) is always touching the (rigid body) spherical target node. Although it does produce good animation, there is a weakness in that basically only the foot's position is physically simulated (and therefore part of the newton world) - in other words the rest of the creature's body and legs will travel through objects/the surface.

What I want is basically a collision mesh around the creature (like the one shown in the screenshot), that interacts with any other objects in the environment. However, at the same time I'd like it to be animated via inverse kinematics. I'm just wondering if that's viable using a dynamics engine like Newton :)
Sundown
 
Posts: 4
Joined: Mon May 14, 2007 4:12 pm

Postby bakura10 » Sat Jun 30, 2007 5:25 am

I just saw the vidéo, it's really impressive :|.
bakura10
 
Posts: 30
Joined: Sun Sep 17, 2006 11:39 am
Location: France

Postby Leadwerks » Sun Jul 01, 2007 12:57 am

That is one of the coolest things I have ever seen. :lol:
User avatar
Leadwerks
 
Posts: 569
Joined: Fri Oct 27, 2006 2:54 pm

Postby Sundown » Tue Jan 29, 2008 2:25 pm

I forgot about this thread.

I managed to get it working (so I guess I've answered my original question - it is a viable technique!).

Image

http://uk.youtube.com/watch?v=I1P_B65XW4I
Sundown
 
Posts: 4
Joined: Mon May 14, 2007 4:12 pm

Postby Julio Jerez » Tue Jan 29, 2008 3:04 pm

Wow I saw that video in you tube many time.
I did not not know you were using Newton? are you still using it?

If so let me know because the new version may help a big deal in this project.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Postby Vsk » Tue Jan 29, 2008 3:27 pm

This is amazing, very impressive!.
It'd be awsome look this spiders going through the agi-shi dinamica portals :D.
Do you have any paper from your Uni to see the alghorimo from "emergency behavioir". I think this could be applyid form humans even easely!.
(And past this humans thrugh the agi-shi portals :D.
Vsk
 
Posts: 34
Joined: Thu Oct 18, 2007 3:13 pm

Postby agi_shi » Tue Jan 29, 2008 7:11 pm

Vsk wrote:This is amazing, very impressive!.
It'd be awsome look this spiders going through the agi-shi dinamica portals :D.
Do you have any paper from your Uni to see the alghorimo from "emergency behavioir". I think this could be applyid form humans even easely!.
(And past this humans thrugh the agi-shi portals :D.

Lol VSK...

@ Sundown: Excellent stuff! I saw it on the Ogre forums to begin with, never knew you were using Newton, heh. Really, looks amazing. I tried inverse kinematics once, and gave up on the first day. Takes some skill to get basics running, takes big skills, such as yours, to implement IK with such quality and perfection.
agi_shi
 
Posts: 263
Joined: Fri Aug 17, 2007 6:54 pm

Postby DarthPhysics » Tue Jan 29, 2008 10:43 pm

very impressive :shock:
You say you use IK , but as i know from IK , you have to compute each segment.
Then my question is , do you use physics too for the spider ?
If yes , how does your control point (IK end effector) work combined with Newton ?
I search a solution like this for my robot simulator who work only with NGD
without any IK :wink:
Look here : http://fr.youtube.com/user/darthphysics
or in the forum : http://newtondynamics.com/forum/viewtopic.php?t=4164
Anyway , ... congratz :D
The theory is when we know all but nothing work.
The practice is when everything work but no one know why. <- that is me :) without the 'everything work'
User avatar
DarthPhysics
 
Posts: 44
Joined: Sun Apr 23, 2006 8:57 pm
Location: Boulay-Moselle , France

Postby Sundown » Wed Jan 30, 2008 8:45 am

Thanks for the kind words.

DarthPhysics wrote:very impressive :shock:
You say you use IK , but as i know from IK , you have to compute each segment.
Then my question is , do you use physics too for the spider ?
If yes , how does your control point (IK end effector) work combined with Newton ?
I search a solution like this for my robot simulator who work only with NGD
without any IK :wink:
Look here : http://fr.youtube.com/user/darthphysics
or in the forum : http://newtondynamics.com/forum/viewtopic.php?t=4164
Anyway , ... congratz :D


The spiders are partially physically simulated. Steps are described as ellipsoid paths of target nodes, the IK solver sending 'target' angles to each custom joint, which then attempt to rotate to this new angle. So basically, instead of the IK directly affecting the skeleton, it affects the powered joints, it is these joints that affect the skeleton.

So its IK > Custom Joints > Skeleton > Mesh Deformation

Therefore, as the mesh deformation is tied to the custom joints, there's always a valid collision hull.

When a leg strikes the surface (with enough force, or valid friction), the foot is 'anchored' in place, using a universal joint. Now as the body continues to move forward, the IK system pivots the leg around the anchor point. When a new step is requested, the anchor joint is deleted.

So basically, its inverse dynamics - The legs don't actually push the creature forward, the body moves forward and the legs attempt to stay in a balanced, natural position. However, if any leg gets stuck / too stretched / out of sync etc. the AI slows the body down anyway. So the illusion is kept.

By default, gravity has no effect on the creature as it moves around. However, if something goes wrong (you can see this about 1/2 way though the video above), and the creature loses its footing on the surface - then gravity is activated and the creature becomes a temporary ragdoll.

I hope that's made it slightly clearer! Two past papers can be found on http://www.informatics.bangor.ac.uk/~llyr/ although those were written before / at the start of using Newton, and a lot has changed since. In fact, only about 10% of the first paper is now used.

EDIT: The videos are actually from the early stages of Newton integration - movement is more refined now. For example - in the first part of the video, the body is very floaty - leading to a 'bouncy' walking gait. The later tarantula model walks differently as a result of having different parameters for mass, inertia etc.

One interesting behavior physics integration allows is that the creatures can now make a controlled fall from one surface to another other. Say the creature's on the roof, and wants to get to the floor below. The behavior basically goes like this - The creature stops, and anchors all of its legs on the surface. Then, it lets go with its front four legs. This causes the creature's body and legs to tip downwards, hanging in mid air. By letting go with the third pair of legs, then shortly after the fourth, the creature can swing its body around and land on the surface below.
Sundown
 
Posts: 4
Joined: Mon May 14, 2007 4:12 pm

Postby Julio Jerez » Wed Jan 30, 2008 2:03 pm

wow you are using the joint system more that I thought, awesome :D
It is funny th steps I am doing are very similar to the steps you follow in you development.
Do you have a link or or something to put you in the link page?

we now have a ward price for cool post show innovations.
the aword is measured in ass kicks, from simple text to large bold with extra letters. yours top the scale at a.
kickkkkkk Assssssss
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Postby agi_shi » Wed Jan 30, 2008 4:31 pm

Julio Jerez wrote:wow you are using the joint system more that I thought, awesome :D
It is funny th steps I am doing are very similar to the steps you follow in you development.
Do you have a link or or something to put you in the link page?

we now have a ward price for cool post show innovations.
the aword is measured in ass kicks, from simple text to large bold with extra letters. yours top the scale at a.
kickkkkkk Assssssss

w00t Sundown, you and me in 'da kick ass club :D
agi_shi
 
Posts: 263
Joined: Fri Aug 17, 2007 6:54 pm

Postby Gernot » Thu Jan 31, 2008 7:34 am

Gah! This ting looks so freaking ugly realistic. Makes me shiver. ACE WORK!
www.glbasic.com - the most perfect BASIC for Newton.
...propably
User avatar
Gernot
 
Posts: 10
Joined: Sat Nov 04, 2006 5:54 pm
Location: Germany

Postby DarthPhysics » Thu Jan 31, 2008 8:29 am

True :D

I just cant stop looking at this :wink:

So its IK > Custom Joints > Skeleton > Mesh Deformation

Just the .. Custom Joints > Skeleton ... part are used on my project.
the problem is the "IK" ;) , i just removed every IK code i have do for my robot.
Newton do it better(for the robot).The only advantage from IK is the control point you can
move and orient that the other objet follow.

Anyway , ... i hope i never see a spider like that on my PC room :D
The theory is when we know all but nothing work.
The practice is when everything work but no one know why. <- that is me :) without the 'everything work'
User avatar
DarthPhysics
 
Posts: 44
Joined: Sun Apr 23, 2006 8:57 pm
Location: Boulay-Moselle , France


Return to User Gallery

Who is online

Users browsing this forum: No registered users and 8 guests