Kinematic Bodies[Solved]

Report any bugs here and we'll post fixes

Moderators: Sascha Willems, Thomas

Re: Kinematic Bodies

Postby Julio Jerez » Mon Mar 04, 2019 2:19 pm

Dave Gravel wrote:Just the other bodies don't seen to wake up with the kinematic body, Like you have say upper.
The normal collision seen to work good now.


nice, you saw that, that's the second bug I mention, I was wondering why the buoyancy seemed to work, and the answer is that is was never working, the bodies falling on the pool were active and while they were active the buoyancy force was applied, by as soon as the were to sleep the they do no get the update.
so is time to fix that.

My question is should we fix that?
if a kinematic body is sleep and the body is also sleep, would we apply the action, or should the kinematic have and option that activate that.

of course this only apply to kinematic bodies who are sleeping, in the video its clear that the moving platform should wake up and update ether body, so that has to be fixed.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Kinematic Bodies

Postby Dave Gravel » Mon Mar 04, 2019 2:35 pm

Here a other information:
If the kinematic body is set to NewtonBodySetCollidable(m_platform, 1);
The collision don't work anymore.
You search a nice physics solution, if you can read this message you're at the good place :wink:
OrionX3D Projects & Demos:
https://orionx3d.sytes.net
https://www.facebook.com/dave.gravel1
https://www.youtube.com/user/EvadLevarg/videos
User avatar
Dave Gravel
 
Posts: 800
Joined: Sat Apr 01, 2006 9:31 pm
Location: Quebec in Canada.

Re: Kinematic Bodies

Postby Julio Jerez » Mon Mar 04, 2019 2:55 pm

yes, I know that, I am fixing the path for when there should be not contact calculation but the intersection should be detected.
I will fix that par tomorrow.

I now have the problem that the joint does no activate the sleeping bodies working.

but now I Still have tow more bug to fix.
1-the joint filter that I believe I removed, basically this check if the joint is active before applying the action.
2-add the option that the joint only calculate the penetration distance, but not contact when the kinematic is in mode zero.

when those two bugs are fixed, the bodies will be able to penetrate the platform and only change color but not collision.

Please sync when you have time and check again, it should be better now.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Kinematic Bodies

Postby Dave Gravel » Mon Mar 04, 2019 3:00 pm

Yes it work better now.
I now have the problem that the joint does no activate the sleeping bodies working.

I think it is the same problem that I get with my robot and the moving tcp object.
When I say tcp I talk about something like this:
-
https://www.leoni-factory-automation.co ... -fixtures/
https://www.kuka.com/en-ca/products/rob ... _tracc-tcp
You search a nice physics solution, if you can read this message you're at the good place :wink:
OrionX3D Projects & Demos:
https://orionx3d.sytes.net
https://www.facebook.com/dave.gravel1
https://www.youtube.com/user/EvadLevarg/videos
User avatar
Dave Gravel
 
Posts: 800
Joined: Sat Apr 01, 2006 9:31 pm
Location: Quebec in Canada.

Re: Kinematic Bodies

Postby Julio Jerez » Mon Mar 04, 2019 3:39 pm

Oh now I understand what you meant in the pm.
Yes that's one of the difference with the new sdk.
Before contact joints were always calculated very tight. As soon as two bodies separated lthe contacts were deleted by the obb test.
Now there is not longer obb test in newton, therefore there can be many inactive joint, as many as they are overlay on same cell in the broadphase.
Them there is a garbage collection pass that delete dead contact joints.
This is a big performance improvement but cost more in memory than the old method.

Now we get the problem that if we iterate over the joint list of a body, it will get these inactive pairs.
All I need to do is add a filter to the iterator that get first contact and get next contact, so that inactive contacts are skipped.

The test is there, but is obscured and too much to do it now, it will do it tonight.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Kinematic Bodies

Postby Dave Gravel » Mon Mar 04, 2019 8:07 pm

About the robot tcp the best result that I get for now is from the kinematic controller.
https://www.youtube.com/watch?v=yiw-WizmbOg

