Contraint loop assert when body has large mass

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Re: Contraint loop assert when body has large mass

Postby Julio Jerez » Mon May 01, 2023 2:00 pm

hi.

I was looking at you test case, to see why was not moving, and I realized that it is indeed one of the reason why I was making the ndModel class.

the dmodel class does not anything that is no possible to accomplished with normal arrangement of bodies and joint. but it provides a way to simplify modeling arrangement modeling and joint.

in your demo, I see you made a custom joint that serve as motor, but the problem is that since all of the joints are the same type of hinge, when the spins, they will move at different rate, causing the hole system to be stuck.

what you want is one of the hinges to be a motor, and the other to be there just to enforce the constrained motion.
There are different way to fix this. one will be making different type of hinges,
another would be using paraments on the hinge, and even doing a control pass outside the update.

The ndModel allows for the encapsulation of the Bodies and Joints arrangement.
there will also provide and update function at different point during the simulation pipeline.

one update happen after contact calculation and Joint internal forces calculation.

what the application can do here is that it can hold to variable and states, that are part of the entire arrangement. it can also specify the hierarchy of the arragement.
here the application can update the element that it needs in a more natural way.

for your example in just collected the MainBody/AxleBody hinge, and in the model update I apply the
motor example.
now if you sync and try the demo, you will see that is does move, It does lift the body but that's because I just copied so basic parameter, you know how to set the motor, so that's not the issue.

the point is that you can see that using models, allow for simpler modeling, and even using the standard classes with fewer customizations.

I thought this is of some use for you.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Contraint loop assert when body has large mass

Postby Esharc » Thu May 04, 2023 12:50 am

Sorry for the delay in responding.

Yes when I initially updated our physics engine to use Newton4 from Newton3 I noticed your ndModel class and thought this would be a very nice way to simplify our system. But it is going to take some work from my side to get it going because of the way we setup our vehicles.

We use a component approach where we have developers that just create the vehicle using lua scripts. Each component will be a different part of the vehicle, so I would have to change the way that the entity developer's do things for this to work.

It is something I would really like to get going on my side, but time constraints usually get in the way since the physics engine in most situations is pretty stable and my time is usually used on other projects.
Esharc
 
Posts: 120
Joined: Tue Jan 10, 2017 5:23 am
Location: South Africa

Previous

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 49 guests

cron