openai / mujoco-py

MuJoCo is a physics engine for detailed, efficient rigid body simulations with contacts. mujoco-py allows using MuJoCo from Python 3.
Other
2.88k stars 813 forks source link

Excessive Duplicate Vertices in Imported Mesh in MuJoCo #800

Closed binbinbai closed 4 months ago

binbinbai commented 4 months ago

Hello,

I encountered an issue when importing a mesh with 48,164 vertices into MuJoCo. When I accessed the vertices through sim.model.mesh_vert, the number of vertices reported was 193,569, which is significantly larger than the actual number of vertices. Upon filtering out the duplicate coordinates from the 193,569 vertices, I found the correct number of vertices to be 48,164. This indicates that there are a large number of duplicate vertices in the MuJoCo representation of the mesh.

Could you please explain the logic behind these duplicate vertices? Additionally, I would like to restore the vertex count to 48,164 while ensuring the order is consistent with the original mesh indices. How can I achieve this?