Talk about inverse dynamics solver

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Re: Talk about inverse dynamics solver

Postby Julio Jerez » Wed Mar 16, 2022 7:36 pm

JoeJ wrote:Yes, but the joint can not generate a torque which would match such wind. No way.
If the small balls orientation would be fixed to the world space, then it could.
But there is no such fixed link. The box must fall down.
The only way to prevent the fall for the joint would be to move the ball to the right, resembling to make a step.

If anyone else is reading this, please help me out! Julio must be stopped! :P
Tell us what you think guys!


I do not know else I can explain it, but I think I can.
I commited a test that add an angle drag to the to body.
if you check it now, you will see that as the angular momentum is * out of the system, the joint can goes back to the equilibrium position to are familiar with.

the mat does not lie. is is this equation.

Code: Select all
         const ndFloat32 relPosit = (jacobian0.m_linear * posit0 + jacobian1.m_linear * posit1).AddHorizontal().GetScalar();
         const ndFloat32 relVeloc = (jacobian0.m_linear * veloc0 + jacobian0.m_angular * omega0 + jacobian1.m_linear * veloc1 + jacobian1.m_angular * omega1).AddHorizontal().GetScalar();
         const ndFloat32 accel = CalculateSpringDamperAcceleration(desc.m_timestep, m_linearSpring * 10.0f, relPosit, m_linearDamper * 0.01f, relVeloc);


the relative position is no zero, so the contribution to the acceleration is not zero.
the ball is not spinning, so this contribution is zero
but the turn jacobian1.m_angular * omega1 is no zero, and is just happen that it no mater what the value the relative posit is, but increasing omega it will get to a point that will cancer the linear contribution. so and that point the torque generated by gravity is cancelled by the toque generated by the joint.

if you sync you will see precisely that behavior, and maybe is make more sense to you now.,
what it mean is that it need and active joint to consume the momentum, because it is conserved at all time. this is actually work quiet well joe.

please check it out one more time,

and you will see it now that when consuming that momentum added by the nudge it returns to the family aquarium. what is mean it that the equilibrium point is different base of the momentum in the system. In is in fact a remarkable emerging behavior Joe.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Talk about inverse dynamics solver

Postby Julio Jerez » Wed Mar 16, 2022 7:48 pm

JoeJ wrote:Looking at the code, i don't see a joint between box and ball at all. There is just the effector?
Then maybe my assumption is the problem.
So which internal forces exactly keep the box in air?


the effector asserts three forces and three torque to each body, is does that directly or indirectly when using the inverse solver.

the linear forces cancer the weight, but the also generate torques when there are offset relative to the bod com. so what we see is that the liner force generate the correct torque and force for the desired effect, but we the body is rotating the angular component generates a counter torque that exactly cancel the restoration effect. so the angular need acceleration is zero.

adding and active agent that consume the angular momentum let the joint do the work.

basically, we are talking a static and dynamics equilibrium, dynamics equilibrium is more difficult to visualize. but believe me this is work far better that I even expected.
It just needs to be use properly.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Talk about inverse dynamics solver

Postby Julio Jerez » Wed Mar 16, 2022 7:54 pm

JoeJ wrote:Ok. Example task: Stand upright, lean forward so your com projection is in front of your toes.
You are not allowed to move your feet forward. But you can protect your nose. It will hurt.
Not even superman feet could prevent falling on his nose.

Show this example to your wife, or anybody. No equations. No education on your side. Hear what they say. This is not some trick experiment physics professors use to baffle their students.
It's obviously wrong!!! You're cheating! :!: :!: :!:


again, you are still thinking dynamic equilibrium. is the person is actually walking or running the
when it leans forward is moving down, and forward and does not fall, because the equilibrium is not the same as the static equilibrium point.

I believe robotic people call that Zero Moment points. now I see that this is just a dynamics equilibrium point.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Talk about inverse dynamics solver

Postby JoeJ » Thu Mar 17, 2022 5:20 am

again, you are still thinking dynamic equilibrium. is the person is actually walking or running the
when it leans forward is moving down, and forward and does not fall, because the equilibrium is not the same as the static equilibrium point.

