I'm simulating a cube being manipulated by a robot gripper using reinforcement learning algorithms, and I realized that the training results are very different when I used default "box" type to create the cube vs when I import an stl file of a same size cube and load it using "mesh" type. The size, position and orientation of the imported cube all seem normal, the density is also set to be the same. Any idea what could potentially cause this, and how I can solve it? Thank you!
All physical properties being the same difference can arise from the collision detection mechanism. For geometric shapes (sphere, box, cylinder, capsule) under collision, MuJoCo has analytical solvers. For general collisions involving convex meshes, MuJoCo uses the "libccd" library. So in principle, similar shapes modelled differently can have slightly different collisions. Analytical collision solvers are fast and much more stable. I'll advise using geometric shapes over meshes whenever possible.
Thank you! I'll try to see if I can build custom geometries using combinations of built-in geometries.