clvrai / furniture

IKEA Furniture Assembly Environment for Long-Horizon Complex Manipulation Tasks
https://clvrai.com/furniture
MIT License
496 stars 56 forks source link

Understanding invisible MuJoCo primitive geometries #40

Closed XinyuWang2 closed 2 years ago

XinyuWang2 commented 2 years ago

I am building an environment with robot=cursor and object=blocks. I notice in _load_model_robot, rgba is set 0 0 0 0. I am not sure if this is what this sentence "So, we use the meshes for just rendering, and add invisible MuJoCo primitive geometries to create the colliders." means from furniture_details.md. I still don't quite understand why doing this. I also tried to disable the "hiding agent" and didn't see any difference in the viewer.

edwhu commented 2 years ago

The meshes are for visualization purposes, but do not actually determine the collision in mujoco scene. This is because even though the meshes may look visually accurate, they have poor collision properties, perhaps due to their low triangulation number.

So we use the mujoco primitive geometries, which are defined in the xml alongside the meshes, to decide the collision. You can visualize them by setting their RGBA to become visible, e.g. (0 0 0 0) => (1 0 0 1).