I believe robotic people call that Zero Moment points. now I see that this is just a dynamics equilibrium point.

Yes - if the model would walk (accelerate) to the right by using the ball as a wheel, it should also lean the box to the further right to remain balanced. Agree to that.

But the model does not move at all, and still it is angled to the right. The contact is on the left from the com, and actually the ZMP is right from the com. So, to prevent falling, it would need to move the contact to the ZMP on the right to stop the fall.

Internal torques of the joint would just rotate along the falling models local frame, but could not prevent the fall without actually moving the foot.

If you were right, then why do you still fall to your nose when trying the same experiment yourself, within real life physics?
Why can you not do the same thing as your simulation model, although you have the same joints and conditions? What do i miss - where is the difference?

Something is wrong. The equations, or just the 6dof, idk.
But there is no real life experiment resembling the simulation. Maybe David Copperfield did it, with invisible Ropes. But you won't find this anywhere on YT physics channels.

Will update later the day, and i will also setup a zero gravity test using the model. I'm optimistic i can create a thrust effect, and the model will start moving to Andromeda without an actual thruster installed. This will be another proof of the error.

You must be convinced... :shock:
User avatar
JoeJ
 
Posts: 1453
Joined: Tue Dec 21, 2010 6:18 pm

Re: Talk about inverse dynamics solver

Postby Julio Jerez » Thu Mar 17, 2022 11:51 am

well after you test that last commit, you can tell me is this is more like you expect to behave.

in the end, I know the does not represent anything that is possible in reality.
but it represents a system that is in unstable equilibrium.
and the effect manage to add the extra force and torque to balance.

when the total momentum is zero, the equilibrium point is the one that is intuitive to us.
but when adding some momentum, there is a transient period that when the big box moves off that point and start to fall, the effect try to move to the point where the box will not fall anymore.
but to do that is has to add positive and negative linear and momentum to the system for a net zero,
but in doping that the top box start to rotate, and the result is that the equilibrium point is not longer
where the center of mass project onto the floor, it is a point when the momentum of the box and the ball cancer each other.

to check if this is correct, the last commit add some grad to the big box, so that the angular momentum is consume. and as is doing that you see that is gradually move to the static equilibrium point.

of course, this system will not work for a walking creators, but what I get for this experiment is that on leg can not do the joint, because it only has one pivot, it can control the angular momentum of the top body which was added by the perturbation to the system not added by the effector.
the effect, provide that is working, can't add or subtract momentum to the system, all it can do is to distribute momentum that add to zero. them it is the connection to the external world that can consume part of it. In the example, the part added to the small sphere, is canceled by the floor,

but I will review the effector joint again, maybe the is a bug I overlooked.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Talk about inverse dynamics solver

Postby Julio Jerez » Thu Mar 17, 2022 1:11 pm

you may be right Joe.

reviewing the joint, I maybe be having a problem, that when joint has a motor. I assume that the angular velocity is so small that could be neglected, in almost the large majority of the case this assumption is right either because the motor are placed at bodies com, or because the bodies themself has negligible rotation.
in all preview newton version this was optional, and the joint has many flags, in 4.00 all those velocity component accelerations are part of the joints, so they can't be controlled by options.

however this condition does not applied to motors.
deriving the equation of the effector I see that I am not considering that term, so I was wondering why is working in the 7dof industrial robot, and the reason is that in the industrial robot the assumptions apply, the angular velocity of the contributions are negligible.

when I debug the balance code, there is that angular component of the acceleration that manage to find a balance point outside the com when the top body is spinning,
of course there is no guarantee that adding the contribution will fix the problem, but this is one difference.
the point to consider is taht when the top body is moving, the effector pivot is far away enough that it rotation do generate and centripetal acceleration, adding that contribution can make the bug even worse, or it maybe the part that can prevent the torque to add to zero when the pivot is at a position outside the com.
I will study some more before making that update, but at least this is one difference.

umm, after stepping in debug code, the centripetal is huge. this is what explains why the friction is so string, it is pinning the small down to the ground with 650 m/sec^2 (about 75 g's)

this could be a good sign that something very important was missing. and at the same time was working on other demos. so I continue investigating.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Previous

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 52 guests