I want to simulate pouring objects into a cup #357
-
Hello, So, I created the STL file of the cup in CAD. However, I found the following text at the URL site below. " if you want to model a non-convex shape, you have to decompose it into a union of convex geoms and attach all of them to the same body. " In fact, using the STL file of the created cup (black object), the object (green sphere) did not fit into the cup as shown in the attached photo. I saw the answer to question "hollow cynlinder geom #19", Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 17 replies
-
Hi @miyukin73, you can use V-HACD to decompose the mesh into approximate convex submeshes. I've made a tool to simplify this process here. Run the bash script to install V-HACD and then you can run the V-HACD executable on your mesh. Note you'll want to convert the STL to an OBJ file to use it with V-HACD, you can do that with either Blender or trimesh. |
Beta Was this translation helpful? Give feedback.
-
Hello @kevinzakka I am sorry for the frequent interruptions... I was successful if I just run the XML file using mujoco-2.1.5. As far as I confirm, mujoco_py was updated in November 2021 and MuJoCo was updated in May 2022, Anyway, I would like to ask if you know of any solution to this problem. Thank you. |
Beta Was this translation helpful? Give feedback.
-
Hi, I made you an example model. Copy this file into mug with balls<mujoco model="mug with balls">
<include file="mug.xml"/>
<size nconmax="1000" njmax="3000"/>
<worldbody>
<light pos="0 0 1" diffuse=".3 .3 .3"/>
<composite type="particle" count="5 5 5" spacing="0.011" offset=".005 .003 .15">
<geom size=".005" rgba=".8 .2 .1 1" solref=".005 1"/>
</composite>
</worldbody>
</mujoco> This is what it look like: mug_with_balls.mp4 |
Beta Was this translation helpful? Give feedback.
-
I'm using
Sorry, we don't support mujoco-py. It is an unmaintained package. Please switch to the native bindings and/or |
Beta Was this translation helpful? Give feedback.
Hi @miyukin73, you can use V-HACD to decompose the mesh into approximate convex submeshes. I've made a tool to simplify this process here. Run the bash script to install V-HACD and then you can run the V-HACD executable on your mesh. Note you'll want to convert the STL to an OBJ file to use it with V-HACD, you can do that with either Blender or trimesh.