mujoco-py
mujoco-py copied to clipboard
Rendering convex hull
The simulate executable for mujoco allows for rendering the convex hull version of the scene which is helpful for analyzing the contact model of certain geoms.
Is it possible to do the same thing in sim.render() or a similar python setting?
Is there any update on this? How do we visualize the convex hull in the renderer?
btickell, were you able to figure out how to render the convex meshes?
I ended up converting my meshes into convex meshes.
Using the HACD library?
Yes. This seems to be the standard approach from people I've talked to. I think rendering the hull would still be a useful feature.
It was late, but I did it like this.
import mujoco_py
from mujoco_py import load_model_from_path, MjSim, MjViewer
import os
mj_path = mujoco_py.utils.discover_mujoco()
xml_path = os.path.join(mj_path, 'model', 'humanoid.xml')
model = load_model_from_path(xml_path)
sim = MjSim(model)
viewer = MjViewer(sim)
viewer.vopt.flags[0] = True
viewer.render()
I found it here.