kevinzakka / mujoco_cube

A 3x3x3 puzzle cube model for MuJoCo.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MuJoCo 3x3x3 Puzzle Cube

build build

MuJoCo model of a 3x3x3 puzzle cube, along with a script to procedurally generate it. Inspired by the Rubik's Cube.

Requirements

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.

Play with the model

Just drag and drop the cube_3x3x3.xml file into the simulate window.

Generate the model

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.

Cubelet design

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.

About

A 3x3x3 puzzle cube model for MuJoCo.

License:Apache License 2.0


Languages

Language:Python 100.0%