Software for creating and experimenting with robot workspaces in MuJoCo.
Install from package from PyPI with:
pip install mujoco_robot_environments
Clone this GitHub repository and ensure you have python version 3.10.6 using pyenv. Following this install the python virtual environment for this project with poetry through running:
poetry install
Activate the virtual environment with the following command:
poetry shell
from mujoco_robot_environments.tasks.rearrangement import RearrangementEnv
env = RearrangementEnv(viewer=True)
env.reset()
...
Most environments ship with a default set of logic for scene initialization and other settings you may wish to override/customise.
In order to override the default config you need use the hydra override and follow the hierarchical structure of the configuration files seen shipped with the repository. As an example to change the sampling settings for the RearrangementEnv
one can follow the below syntax:
# clear hydra global state to avoid conflicts with other hydra instances
hydra.core.global_hydra.GlobalHydra.instance().clear()
# read hydra config
initialize(version_base=None, config_path=<relative path to config yaml files>, job_name="rearrangement")
# add task configs
COLOR_SEPARATING_CONFIG = compose(
config_name="rearrangement",
overrides=[
"arena/props=colour_splitter",
]
)
# instantiate color separation task
env = RearrangementEnv(viewer=True, cfg=COLOR_SEPARATING_CONFIG)
# expert demonstration
_, _, _, obs = env.reset()
Where in the above example <relative path to config yaml files>
points towards a directory of yaml files of the same structure as those shipped with this repository but containing your custom configuration files.
An toy environment for reasoning about visual semantics through rearranging objects of varying shapes/colours into target locations.