Hello,
I am now going to do a peg in hole tasks. However, when I import the urdf of peg and hole, the peg can not insert to the hole. I think it may related to the convex hull, but I don’t know how to configure it … can anyone help me ?
To modify the Collision Type after converting URDF to USD using the URDF Importer, you can follow these steps:
Open the converted USD file created by the URDF Importer.
Open the hierarchy of the USD file by navigating through the Stage tab on the right side.
Inside the Properties, locate the Physics → Collider section and open it.
Modify the Approximation setting from ConvexFull to SDF Mesh or any other desired option.
Save the changes by pressing Ctrl + S. (Note: Collision visualization can be enabled by clicking on the eye icon in the top-left corner, then selecting Show By Type → Physics → Colliders → All.)
Based on the URDF you provided, the collision tags and visual tags are defined within the URDF, so there should be a “collisions” stage along with the “visuals” stage in the USD generated by the URDF Importer. You should be able to find it by expanding the “+” icon next to “base_link” in the Stage tab on the right. Under “collisions,” you should see “mesh_0,” and I believe you will find “Physics → Collider” there.
I’m glad to hear that you were able to change the collision type successfully.
Can you enable collision_visualization to check the collision mesh? You can enable collision_visualization by clicking on the eye icon in the top-left corner and then selecting Show By Type → Physics → Colliders → All. This should visualize the collision mesh as a green Triangle Mesh. Please take a look at the Collision Mesh and verify if there is a proper hole on the “hole” side.
Thanks,
I find that the collision mesh of the hole was convex, then I change the Collider setting to SDF Mesh in the visuals stage, and the peg can successfully insert into the hole!
However, when I try to import a smaller hole, the peg still can not insert to the hole.
If it’s alright, could you please provide me with the URDF files for the Peg and Hole, as well as the corresponding STL files? Based on the images I’ve seen, it seems that they haven’t been converted to SDF Mesh yet. I would like to try converting them myself and verify the results. Once I have confirmed it, I will attach the USD files to this thread.
sorry, Maybe I missed some steps, but now it’s okay again.
I have summarized the following steps:
1, import the urdf , and checked “fixed based link” and “create physics scene” (is this necessary?)
2, Open the corresponding USD file
3, change the mesh type to SDF Mesh and check the mesh by “enable collision_visualization”, but do not add a rigid body with colliders present (Not verified, but it has been added before. I don’t know what’s going on, but it sometimes doesn’t work)
4, use “create_prim” to create the hole to the world.
Thank you again for your answer!
By the way, from where you found that they haven’t been converted to SDF Mesh yet?
The reason I thought the objects were not converted to SDF was because when I created an Insertion task in the past using SDF, the Triangle Mesh was provided in finer detail, and the mesh appeared on the object’s surface. However, when I looked at the images you provided, it seemed like the mesh was positioned away from the object’s surface, which led me to believe it wasn’t converted to SDF.
The current mesh now is like this, I don’t know whether it provided fine details?
Because even if I increase the “SDF SOLUTION”, the mesh seems not change. Furthermore, when I set the value to 2500, the mesh disappeared… hole (2).STL (7.8 KB)
I see.
It doesn’t seem to have the level of fine detail I expected. In my case, I would directly open the STL file in Blender or similar software and subdivide the mesh to make it finer.