MuJoCo model of a 3x3x3 puzzle cube, along with a script to procedurally generate it. Inspired by the Rubik's Cube.
You will need MuJoCo version 2.3.3 or greater to run the model. If you want to use an older version, replace the implicitfast
integrator with Euler
.
Just drag and drop the cube_3x3x3.xml
file into the simulate window.
First install the dependencies:
pip install -r requirements.txt
Then run the following to generate the assets and XML file:
python build_textures.py # Creates the assets/ dir.
python build_mjcf.py # Creates cube_3x3x3.xml.
Solidworks was used to design cubelet.stl
. It has a dimension of 1.9 cm with chamfered edges of length 1.425 mm. The cube was exported as an STL file and processed with process_mesh.py
to obtain the vertices for the mesh
attribute in the MJCF file.