Two joints connecting two bodies

Report any bugs here and we'll post fixes

Moderators: Sascha Willems, Thomas

Two joints connecting two bodies

Postby Esharc » Wed Aug 10, 2022 3:23 am

Good morning Julio,

We have a system where we connect two bodies using two joints. The joints are offset on the bodies to the left and right sides of the bodies so that the bodies can be manipulated from just a single side at a time.

This worked fine in Newton 3, but changing to Newton 4 we are getting an assertion in ndBodyKinematic::AttachJoint.

So it seems that this functionality is not supported in Newton 4 anymore?

I have added an image to show what I am talking about, I hope the image is clear enough

TwoJointsTwoBodies.png
TwoJointsTwoBodies.png (131.4 KiB) Viewed 5950 times
Esharc
 
Posts: 120
Joined: Tue Jan 10, 2017 5:23 am
Location: South Africa

Re: Two joints connecting two bodies

Postby Julio Jerez » Wed Aug 10, 2022 6:40 am

Not, two bodies can't be connected by more than one bilateral joint.

This should not work in 3.xx either, but is not as critical because the algorithm variance.

In 4.00 some algorithms, count of that design option so that they can be more efficient.
The joint solver will place the rows and columns of the matrix in some specific locations that allow for a fast linear time factorization but that require that not two joints have the same body index.
But if the joints has the same index, then there will be a block of main diagonals with zeros and the matrix could not be factored in linear time.

It is posible that two bodies can be connected by more than onle joint, if the total number of degrees of freedom is less that 6, and 6 is the max number of dof that a joint can removed from two bodies.

That is too hard to determine when the two bodies are connected by more than one joint, so I decided to suppress that functionality.

However, because joint can have limits and also the rows can be reguralized, a joint in 4.xx is alowed to have up to 12 degree of freedom.

So a possible solution in your case is to just make a custom joint that have the same dof that the two joints that you are using, and that should work far better than it does in 3.xx.

Having the all the rows in the same block of the matrix, call for sub block solver that knows how to solver over determined small linear systems. So that's how it works for joint and contact, but also for overdetermine joints.

It is trivial to make the custom joint that does the same job, you just subclass from the bilateral joint, and copy the code that implements submit contraints.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Two joints connecting two bodies

Postby Julio Jerez » Wed Aug 10, 2022 7:27 am

If you decides to make a single joint that does tha same job as the two joints

Them the best place that a demo can be made is in the standard joint demo of the sandbox.

The the joint can be made.
What is that some kind of platform that you can control with some kind of hidrolics?
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Two joints connecting two bodies

Postby Esharc » Wed Aug 10, 2022 7:46 am

Thanks Julio,

I will look into adding a joint that can do the job of the two joints.

It is a drag line that we are simuating, similar to this:
https://images.app.goo.gl/MP5bJ8xwoEcbEoFY8

The chains that are connected to the bucket we have a custom constraint that works similar to a rope.
So the new custom joint that I can make will basically be two ropes that can connect to the bodies.
Esharc
 
Posts: 120
Joined: Tue Jan 10, 2017 5:23 am
Location: South Africa

Re: Two joints connecting two bodies

Postby Julio Jerez » Wed Aug 10, 2022 9:20 am

Yes, and since it is simulation a rope. It should be not problem since I assume each rope will be just one dof.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles


Return to Bugs and Fixes

Who is online

Users browsing this forum: No registered users and 21 guests