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 ?
<link concave="yes" name="base_link">
<origin xyz="0 0 0.05"/>
<inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1"/>
<origin xyz="0 0 0"/>
<color rgba="0 1 0.2 0.5"/>
<specular rgb="1 1 1"/>
<origin xyz="0 0 0"/>
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.)
I hope this helps!
I followed your steps, but can not find “Collider section” in the Physics.
I apologize for the lack of explanation!
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 can found the Physics → Collider now, But the peg still can not insert into the hole
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.
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？
That’s great to hear!
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)
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.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.