It work pretty nice if I don't forcing the joint to go over the limits.
With the kinematic controller I don't get the joint sleep problem.
The robot have 6 axes, The kinematic joint is connected on the axe 5 part.
I get only one major problem for now with the kinematic controller.
I can move the robot without problem in any axes, I can rotate the axe 5 up and down this part working good.
My problem is when I apply the rotation for make turn the axe 4, This one rotate only when the axe 5 is up or down. If the axe 5 is not rotate the a 4 don't want to rotate.
I have try to apply the rotation from a other method and I get the same problem but in a other order.
I'm not 100% sure why I get this trouble, I think I need to multiply my rotation matrix with a other one to get the good result.

Currently it is the best result that I get if I compare it with the static or kinematic body method for make the tcp.
You search a nice physics solution, if you can read this message you're at the good place :wink:
OrionX3D Projects & Demos:
https://orionx3d.sytes.net
https://www.facebook.com/dave.gravel1
https://www.youtube.com/user/EvadLevarg/videos
User avatar
Dave Gravel
 
Posts: 800
Joined: Sat Apr 01, 2006 9:31 pm
Location: Quebec in Canada.

Re: Kinematic Bodies

Postby Julio Jerez » Tue Mar 05, 2019 12:02 am

ok we can look at the problem afte we get the kinematic bodies bug fixed.
I now commited the part that filter inactive contacts.

if you sync you can see tha now the box can stand on teh side of the platform and does no turn read until teh platform actually touched the box.

tomorrow morning I will set mode and see what is wrong there, basically thsi model the box should be able to penetrate the planform and become read while is touching the platform

is this mode that is teh most interestiong because if can be use to set Game variables that cna be use to do game logic. for example been inside a house or a cave of outside, a tornado, being on bidy of water and stuff like that.

as soon as whe get this les talk about that Robot Dave, there most be a wat to get what you want, I am just a little confused as to what it is you are calling kinematic method.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Kinematic Bodies

Postby Dave Gravel » Tue Mar 05, 2019 1:05 am

It's easy to understand :) just i'm very bad for explain.

The tcp is a point in the space 3d, I need to have the robot following this point.
The only way that I know for do this is to use a body and connect a joint on this body and connect it with the final robot part.

The collision is not need at all for this body.
When I update this body matrix I can move the robot because the body is connected with the final robot part.

When I say the static method and the kinematic body method, I just change the body type the method stay the same.
This video use the same method with two different body type, One is static body and the yellow lined tcp is a kinematic body.
https://www.youtube.com/watch?v=KGc4UhqPuwI

The method look slow to update comparate to the joint kinematic but I can setup it more stiff later.
I can't test this method anymore because I get the joints sleeping.

In this old video the red sphere tcp is a static body connected with the final robot part.
https://www.youtube.com/watch?v=7R6hQYvwG5s

Sorry for my bad explanation and english...
When it work good after it is easy to record robot movement sequences.
No prob Julio I don't have any limits of time for this hehe.
I think i'm close to have it working with the joint controller, I get better rotation now.
Edited: If you like to test the current robot demo here the link.
https://www.mediafire.com/file/7hxakb4z1mcr7xd/OrionX3D_Demo_KinematicController_Robot_irb120.zip
Thanks, and it is very cool to have the kinematic body working better now I think to use it more soon.
You search a nice physics solution, if you can read this message you're at the good place :wink:
OrionX3D Projects & Demos:
https://orionx3d.sytes.net
https://www.facebook.com/dave.gravel1
https://www.youtube.com/user/EvadLevarg/videos
User avatar
Dave Gravel
 
Posts: 800
Joined: Sat Apr 01, 2006 9:31 pm
Location: Quebec in Canada.

Re: Kinematic Bodies

Postby Julio Jerez » Tue Mar 05, 2019 11:04 am

alright I now have the kinematic bodies working both ways.
the one of the right is a transparent platform, and the one of the left is a solid spinning platform.

the bodies change color to indicate interaction the the platfroms, the manipulation is implemented with the help of a Listener, which now has a class interface in the dCustom Joint library.

I hope this is clear enough to show how both kinematic bodies and Listeners works.

It has been very hard to introduce the idea of Listener in the engine, for more than almost 10 years people ignored them because all they want is to use Newton as if it was some other engine.
and at this point Newton separates and go its own way.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Kinematic Bodies

Postby MeltingPlastic » Tue Mar 05, 2019 8:30 pm

Works great for me now!
MeltingPlastic
 
Posts: 237
Joined: Fri Feb 07, 2014 11:30 pm

Previous

Return to Bugs and Fixes

Who is online

Users browsing this forum: No registered users and 3 guests

cron