Julio Jerez wrote:one of the problem I have is how to relate the inverted pendulum to the dynamic articulated body skeleton
To me this is one of the easier problems.
E.g. i use inverted pendulum to get the desired ankle angle:
Divide ragdoll bodies in 2 groups - the bodies above and the bodies below the ankle joint.
For each group build one virtual single body with it's properly summed up physical properties.
Create Inverted Pendulum from the 2 virtual bodies and calculate ankle torque / velocity from control target.
Use that results to build a pose for the real ragdoll, and try to conserve physical quantities from the IP at control target.
Sounds easy, but it involves the IK solvers, some proper interpolation from two real ankles to one IP ankle, and the problem to calculate inertia for a group of bodies (i still loop over all bodies because a inertia matrix can't be build in my opinion as discussed in some other thread).
The entire mapping between ragdoll and IP is not based on analytical math and will introduce some error to me, but i don't worry it's relevant.
The only place whre i'm exactly analytical is the IP itself.
As the upper body moves, the distance to the edge of the foot changes, so does the max acceleration that can be used without tipping over.
So the IP is a system with position dependent acceleration, and the equations to control such a system become very very complex. I've used tools like Mathematica to get them.
(Allthough i think the win over the approximate equations i've used before may not be worth it - i'll check that back when it works)
I'm back to global illumination right now and take a break from physics.
The final plroblem i have with the ragdoll is that i don't know how to predict the small error or temporal lag that Newton gives me.
This problem is there, no matter if i use a 20 bodies ragdoll, or a simple 2 boxes IP model directly.
Seems no big problem, but i have no idea at the moment.
You need to bulid a two body IP model yourself and try to rotate the upper body to target angles as fast as possible without loosing balance.
As fast as possible means the center of pressure, visualized by summed foot contacts weighted by contact force, has to be almost at the edge of the foot -> best performance AND highest risk to loose balance at the same time.
You will be surprised how hard this is, and humans do this all the time.
I'm sure this is the key problem to be solved, no matter on any other details.
For the rest of your post i'm not sure if i understand but we may be similar.
E.g. i could use animation too and the IP controller / ik solver would care to maintain balance automatically (but my goal is to replace animkation completely - no time or mony for animation

).
About the hard joint skeleton:
I think the reason i did not get it to work for balancing ragdoll is simple:
The contact forces are not part of the skeleton, but they are as important as anything inside the skeleton.
Because the skeleton is so strong, there is additional stress on the contacts and so they fail to keep accurate enough.
A solution might be: The possibility to get a good inital guess for contact forces by callback from the user, which the solver can refine during it's iterations.
This way i could calculate the guess from a virtual single body of the whole ragdoll.
This would also make it possible to run at 60 Hz. I need at least 90 - at 60 the contact forces are to bad anyways.
If that sounds a bad idea to you, maybe it could be done with the user contact stuff you plan to add.
(let me know if something similar or better is already happening inside Newton)
What i do at the moment is this trick: Do not use hard joints, instead use distance joints (1 row) from the feet to ALL other bodies. 20 Joints to one body

And it is stable without issues!
Also it is rock solid stiff against gravity, just like using hard joints.