Unity-Technologies / URDF-Importer

URDF importer
Apache License 2.0
217 stars 71 forks source link

Friction in URDF ¿? #161

Closed marcoojer closed 2 years ago

marcoojer commented 2 years ago

Hi, I'm new in Unity and I was trying to increase the friction of the fingers of a gripper to facilitate grasping, but when I load the urdf I can not see in the inspector dialog where to set the friction of just the fingers. Thus, anyone knows how to set it? It would be nice if it could be set in the own urdf.

Thanks in advance

A-Ivan commented 2 years ago

Hi @marcoojer ,

I haven't tested this out for grasping purposes, but you could look into something in Unity called Physic Material, with this you can adjust the static and dynamic friction for individual game objects (in this case the grippers/fingers) by setting this Physic material to the desired object's collider component.

Here is Unity's documentation and a video on how to set this up.

If you don't want to use physics, during the collision of the gripper with the object (grasping) you could parent the object to the gripper, this would then have the object move with the gripper (its new parent) until you remove it as the parent later on

I hope this helps. I'm curious if the physic material will help, I assume it will take some time to tinker with and adjust as there are multiple properties that can be set on the physic material.

at669 commented 2 years ago

Hi @marcoojer, the answer above should be what you're looking for--thanks again, @A-Ivan!

A couple additional comments about getting more accurate physics in your simulation--here are some of the Physics Settings you'll want to look into:

Hope this helps!

at669 commented 2 years ago

I'll close out this issue as the answer has been provided, but feel free to open it again if you have further follow-up. Thanks!