mjcf
set_mujoco_globals(mjcf_model, mujoco_globals_path)
¶
Load a YAML file of global MuJoCo settings and apply them to an MJCF model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mjcf_model
|
RootElement
|
The root MJCF element to update. |
required |
mujoco_globals_path
|
PathLike
|
Path to the YAML file containing global parameter overrides (e.g. timestep, gravity). |
required |
Source code in src/flygym/utils/mjcf.py
set_params_recursive(root, params_dict)
¶
Recursively set attributes and child elements on an MJCF element in place.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
root
|
Element
|
The MJCF element to update. |
required |
params_dict
|
dict[str, Any]
|
Dict mapping attribute or child element names to values. Nested dicts are interpreted as child element attribute maps. |
required |