base
BaseCompositionElement
¶
Bases: ABC
Base class for composable elements in the MuJoCo model, providing common functionality such as compiling to MuJoCo model/data and exporting.
Source code in src/flygym/compose/base.py
mjcf_root
abstractmethod
property
¶
The root MJCF element of this composition element.
compile()
¶
Compile the MJCF model into MuJoCo MjModel and MjData objects. This is where
dm_control.mjcf "hands off" the model that it composes to mujoco for
simulation. Things like the ordering of generalized coordinates (qpos) are
determined here.
Source code in src/flygym/compose/base.py
save_xml_with_assets(output_dir, xml_filename=None)
¶
Export the MJCF model to a directory, including a XML file (filename defaults to the model name if not specified) and all associated assets (e.g. meshes).