Inverse Dynamics Robot demo questions

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Inverse Dynamics Robot demo questions

Postby JoeJ » Wed Dec 13, 2017 11:10 am

I'm pretty confused by the inheritance which is my fault. Learning OOP always keeps at the bottom of my todo list :)

Here is how i assume the demo works, please correct me if i'm wrong:

There is only one effector, and it uses a joint to connect to the robot.
This effector is like a joint, but it is used only by inverse dynamics, NOT by the physics simulation?
(If so, how do physics know it should ignore the effector?)

The real joints use NewtonUserJointGetRowInverseDynamicsAcceleration first to tell inverse dynamics what it has to solve, and second to get the acceleration when doing physics as usual.

How is NewtonInverseDynamicsAddLoopJoint special?
User avatar
JoeJ
 
Posts: 1453
Joined: Tue Dec 21, 2010 6:18 pm

Re: Inverse Dynamics Robot demo questions

Postby Julio Jerez » Wed Dec 13, 2017 3:47 pm

wow, except for few details, you have everything almost better than I had, considering i have been pusuing this for many, many years.
I am on a cell prone, hard to go over every phase, so I will do it lator.
but yes there are three phaces: the high level hierchcal or ganization of a root with one or more end effectors, the inverse dynamic solver, and the normal physic solver that we are familliar with.
the loop joint I will explain later, but this was the missing part when we left last time.
Glad youmade this thread so that we can talk as we move foward with. there are some missing parts still, but I am very hopeful the will be solve.
Notice this is a new funt ionality of newton not one has.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Inverse Dynamics Robot demo questions

Postby Julio Jerez » Wed Dec 13, 2017 8:27 pm

Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Inverse Dynamics Robot demo questions

Postby JoeJ » Thu Dec 14, 2017 5:55 pm

Julio Jerez wrote:we want to do something like this. see how that works


How would you do this? Of course there is one effector for each leg, but how do you lift the torso up?
Is there another effector for the torso which is the root,
or do you try to push the feet deeper into the ground so torso goes up?
User avatar
JoeJ
 
Posts: 1453
Joined: Tue Dec 21, 2010 6:18 pm

Re: Inverse Dynamics Robot demo questions

Postby Julio Jerez » Thu Dec 14, 2017 8:06 pm

ha that the beauty and awesome of the system. you almost have it.
1-one effector for eact leg.
2-one effector for the body.
3-our hexapod is one box with six identical 3 dof robot like in the demo connected upside down to a single root effector.
4-the root node will control the position and orientation of the torso
5- the leg effector will move based on the command, walk cycle, lift one leg, and so on. very much the was he set it up in the video.

you asked before what are the loop joint for, that's what they do. in the case of the demo is controlling a fix joint, in the case of the hexapot they will be controlling the main body to any arbitrary position in the world.

assuming with get all the funtionality right and all bug fixed, (and there are still few)
we should ge a system that is even betters that his system.
I say this because his system uses PID which is not how muscle works, muscles are more like servos,

PID calculate the force to keep a positions, with servos you gives a desired position or desired speed and the controller do all the calculation to get the torque from a magnetic field to keep the desired parameter. In our case the servo is represented by the joint acceleration, the magnetic field is the friction forces.

All the papers that do character animations that I know about use PID which to calculate a torques, and I have always problem with that, because is just not right.
All it takes is to add a external spike force for the system to brakes down or to slow to react,
you can see that his system moves slowly because PID has a time repose build it.

I actually believe we can emulate that system much better using cheap servos motors and only one computer to do all the calculations. his system uses several computers to do the PID work.

in our system the desired target is provided by a kinematic joint that controll all six degree of fredom. this is the same kinematic joint that we have in the engien after we fix the bug.
and we you know that joint works for ingle bodies.
assuming that joint works, then what happend is that that joint is added to the IK as a loop joint, which is not part of the articulation, then the OK will calcuate the acceleration of all joints angles that connect the leg to the end effector of each leg, and if the joint completely determine thet position of orientations, then the solver will do the calculation of the Joint torques to inforce that parameter.
The beautiful part is that is can deal with over determinacy which is a big problem for pure IK, and that's why most overdetermined Robots still use PID controllers.
does that explain it?

