Metadata-Version: 2.1
Name: mujoco_robot_environments
Version: 0.1.0
Summary: Simulation environments for basic manipulation tasks.
License: Apache-2.0
Author: Peter David Fagan
Author-email: peterdavidfagan@gmail.com
Requires-Python: ==3.10.6
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Requires-Dist: brax (>=0.10.4,<0.11.0)
Requires-Dist: dm-control (==1.0.16)
Requires-Dist: dm-reverb (==0.13.0) ; sys_platform == "linux"
Requires-Dist: envlogger[tfds] (>=1.2,<2.0) ; sys_platform == "linux"
Requires-Dist: evojax (>=0.2.16,<0.3.0)
Requires-Dist: evosax (>=0.1.6,<0.2.0)
Requires-Dist: huggingface-hub (>=0.23.0,<0.24.0)
Requires-Dist: hydra-core (>=1.3.2,<2.0.0)
Requires-Dist: inflect (>=7.0.0,<8.0.0)
Requires-Dist: ipywidgets (>=8.1.1,<9.0.0)
Requires-Dist: jupyterlab (>=4.0.9,<5.0.0)
Requires-Dist: lark (>=1.1.7,<2.0.0)
Requires-Dist: matplotlib (>=3.7.2,<4.0.0)
Requires-Dist: mujoco (>=3.1.1,<4.0.0)
Requires-Dist: mujoco_controllers (>=0.0.2,<0.0.3)
Requires-Dist: notebook (>=7.0.6,<8.0.0)
Requires-Dist: numpy (>=1.16.0,<2.0.0)
Requires-Dist: pillow (==10.0.0)
Requires-Dist: pytest (>=7.0.0,<8.0.0)
Requires-Dist: rlds (>=0.1.7,<0.2.0) ; sys_platform == "linux"
Requires-Dist: robot-descriptions (>=1.10.0,<2.0.0)
Requires-Dist: tensorflow-cpu (>=2.14.0,<3.0.0) ; sys_platform == "linux"
Requires-Dist: wandb (>=0.16.1,<0.17.0)
Description-Content-Type: text/markdown

# MuJoCo Robotics Environments 🤖

Software for creating and experimenting with robot workspaces in MuJoCo.

## Installation 

### PyPI
Install from package from PyPI with: 
```bash
pip install mujoco_robot_environments
```

### Local Development 

Clone this GitHub repository and ensure you have python version 3.10.6 using [pyenv](https://github.com/pyenv/pyenv). Following this install the python virtual environment for this project with [poetry](https://python-poetry.org/) through running:

```bash
poetry install 
```

Activate the virtual environment with the following command:

```bash
poetry shell
```

## Example Usage

### Instantiating shipped environments

```python
from mujoco_robot_environments.tasks.rearrangement import RearrangementEnv

env = RearrangementEnv(viewer=True)
env.reset()
...
```

### Overriding Environment Configurations

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](https://hydra.cc/docs/advanced/override_grammar/basic/) and follow the hierarchical structure of the [configuration files](https://github.com/peterdavidfagan/mujoco_robot_environments/tree/main/mujoco_robot_environments/config) seen shipped with the repository. As an example to change the sampling settings for the `RearrangementEnv` one can follow the below syntax:

```python
 # 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.

## Task Environments

### Colour Sorting Task Environment

An toy environment for reasoning about visual semantics through rearranging objects of varying shapes/colours into target locations.

[Screencast from 05-10-2024 11:45:47 AM.webm](https://github.com/peterdavidfagan/mujoco_robot_environments/assets/42982057/7ac279da-0268-4ef2-8d4a-85eed6a7f364)







