[SOLVED] slider between 2 parents and 1 child

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Re: slider between 2 parents and 1 child

Postby Julio Jerez » Sun Nov 29, 2020 3:37 pm

Well it was just an idea.

I am still surprised, that you went for using springs to control a human and like skeleton.
I assume you are using paid controllers.

I alwsys found that approach ad-hoc. But you probably has some novel idea.

Is not that I have been suscessfull. Each one of my experiment has been a failure, I never tried using pids.

I tried using motors with two pases, one to calculate desire locations and setting motors parameter, and that fail.
Then using close kinematic looks, and that was actually suscefull but more for mechanic constraction where the limits are known.
For a human articulated body, is a problem each time a joint touch a limit. This is because the mass matrix of the system changes and the assumption of the kinematic loop break down.

I later going to try my very last approach, and that will be
Ridging the skelton with hard motors, so that it as a rigid body.
Then the target will be calculated by an ik pre pass that will determine new desired poses, and set that as the motor new targets.
I have high hope for this approach because since most ik passes are iterative, them dealing with the joint limit is a lot simpler. Therefore the motors will never hit those limits.

That's the summary, but I know thre are always new problem that are hard to anticipate.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: slider between 2 parents and 1 child

Postby blackbird_dream » Mon Nov 30, 2020 2:20 am

Well, it's the Hill model for muscle units. Here an illustration of the model. All forces (FCPE=FCE+FPE) and FSE are non linear. FCPE is a function of lCPE (distance=elongation of the CE//PE unit) and its time derivative d(lCPE)/dt . FSE is a function of lSE.
http://wiki.ifs-tud.de/_media/adp_laufrobotik/adp_2013/bild1.jpg

1st thing is to model the Hill actuators then to control them.
Now we're about to implement the Hill model in a class.

I believe there are 3 ways :

1) model the internal dof (i.e. the position of the point inbetween) with a Newton body linked to the 2 limbs by 2 dCustomSlidingContact and input FCPE and FSE procedurally.

2) build a new joint linking one body (i.e. the internal dof with a low mass) to 2 other bodies (i.e the limbs) like this:
https://ibb.co/LZR4SMD I think it's technically possible. The difference with other joints is there is 1 parent and 2 children. What do you think about it? Then input FCPE and FSE procedurally.

3) No third body, just the 2 limbs and compute/update procedurally the internal dof=lCPE and its time derivative in a Newton-Raphson iterative loop to equal FCPE(lCE, dlCE/dt) and FSE(lCE,distance between the 2 insertion points). The problem here is to compute the time derivative of the state variable lCPE. Is it possible ? then just apply forces to the 2 limbs with something like addforce(...)
User avatar
blackbird_dream
 
Posts: 354
Joined: Wed Jun 07, 2006 3:08 pm
Location: France

Re: slider between 2 parents and 1 child

Postby Julio Jerez » Mon Nov 30, 2020 6:24 pm

In the diagram what are ce, pe and se?
It looks as if they are springs and dampers but them it shows lce. As if it was a displacement so it is confusing.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: slider between 2 parents and 1 child

Postby blackbird_dream » Tue Dec 01, 2020 3:31 am

lCE is a displacement. FCE is a force given by a procedural law depending on lCE and its time derivative dlCE/dt. FPE depends on lCE with a non linear law either. FSE depends on lSE also in a non linear law.
lCE+lSE=distance between the 2 insertion points on the limbs.
User avatar
blackbird_dream
 
Posts: 354
Joined: Wed Jun 07, 2006 3:08 pm
Location: France

Re: slider between 2 parents and 1 child

Postby blackbird_dream » Tue Dec 01, 2020 12:46 pm

I'm quite sure it works procedurally with no 3rd body:
I use a state variable (here lCE) and find the value that balances the force (FCE+FPE) and FSE with a Newton-Raphson iterative algorithm each time the Force callback is called and then apply FSE to the arms.
My question is about dlCE/dt which is needed to compute FCE in addition to lCE.
I think of approximate it with forward finite diff: (increment of lCE)/current_timestep
My question is what function to call to get the currenttimestep in callbacks ?
Thks
User avatar
blackbird_dream
 
Posts: 354
Joined: Wed Jun 07, 2006 3:08 pm
Location: France

Re: slider between 2 parents and 1 child

Postby Julio Jerez » Tue Dec 01, 2020 1:54 pm

all call backs pass the time step.

I do not really undertand hwo that arrangement of spring works, I only learned to deal with linear springs. of the form f = kx

the question I have is you can use the engine to rig you set of rigid bodies. leaving onle the free dof.

what that gives you is an contraction of bodies with a reduced set of dof. The engine is robust enough to enforce that.

from there you can use Langragian dynamic to determine that accelration of the free dof, or the force. either way should work.

Using Lagrangian can get complex when using complex articulation, but that are many book and you tube videos that show hwo to go about.
there're also program that can generate symbolic derivation, specially when using nor conservative force on the right side where you need to calculate a generalize force.
Newton can give you that part that guarantee that the constrains are workless.
the only condition you have to be careful is that the rig of joints leave a holonomic system.
you can check that definition in Wikipedia.

I has done that when I make vehicles suspension, because as I said before the spring damper given by the engine is only an approximation that look good but is not accurate, since is formulated by analogy of two different systems of equations. kind of like when you do a spring/damper for a mechanical system or an capacitance and and inductance for an electric circuit.

check out some of the you tube videos for Langragian dynamics examples specially the one that address non conservative forces.

the reason I say this is that when you plug a force element is a system of bodies the force does not act in insulation, it apply to the entire system, that what generalize fore are all about.


I saw you use a program that let you represent mechanical system, maybe that system can generate symbolic solution. I know Mathematica does, but is very hard to use.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: slider between 2 parents and 1 child

Postby blackbird_dream » Tue Dec 01, 2020 5:08 pm

Well, the forces are mainly second order and exponantial. Non conservative.
FSE and FPE stand for endstop forces and FCE is the active part of the muscle which is displacement and speed dependent.
What I do and I'm confident it works is a sort of condensation (in the sense of FEA). I mean the free dof (ie the relative displacement of the point between the springs in series) is updated off-ND. It's easy as the mass is null, then the 2 forces (FSE and FCE//FPE) must be equal each timestep. The balance is made using Newton-Raphson algo to determine the optimal lCE (the one which makes the forces equal). It's easy because the force laws are analytical, then the derivatives (dF/dlCE) can be computed analytically. The derivatives are used in Newton Raphson. I tested it with the mechanical software and I need only 5 iterations each timestep to compute the internal dof lCE (It uses Euler time discretization). So I think it will work the same with ND.
PS: Yes I know Lagrangian Mechanics as well as Hamiltonian Mechanics but I can do simple here.
Thks
User avatar
blackbird_dream
 
Posts: 354
Joined: Wed Jun 07, 2006 3:08 pm
Location: France

Previous

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 53 guests