This tecnology is so simple that is scary, because if I am right this solve the problem that many mutibillion dollar companies has tried to solve for amost 40 years: Nasa, Honda, the military, which has try to experiment making land drones for many years.
Thet sad part is that I know I will never get credit for it.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Inverse Dynamics Robot demo questions

Postby Julio Jerez » Thu Dec 14, 2017 8:27 pm

to summarized, the effector that controls the torso literally position and orient the torso where the user wants.
At the same time each leg can be fixed or moves based on where the effect want to place it.
this will calculate the joint acceleration for each joint, and the solver will calculate the torques and force to inforce those accelerations.

as long as the solution is fixable, the body will move around, when the solution for not fixable, for example a steep slope, then he body will slide and will do the best it could.

the only missing part is that the solver still does not deal with joint limits, but that's because I have not added yet, I will try to do this weekend.
However that's not strictly needed to get the robot joint, it will work as long as the effector are keep within I the reaching limits of the IK chain, but I do want to get the solver limit in.

notice that this does not cheat in anyway, the physic solver is always calculating proper joint torques.
that the huge difference with IK systems.
This system can calcuyuate intantanues torques just like muscle do, where PID system required a continues function of the form f = K * x - C * v,
and the only way to make the responsive if buy making then stiff increasing K and C, but that force the to run at very high speed, the dirty lite secret of all those paper and youtube videos is that the do not tell is that teh system are so stiff that the have to run the simulation at 1000, or even 2000 fps.

In fact that's why Kuka Robot are so good, the reason is the Kuka Robots are not overdetermined, they can use IK solvers to manipulate the desired position or speed of the servos.
this system will be able to do what Kuka Robot do with systems that are over determined and still be fast and responsive like KUKA robot.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Inverse Dynamics Robot demo questions

Postby JoeJ » Fri Dec 15, 2017 3:27 am

Ok, sounds really easy to use! I'll do a small test myself...
User avatar
JoeJ
 
Posts: 1453
Joined: Tue Dec 21, 2010 6:18 pm

Re: Inverse Dynamics Robot demo questions

Postby Julio Jerez » Fri Dec 15, 2017 1:52 pm

do not start just yet, let me complete the limits on the solver this weekend.
this is like when we did the skel solver without limits, soon we found out that it was to hard to model anything beyond simple demos.
you can try but do not try any work around if something does not work as you expect yet.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Inverse Dynamics Robot demo questions

Postby Julio Jerez » Fri Dec 15, 2017 4:11 pm

Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Inverse Dynamics Robot demo questions

Postby Julio Jerez » Sun Dec 17, 2017 8:31 pm

Hey Joe and Sweenie I committed the beginning of teh hexapod robot.
it does do anything yet, but you can see how the limbs act like muscles.
there is not toque penalty, in fact if you move the a little and they acquired velocity, they maintain teh speed independently until the friction reduce it to zero, to me this give the impression that this is an alive object no a robot, but that just my impression and I could be wrong.
I still need to add some of the basic motions,

The first one is just to keep the idler location, and maybe give a lithe swing,
if this work as I expect them you can see this to control this object is just a matter of making a control that determine the position of teh six limb and the base. then teh position is interpolated.

I am hoping you can deduct where this is going for a biped character.
basically my claim is that pelvis connected for a end effector that is mapped to and inverted pendulum soudl produce realistic motion.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Inverse Dynamics Robot demo questions

Postby Sweenie » Mon Dec 18, 2017 4:13 am

It's like it just "playing dead" and waits to move(attack). :lol:
So to get this hexapod walking you have a kinematic controller for it's body and each leg(feet).
How will the kinematic controller for the body be handled? Do you have to calculate the position for the body controller based on the midpoint for each leg? Or will the the body controller only handle the vertical position of the body and be pulled along when the legs starts to move?

I suppose you calculate a midpoint based on all feet positions and then allow some limited linear movement to make the body move up/down , back/forth and sideways. And the same for the angular movement, to allow some rotation of the body. That should make the hexapod look pretty lifelike. :D
Sweenie
 
Posts: 498
Joined: Mon Jan 24, 2005 7:59 am
Location: Sweden

Re: Inverse Dynamics Robot demo questions

Postby Julio Jerez » Mon Dec 18, 2017 7:46 am

Sweenie wrote:How will the kinematic controller for the body be handled? Do you have to calculate the position for the body controller based on the midpoint for each leg? Or will the the body controller only handle the vertical position of the body and be pulled along when the legs starts to move?
I suppose you calculate a midpoint based on all feet positions and then allow some limited linear movement to make the body move up/down , back/forth and sideways.


Thats what I though for a while, but the thing is that provided that the system is working fine (which is not yet) you can place the body anywhere, the effector simple tell the physics "this is what I want to do?" and if the joints have the power to generate the necessary torques or forces then they will do that, if they do not have enought friction, then they do what they could and reach some dynamics equilibrium.

it is these places when a joint can't meet the desired target that the output can be used to signal the controller to active some new state.

I know it sounds like magic, but it really is not, this is a is a new stage on physic simulation, it is using the laws of physics to do things that seem physics impossible or extremely difficult.

for example it is really easy to make a character that can fly and make really interesting posed like these:
https://www.google.com/search?q=iron+man+pose&tbm=isch&tbo=u&source=univ&sa=X&ved=0ahUKEwi4zOjwu5PYAhUS3GMKHadIDjkQsAQIKw&biw=1920&bih=949

you will see that after we get two or three demos, that will seen very natural and intuitive which of those poses are fixable and which aren't.

for example we can see that a horizontal fly pose is impossible to sustain because the center of mass can not be supported, however a vertical is quite possible.
It is amazing, I always thought that in an alternate universal where superheroes were real, that Superman was more natural than Iron man, and it turns out that it is Iron Man who is the more realistic since the large majority of his poses are with the body upright and supported by thrusters.
even when he flies horizontal you could say he is gliding with his fins in the suit.
Superman on the other hand has a stupid cape that can only generate drags.
And that's by the laws of physics, who knew? 8)

anyway I see if I can make more progress today. I found some memory overrun in the solver.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Inverse Dynamics Robot demo questions

Postby Julio Jerez » Mon Dec 18, 2017 1:03 pm

ok here we come wit the big, big challenges.

I completed the setup, and It is jumping like crazy.
basically each joint is try to go to it target location, but there is no fixable solution.

I did no expect to be this bad, so there must be some bug some where, but the fist thing I nee to solve is the memory overrun in the solver. which does not seem to make sense at all.

anyway will debug this. The one think is that you can see all the animation that is going on, ye the is no control take place, all it is doin is try to keep the effectors at some specified location.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Inverse Dynamics Robot demo questions

Postby JoeJ » Mon Dec 18, 2017 3:27 pm

Impressive how responsive and fast the robot acts now :)
The hexapod needs to slow down as it seems :mrgreen:
User avatar
JoeJ
 
Posts: 1453
Joined: Tue Dec 21, 2010 6:18 pm

Re: Inverse Dynamics Robot demo questions

Postby Julio Jerez » Wed Dec 20, 2017 4:47 pm

ok I now placed the hexa making to try to stand by its own mean.
its kind of working but with a terrible jitter, that is a simptom of some bad bug somewhere.

basically the six legs are a fixed to point and the main body is told to get at a fi position.
it does it for a few seconds and then start to jiter all ove the place.
I will try to debug it because it seems like there a huge bug some where.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Next

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 9 guests

cron