Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
44a8653b77 | ||
|
|
06409a4c05 | ||
|
|
e6d00854b2 | ||
|
|
76c3266193 | ||
|
|
e624876f24 | ||
|
|
4eadfd1566 | ||
|
|
f7ccfc808a | ||
|
|
0a883f36b9 | ||
|
|
d8940ac4ae | ||
|
|
b387d4c448 | ||
|
|
6cb32e6203 | ||
|
|
3ccd839d16 | ||
|
|
8672856e00 | ||
|
|
3be34048b2 | ||
|
|
46e9a515e0 | ||
|
|
a9617a392e | ||
|
|
4be05440a1 | ||
|
|
59c980e495 | ||
|
|
6d583a36f4 | ||
|
|
d3941f6167 | ||
|
|
ac4b537f87 | ||
|
|
a87353ecbe | ||
|
|
ba47981efc | ||
|
|
ff6f41990f | ||
|
|
0def834d1b | ||
|
|
4b862185e6 | ||
|
|
91b10cc90a | ||
|
|
5d222ab1ef | ||
|
|
acf7f6421f | ||
|
|
2e60f2487a | ||
|
|
4708dba0d3 | ||
|
|
ef7a3b5052 | ||
|
|
41f178d6ab | ||
|
|
9a5c6125e5 | ||
|
|
4b631b7177 | ||
|
|
f9a23a0e3b | ||
|
|
15f4257690 | ||
|
|
2a8845bacf | ||
|
|
4aca2d05e5 | ||
|
|
6219b8460e | ||
|
|
6081fd73eb | ||
|
|
1aa870f198 | ||
|
|
892774665d | ||
|
|
aa1e44781a | ||
|
|
fcc36ccb17 | ||
|
|
a7685aaab5 | ||
|
|
ec6c0c89b4 | ||
|
|
934952a4fa | ||
|
|
4e48da6422 | ||
|
|
1e55bf13cb | ||
|
|
9a42779027 | ||
|
|
222683e685 | ||
|
|
f3a3c88978 | ||
|
|
992ee014a3 | ||
|
|
3cac0a9258 | ||
|
|
b05dcb84c4 | ||
|
|
e488854cc1 | ||
|
|
dccb4ee1b9 | ||
|
|
a579e5e1d4 | ||
|
|
a0a4952539 | ||
|
|
aa652e3610 | ||
|
|
fa54dbb149 | ||
|
|
3d44454d62 | ||
|
|
1a2b932802 | ||
|
|
04925035f9 | ||
|
|
18c17ff130 | ||
|
|
d26233f908 | ||
|
|
73d00ddab3 | ||
|
|
84881d5dbf | ||
|
|
2e76013b46 | ||
|
|
ddd0eaf88a | ||
|
|
5201937ac8 | ||
|
|
86abbe0d97 | ||
|
|
57c3d36490 | ||
|
|
4cdff05720 | ||
|
|
0b574274df | ||
|
|
6e84703a15 | ||
|
|
268b74e5bd | ||
|
|
81dbdc5745 | ||
|
|
43cfcf5795 | ||
|
|
fde5e33be6 | ||
|
|
aeecf65f02 | ||
|
|
6afb5880db | ||
|
|
0b4e729a49 | ||
|
|
deaca46d87 |
@@ -0,0 +1,26 @@
|
||||
name: Ensure Tagged Commits on Release
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- release
|
||||
|
||||
jobs:
|
||||
check_tag:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Check if base commit of PR is tagged
|
||||
run: |
|
||||
BASE_COMMIT=$(jq -r .pull_request.base.sha < "$GITHUB_EVENT_PATH")
|
||||
TAG=$(git tag --contains $BASE_COMMIT)
|
||||
if [ -z "$TAG" ]; then
|
||||
echo "Base commit of PR is not tagged. PRs onto release must be tagged with the version number."
|
||||
exit 1
|
||||
fi
|
||||
echo "Base commit of PR is tagged. Check passed."
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
name: Compile and Deploy docs to Pages
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["release"]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
concurrency:
|
||||
group: "pages"
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.x'
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -e .[docs]
|
||||
|
||||
- name: Build HTML docs
|
||||
run: |
|
||||
cd docs
|
||||
make html
|
||||
|
||||
- name: Setup Pages
|
||||
uses: actions/configure-pages@v4
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
path: 'docs/build/html'
|
||||
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v4
|
||||
|
||||
@@ -2,29 +2,27 @@ name: Publish Python package to PyPI
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
branches:
|
||||
- release
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
name: Publish to PyPI
|
||||
runs-on: ubuntu-latest
|
||||
if: false && startsWith(github.ref, 'refs/tags/') # Only run on tagged commits
|
||||
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0 # This fetches all history for all branches and tags
|
||||
|
||||
- name: Verify tag is on master branch
|
||||
- name: Check if commit is tagged
|
||||
run: |
|
||||
TAG_IS_ON_MASTER=$(git branch -r --contains ${{ github.ref }} | grep 'origin/master')
|
||||
if [ -z "$TAG_IS_ON_MASTER" ]; then
|
||||
echo "Tag is not on the master branch. Cancelling the workflow."
|
||||
TAG=$(git tag --contains HEAD)
|
||||
if [ -z "$TAG" ]; then
|
||||
echo "Commit is not tagged. Failing the workflow."
|
||||
exit 1
|
||||
fi
|
||||
echo "Tag is on the master branch. Proceeding with the workflow."
|
||||
echo "Commit is tagged. Proceeding with the workflow."
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
name: Publish Python package to TestPyPI
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
name: Publish to TestPyPI
|
||||
runs-on: ubuntu-latest
|
||||
if: startsWith(github.ref, 'refs/tags/') # Only run on tagged commits
|
||||
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0 # This fetches all history for all branches and tags
|
||||
|
||||
- name: Verify tag is on master branch
|
||||
run: |
|
||||
TAG_IS_ON_MASTER=$(git branch -r --contains ${{ github.ref }} | grep 'origin/master')
|
||||
if [ -z "$TAG_IS_ON_MASTER" ]; then
|
||||
echo "Tag is not on the master branch. Cancelling the workflow."
|
||||
exit 1
|
||||
fi
|
||||
echo "Tag is on the master branch. Proceeding with the workflow."
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: "3.x"
|
||||
|
||||
- name: Install pypa/build/setuptools/twine
|
||||
run: >-
|
||||
python3 -m
|
||||
pip install
|
||||
build setuptools twine
|
||||
--user
|
||||
|
||||
- name: Prevent fallback onto setup.py
|
||||
run: rm setup.py
|
||||
|
||||
- name: Build a binary wheel and a source tarball
|
||||
run: python3 -m build
|
||||
|
||||
- name: Publish to TestPyPI
|
||||
env:
|
||||
TWINE_USERNAME: __token__
|
||||
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_TOKEN }}
|
||||
run: twine upload --repository-url https://test.pypi.org/legacy/ dist/*
|
||||
|
||||
@@ -6,323 +6,67 @@
|
||||
<br><br>
|
||||
</h1>
|
||||
|
||||
| ❗ Fancy Gym has recently received a major refactor, which also updated many of the used dependencies to current versions. The update has brought some breaking changes. If you want to access the old version, check out the [legacy branch](https://github.com/ALRhub/fancy_gym/tree/legacy). Find out more about what changed [here](https://github.com/ALRhub/fancy_gym/pull/75). |
|
||||
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
|
||||
Built upon the foundation of [Gymnasium](https://gymnasium.farama.org/) (a maintained fork of OpenAI’s renowned Gym library) `fancy_gym` offers a comprehensive collection of reinforcement learning environments.
|
||||
Built upon the foundation of [Gymnasium](https://gymnasium.farama.org) (a maintained fork of OpenAI’s renowned Gym library) `fancy_gym` offers a comprehensive collection of reinforcement learning environments.
|
||||
|
||||
**Key Features**:
|
||||
|
||||
- **New Challenging Environments**: `fancy_gym` includes several new environments (Panda Box Pushing, Table Tennis, etc.) that present a higher degree of difficulty, pushing the boundaries of reinforcement learning research.
|
||||
- **New Challenging Environments**: `fancy_gym` includes several new environments ([Panda Box Pushing](https://dominik-roth.eu/fancy/envs/fancy/mujoco.html#box-pushing), [Table Tennis](https://dominik-roth.eu/fancy/envs/fancy/mujoco.html#table-tennis), [etc.](https://dominik-roth.eu/fancy/envs/fancy/index.html)) that present a higher degree of difficulty, pushing the boundaries of reinforcement learning research.
|
||||
- **Support for Movement Primitives**: `fancy_gym` supports a range of movement primitives (MPs), including Dynamic Movement Primitives (DMPs), Probabilistic Movement Primitives (ProMP), and Probabilistic Dynamic Movement Primitives (ProDMP).
|
||||
- **Upgrade to Movement Primitives**: With our framework, it's straightforward to transform standard Gymnasium environments into environments that support movement primitives.
|
||||
- **Benchmark Suite Compatibility**: `fancy_gym` makes it easy to access renowned benchmark suites such as [DeepMind Control](https://deepmind.com/research/publications/2020/dm-control-Software-and-Tasks-for-Continuous-Control) and [Metaworld](https://meta-world.github.io/), whether you want to use them in the regular step-based setting or using MPs.
|
||||
- **Contribute Your Own Environments**: If you're inspired to create custom gym environments, both step-based and with movement primitives, this [guide](https://gymnasium.farama.org/tutorials/gymnasium_basics/environment_creation/) will assist you. We encourage and highly appreciate submissions via PRs to integrate these environments into `fancy_gym`.
|
||||
- **Upgrade to Movement Primitives**: With our framework, it’s straightforward to transform standard Gymnasium environments into environments that support movement primitives.
|
||||
- **Benchmark Suite Compatibility**: `fancy_gym` makes it easy to access renowned benchmark suites such as [DeepMind Control](dominik-roth.eu/fancy/envs/dmc.html)
|
||||
and [Metaworld](https://dominik-roth.eu/fancy/envs/meta.html), whether you want to use them in the regular step-based setting or using MPs.
|
||||
- **Contribute Your Own Environments**: If you’re inspired to create custom gym environments, both step-based and with movement primitives, this [guide](https://dominik-roth.eu/fancy/guide/upgrading_envs.html) will assist you. We encourage and highly appreciate submissions via PRs to integrate these environments into `fancy_gym`.
|
||||
|
||||
## Movement Primitive Environments (Episode-Based/Black-Box Environments)
|
||||
## Quickstart Guide
|
||||
|
||||
<p align="justify">
|
||||
Movement primitive (MP) environments differ from traditional step-based environments. They align more with concepts from stochastic search, black-box optimization, and methods commonly found in classical robotics and control. Instead of individual steps, MP environments operate on an episode basis, executing complete trajectories. These trajectories are produced by trajectory generators like Dynamic Movement Primitives (DMP), Probabilistic Movement Primitives (ProMP) or Probabilistic Dynamic Movement Primitives (ProDMP).
|
||||
</p>
|
||||
<p align="justify">
|
||||
Once generated, these trajectories are converted into step-by-step actions using a trajectory tracking controller. The specific controller chosen depends on the environment's requirements. Currently, we support position, velocity, and PD-Controllers tailored for position, velocity, and torque control. Additionally, we have a specialized controller designed for the MetaWorld control suite.
|
||||
</p>
|
||||
<p align="justify">
|
||||
While the overarching objective of MP environments remains the learning of an optimal policy, the actions here represent the parametrization of motion primitives to craft the right trajectory. Our framework further enhances this by accommodating a contextual setting. At the episode's onset, we present the context space—a subset of the observation space. This demands the prediction of a new action or MP parametrization for every unique context.
|
||||
</p>
|
||||
| ⚠ We recommend installing `fancy_gym` into a virtual environment as provided by [venv](https://docs.python.org/3/library/venv.html), [Poetry](https://python-poetry.org/) or [Conda](https://docs.conda.io/en/latest/). |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
|
||||
## Installation
|
||||
|
||||
We recommend installing `fancy_gym` into a virtual environment as provided by [venv](https://docs.python.org/3/library/venv.html). 3rd party alternatives to venv like [Poetry](https://python-poetry.org/) or [Conda](https://docs.conda.io/en/latest/) can also be used.
|
||||
|
||||
### Installation from PyPI (recommended)
|
||||
|
||||
Install `fancy_gym` via
|
||||
```bash
|
||||
pip install fancy_gym
|
||||
```
|
||||
|
||||
We have a few optional dependencies. If you also want to install those use
|
||||
Install via pip [or use an alternative installation method](https://dominik-roth.eu/fancy/guide/installation.html)
|
||||
|
||||
```bash
|
||||
# to install all optional dependencies
|
||||
pip install 'fancy_gym[all]'
|
||||
|
||||
# or choose only those you want
|
||||
pip install 'fancy_gym[dmc,box2d,mujoco-legacy,jax,testing]'
|
||||
pip install 'fancy_gym[all]'
|
||||
```
|
||||
|
||||
Pip can not automatically install up-to-date versions of metaworld, since they are not avaible on PyPI yet.
|
||||
Install metaworld via
|
||||
|
||||
```bash
|
||||
pip install metaworld@git+https://github.com/Farama-Foundation/Metaworld.git@d155d0051630bb365ea6a824e02c66c068947439#egg=metaworld
|
||||
```
|
||||
|
||||
### Installation from master
|
||||
|
||||
1. Clone the repository
|
||||
```bash
|
||||
git clone git@github.com:ALRhub/fancy_gym.git
|
||||
```
|
||||
|
||||
2. Go to the folder
|
||||
```bash
|
||||
cd fancy_gym
|
||||
```
|
||||
|
||||
3. Install with
|
||||
```bash
|
||||
pip install -e .
|
||||
```
|
||||
|
||||
We have a few optional dependencies. If you also want to install those use
|
||||
```bash
|
||||
# to install all optional dependencies
|
||||
pip install -e '.[all]'
|
||||
|
||||
# or choose only those you want
|
||||
pip install -e '.[dmc,box2d,mujoco-legacy,jax,testing]'
|
||||
```
|
||||
|
||||
Metaworld has to be installed manually with
|
||||
```bash
|
||||
pip install metaworld@git+https://github.com/Farama-Foundation/Metaworld.git@d155d0051630bb365ea6a824e02c66c068947439#egg=metaworld
|
||||
```
|
||||
|
||||
## How to use Fancy Gym
|
||||
|
||||
We will only show the basics here and prepared [multiple examples](https://github.com/ALRhub/fancy_gym/tree/master/fancy_gym/examples/) for a more detailed look.
|
||||
|
||||
### Step-Based Environments
|
||||
|
||||
Regular step based environments added by Fancy Gym are added into the `fancy/` namespace.
|
||||
|
||||
| ❗ Legacy versions of Fancy Gym used `fancy_gym.make(...)`. This is no longer supported and will raise an Exception on new versions. |
|
||||
| ----------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
Try out one of our step-based environments [or explore our other envs](https://dominik-roth.eu/fancy/envs/fancy/index.html)
|
||||
|
||||
```python
|
||||
import gymnasium as gym
|
||||
import fancy_gym
|
||||
import gymnasium as gym
|
||||
import fancy_gym
|
||||
import time
|
||||
|
||||
env = gym.make('fancy/Reacher5d-v0')
|
||||
# or env = gym.make('metaworld/reach-v2') # fancy_gym allows access to all metaworld ML1 tasks via the metaworld/ NS
|
||||
# or env = gym.make('dm_control/ball_in_cup-catch-v0')
|
||||
# or env = gym.make('Reacher-v2')
|
||||
observation = env.reset(seed=1)
|
||||
env = gym.make('fancy/BoxPushingDense-v0', render_mode='human')
|
||||
observation = env.reset()
|
||||
env.render()
|
||||
|
||||
for i in range(1000):
|
||||
action = env.action_space.sample()
|
||||
observation, reward, terminated, truncated, info = env.step(action)
|
||||
if i % 5 == 0:
|
||||
env.render()
|
||||
for i in range(1000):
|
||||
action = env.action_space.sample() # Randomly sample an action
|
||||
observation, reward, terminated, truncated, info = env.step(action)
|
||||
time.sleep(1/env.metadata['render_fps'])
|
||||
|
||||
if terminated or truncated:
|
||||
observation, info = env.reset()
|
||||
if terminated or truncated:
|
||||
observation, info = env.reset()
|
||||
```
|
||||
|
||||
### Black-box Environments
|
||||
|
||||
All environments provide by default the cumulative episode reward, this can however be changed if necessary. Optionally, each environment returns all collected information from each step as part of the infos. This information is, however, mainly meant for debugging as well as logging and not for training.
|
||||
|
||||
| Key | Description | Type |
|
||||
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- |
|
||||
| `positions` | Generated trajectory from MP | Optional |
|
||||
| `velocities` | Generated trajectory from MP | Optional |
|
||||
| `step_actions` | Step-wise executed action based on controller output | Optional |
|
||||
| `step_observations` | Step-wise intermediate observations | Optional |
|
||||
| `step_rewards` | Step-wise rewards | Optional |
|
||||
| `trajectory_length` | Total number of environment interactions | Always |
|
||||
| `other` | All other information from the underlying environment are returned as a list with length `trajectory_length` maintaining the original key. In case some information are not provided every time step, the missing values are filled with `None`. | Always |
|
||||
|
||||
Existing MP tasks can be created the same way as above. The namespace of a MP-variant of an environment is given by `<original namespace>_<MP name>/`.
|
||||
Just keep in mind, calling `step()` executes a full trajectory.
|
||||
|
||||
> **Note:**
|
||||
> Currently, we are also in the process of enabling replanning as well as learning of sub-trajectories.
|
||||
> This allows to split the episode into multiple trajectories and is a hybrid setting between step-based and
|
||||
> black-box leaning.
|
||||
> While this is already implemented, it is still in beta and requires further testing.
|
||||
> Feel free to try it and open an issue with any problems that occur.
|
||||
Explore the MP-based variant [or learn more about Movement Primitives (MPs)](https://dominik-roth.eu/fancy/guide/episodic_rl.html)
|
||||
|
||||
```python
|
||||
import gymnasium as gym
|
||||
import fancy_gym
|
||||
import gymnasium as gym
|
||||
import fancy_gym
|
||||
|
||||
env = gym.make('fancy_ProMP/Reacher5d-v0')
|
||||
# or env = gym.make('metaworld_ProDMP/reach-v2')
|
||||
# or env = gym.make('dm_control_DMP/ball_in_cup-catch-v0')
|
||||
# or env = gym.make('gym_ProMP/Reacher-v2') # mp versions of envs added directly by gymnasium are in the gym_<MP-type> NS
|
||||
env = gym.make('fancy_ProMP/BoxPushingDense-v0', render_mode='human')
|
||||
env.reset()
|
||||
env.render()
|
||||
|
||||
# render() can be called once in the beginning with all necessary arguments.
|
||||
# To turn it of again just call render() without any arguments.
|
||||
env.render(mode='human')
|
||||
|
||||
# This returns the context information, not the full state observation
|
||||
observation, info = env.reset(seed=1)
|
||||
|
||||
for i in range(5):
|
||||
action = env.action_space.sample()
|
||||
observation, reward, terminated, truncated, info = env.step(action)
|
||||
|
||||
# terminated or truncated is always True as we are working on the episode level, hence we always reset()
|
||||
observation, info = env.reset()
|
||||
for i in range(10):
|
||||
action = env.action_space.sample() # Randomly sample MP parameters
|
||||
observation, reward, terminated, truncated, info = env.step(action) # Will execute full trajectory, based on MP
|
||||
observation = env.reset()
|
||||
```
|
||||
|
||||
To show all available environments, we provide some additional convenience variables. All of them return a dictionary
|
||||
with the keys `DMP`, `ProMP`, `ProDMP` and `all` that store a list of available environment ids.
|
||||
## Documentation
|
||||
|
||||
```python
|
||||
import fancy_gym
|
||||
|
||||
print("All Black-box tasks:")
|
||||
print(fancy_gym.ALL_MOVEMENT_PRIMITIVE_ENVIRONMENTS)
|
||||
|
||||
print("Fancy Black-box tasks:")
|
||||
print(fancy_gym.ALL_FANCY_MOVEMENT_PRIMITIVE_ENVIRONMENTS)
|
||||
|
||||
print("OpenAI Gym Black-box tasks:")
|
||||
print(fancy_gym.ALL_GYM_MOVEMENT_PRIMITIVE_ENVIRONMENTS)
|
||||
|
||||
print("Deepmind Control Black-box tasks:")
|
||||
print(fancy_gym.ALL_DMC_MOVEMENT_PRIMITIVE_ENVIRONMENTS)
|
||||
|
||||
print("MetaWorld Black-box tasks:")
|
||||
print(fancy_gym.ALL_METAWORLD_MOVEMENT_PRIMITIVE_ENVIRONMENTS)
|
||||
|
||||
print("If you add custom envs, their mp versions will be found in:")
|
||||
print(fancy_gym.MOVEMENT_PRIMITIVE_ENVIRONMENTS_FOR_NS['<my_custom_namespace>'])
|
||||
```
|
||||
|
||||
### How to create a new MP task
|
||||
|
||||
In case a required task is not supported yet in the MP framework, it can be created relatively easy. For the task at
|
||||
hand, the following [interface](https://github.com/ALRhub/fancy_gym/tree/master/fancy_gym/black_box/raw_interface_wrapper.py) needs to be implemented.
|
||||
|
||||
```python
|
||||
from abc import abstractmethod
|
||||
from typing import Union, Tuple
|
||||
|
||||
import gymnasium as gym
|
||||
import numpy as np
|
||||
|
||||
|
||||
class RawInterfaceWrapper(gym.Wrapper):
|
||||
mp_config = {
|
||||
'ProMP': {},
|
||||
'DMP': {},
|
||||
'ProDMP': {},
|
||||
}
|
||||
|
||||
@property
|
||||
def context_mask(self) -> np.ndarray:
|
||||
"""
|
||||
Returns boolean mask of the same shape as the observation space.
|
||||
It determines whether the observation is returned for the contextual case or not.
|
||||
This effectively allows to filter unwanted or unnecessary observations from the full step-based case.
|
||||
E.g. Velocities starting at 0 are only changing after the first action. Given we only receive the
|
||||
context/part of the first observation, the velocities are not necessary in the observation for the task.
|
||||
Returns:
|
||||
bool array representing the indices of the observations
|
||||
"""
|
||||
return np.ones(self.env.observation_space.shape[0], dtype=bool)
|
||||
|
||||
@property
|
||||
@abstractmethod
|
||||
def current_pos(self) -> Union[float, int, np.ndarray, Tuple]:
|
||||
"""
|
||||
Returns the current position of the action/control dimension.
|
||||
The dimensionality has to match the action/control dimension.
|
||||
This is not required when exclusively using velocity control,
|
||||
it should, however, be implemented regardless.
|
||||
E.g. The joint positions that are directly or indirectly controlled by the action.
|
||||
"""
|
||||
raise NotImplementedError()
|
||||
|
||||
@property
|
||||
@abstractmethod
|
||||
def current_vel(self) -> Union[float, int, np.ndarray, Tuple]:
|
||||
"""
|
||||
Returns the current velocity of the action/control dimension.
|
||||
The dimensionality has to match the action/control dimension.
|
||||
This is not required when exclusively using position control,
|
||||
it should, however, be implemented regardless.
|
||||
E.g. The joint velocities that are directly or indirectly controlled by the action.
|
||||
"""
|
||||
raise NotImplementedError()
|
||||
|
||||
```
|
||||
|
||||
Default configurations for MPs can be overitten by defining attributes in mp_config.
|
||||
Available parameters are documented in the [MP_PyTorch Userguide](https://github.com/ALRhub/MP_PyTorch/blob/main/doc/README.md).
|
||||
|
||||
```python
|
||||
class RawInterfaceWrapper(gym.Wrapper):
|
||||
mp_config = {
|
||||
'ProMP': {
|
||||
'phase_generator_kwargs': {
|
||||
'phase_generator_type': 'linear'
|
||||
# When selecting another generator type, the default configuration will not be merged for the attribute.
|
||||
},
|
||||
'controller_kwargs': {
|
||||
'p_gains': 0.5 * np.array([1.0, 4.0, 2.0, 4.0, 1.0, 4.0, 1.0]),
|
||||
'd_gains': 0.5 * np.array([0.1, 0.4, 0.2, 0.4, 0.1, 0.4, 0.1]),
|
||||
},
|
||||
'basis_generator_kwargs': {
|
||||
'num_basis': 3,
|
||||
'num_basis_zero_start': 1,
|
||||
'num_basis_zero_goal': 1,
|
||||
},
|
||||
},
|
||||
'DMP': {},
|
||||
'ProDMP': {}.
|
||||
}
|
||||
|
||||
[...]
|
||||
```
|
||||
|
||||
If you created a new task wrapper, feel free to open a PR, so we can integrate it for others to use as well. Without the
|
||||
integration the task can still be used. A rough outline can be shown here, for more details we recommend having a look
|
||||
at the [examples](https://github.com/ALRhub/fancy_gym/tree/master/fancy_gym/examples/).
|
||||
|
||||
If the step-based is already registered with gym, you can simply do the following:
|
||||
|
||||
```python
|
||||
fancy_gym.upgrade(
|
||||
id='custom/cool_new_env-v0',
|
||||
mp_wrapper=my_custom_MPWrapper
|
||||
)
|
||||
```
|
||||
|
||||
If the step-based is not yet registered with gym we can add both the step-based and MP-versions via
|
||||
|
||||
```python
|
||||
fancy_gym.register(
|
||||
id='custom/cool_new_env-v0',
|
||||
entry_point=my_custom_env,
|
||||
mp_wrapper=my_custom_MPWrapper
|
||||
)
|
||||
```
|
||||
|
||||
From this point on, you can access MP-version of your environments via
|
||||
|
||||
```python
|
||||
env = gym.make('custom_ProDMP/cool_new_env-v0')
|
||||
|
||||
rewards = 0
|
||||
observation, info = env.reset()
|
||||
|
||||
# number of samples/full trajectories (multiple environment steps)
|
||||
for i in range(5):
|
||||
ac = env.action_space.sample()
|
||||
observation, reward, terminated, truncated, info = env.step(ac)
|
||||
rewards += reward
|
||||
|
||||
if terminated or truncated:
|
||||
print(rewards)
|
||||
rewards = 0
|
||||
observation, info = env.reset()
|
||||
```
|
||||
Documentation for `fancy_gym` can be found [here](https://dominik-roth.eu/fancy); Usage Examples can be found [here](https://dominik-roth.eu/fancy/examples/general.html).
|
||||
|
||||
## Citing the Project
|
||||
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
# Minimal makefile for Sphinx documentation
|
||||
#
|
||||
|
||||
# You can set these variables from the command line, and also
|
||||
# from the environment for the first two.
|
||||
SPHINXOPTS ?=
|
||||
SPHINXBUILD ?= sphinx-build
|
||||
SOURCEDIR = source
|
||||
BUILDDIR = build
|
||||
|
||||
# Put it first so that "make" without argument is like "make help".
|
||||
help:
|
||||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||
|
||||
.PHONY: help Makefile
|
||||
|
||||
# Catch-all target: route all unknown targets to Sphinx using the new
|
||||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
||||
%: Makefile
|
||||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||
@@ -0,0 +1,35 @@
|
||||
@ECHO OFF
|
||||
|
||||
pushd %~dp0
|
||||
|
||||
REM Command file for Sphinx documentation
|
||||
|
||||
if "%SPHINXBUILD%" == "" (
|
||||
set SPHINXBUILD=sphinx-build
|
||||
)
|
||||
set SOURCEDIR=.
|
||||
set BUILDDIR=_build
|
||||
|
||||
%SPHINXBUILD% >NUL 2>NUL
|
||||
if errorlevel 9009 (
|
||||
echo.
|
||||
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
|
||||
echo.installed, then set the SPHINXBUILD environment variable to point
|
||||
echo.to the full path of the 'sphinx-build' executable. Alternatively you
|
||||
echo.may add the Sphinx directory to PATH.
|
||||
echo.
|
||||
echo.If you don't have Sphinx installed, grab it from
|
||||
echo.https://www.sphinx-doc.org/
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
if "%1" == "" goto help
|
||||
|
||||
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
|
||||
goto end
|
||||
|
||||
:help
|
||||
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
|
||||
|
||||
:end
|
||||
popd
|
||||
@@ -0,0 +1,3 @@
|
||||
sphinx==7.1.2
|
||||
sphinx-rtd-theme==1.3.0rc1
|
||||
myst-parser
|
||||
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 18 MiB |
|
After Width: | Height: | Size: 2.2 MiB |
|
After Width: | Height: | Size: 695 KiB |
|
After Width: | Height: | Size: 4.4 MiB |
|
After Width: | Height: | Size: 629 KiB |
|
After Width: | Height: | Size: 118 KiB |
|
After Width: | Height: | Size: 114 KiB |
|
After Width: | Height: | Size: 12 KiB |
@@ -0,0 +1,568 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 16.0.3, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" id="Ebene_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
width="269px" height="70px" viewBox="0 0 269 70" enable-background="new 0 0 269 70" xml:space="preserve">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" fill="#A11E3B" d="M139.13,2.989c0.438-0.005,1.4-0.078,2.172,0.708
|
||||
c0.773,0.787,0.816,1.763,0.816,2.243c0,1.339-1.1,2.343-2.513,2.343c-0.584,0-1.228-0.1-1.44-0.228
|
||||
c-0.07-0.043-0.099-0.1-0.099-0.17V3.244c0-0.085,0.042-0.142,0.112-0.17C138.322,3.031,138.704,2.994,139.13,2.989 M140.775,8.418
|
||||
c1.48-0.406,2.479-1.644,2.479-3.321c0-0.773-0.408-1.429-0.728-1.734c-0.232-0.218-0.889-0.83-2.709-0.83
|
||||
c-0.67,0-1.905,0.045-2.291,0.045c-0.167,0-0.966-0.043-1.604-0.043c-0.155,0-0.227,0.029-0.227,0.114
|
||||
c0,0.057,0.057,0.085,0.114,0.085c0.128,0,0.369,0.015,0.481,0.043c0.47,0.1,0.583,0.326,0.611,0.809
|
||||
c0.027,0.454,0.027,0.852,0.027,3.065v2.499c0,1.362,0,2.483-0.069,3.08c-0.059,0.411-0.129,0.724-0.412,0.78
|
||||
c-0.129,0.028-0.299,0.057-0.426,0.057c-0.085,0-0.113,0.042-0.113,0.085c0,0.086,0.07,0.113,0.227,0.113
|
||||
c0.425,0,1.319-0.042,1.334-0.042c0.07,0,0.964,0.042,1.745,0.042c0.156,0,0.229-0.042,0.229-0.113c0-0.043-0.029-0.085-0.114-0.085
|
||||
c-0.129,0-0.44-0.028-0.639-0.057c-0.426-0.057-0.512-0.369-0.555-0.78c-0.069-0.597-0.069-1.718-0.069-3.08V8.808
|
||||
c0-0.07,0.028-0.113,0.099-0.113l1.378,0.022c0.085,0,0.16,0.033,0.188,0.091c0.214,0.473,0.513,1.27,0.941,2.148
|
||||
c0.587,1.202,0.688,1.733,1.298,2.061c0.369,0.199,0.756,0.248,1.551,0.248h0.684c0.256,0,0.342-0.027,0.342-0.113
|
||||
c0-0.043-0.058-0.087-0.129-0.085c-0.14,0.003-0.375-0.036-0.645-0.084c-0.23-0.04-0.902-0.203-1.316-0.98
|
||||
C141.938,11.03,141.341,9.615,140.775,8.418 M147.781,6.65c0-2.214,0-2.611,0.027-3.065c0.028-0.497,0.142-0.737,0.554-0.809
|
||||
c0.171-0.028,0.369-0.043,0.468-0.043c0.057,0,0.112-0.028,0.112-0.085c0-0.085-0.069-0.114-0.226-0.114
|
||||
c-0.427,0-1.462,0.044-1.532,0.044c-0.072,0-0.966-0.044-1.604-0.044c-0.157,0-0.228,0.029-0.228,0.114
|
||||
c0,0.057,0.057,0.085,0.113,0.085c0.129,0,0.369,0.015,0.483,0.043c0.468,0.1,0.582,0.326,0.609,0.809
|
||||
c0.029,0.454,0.029,0.852,0.029,3.065v2.499c0,1.362,0,2.483-0.071,3.08c-0.057,0.411-0.128,0.724-0.411,0.78
|
||||
c-0.128,0.028-0.298,0.057-0.426,0.057c-0.085,0-0.114,0.042-0.114,0.085c0,0.086,0.072,0.113,0.228,0.113
|
||||
c0.213,0,0.525-0.014,0.809-0.027c0.284,0,0.526-0.015,0.583-0.015c0.41,0,0.852,0.015,1.448,0.042
|
||||
c0.595,0.015,1.333,0.043,2.354,0.043c0.752,0,0.795-0.057,0.894-0.384c0.114-0.412,0.214-1.263,0.214-1.418
|
||||
c0-0.157-0.014-0.214-0.084-0.214c-0.086,0-0.114,0.071-0.13,0.185c-0.043,0.27-0.185,0.625-0.369,0.852
|
||||
c-0.34,0.412-0.965,0.426-1.718,0.426c-1.105,0-1.475-0.1-1.702-0.326c-0.255-0.256-0.311-1.164-0.311-3.251V6.65z M155.006,13.464
|
||||
c0.767,0,1.532-0.171,2.143-0.596c0.979-0.696,1.206-1.774,1.206-2.356c0-1.136-0.396-2.016-2.072-3.335l-0.396-0.313
|
||||
c-1.362-1.065-1.731-1.576-1.731-2.386c0-1.036,0.766-1.646,1.745-1.646c1.307,0,1.689,0.597,1.774,0.752
|
||||
c0.085,0.156,0.169,0.539,0.186,0.71c0.013,0.113,0.028,0.184,0.114,0.184c0.069,0,0.099-0.098,0.099-0.325
|
||||
c0-0.966,0.056-1.435,0.056-1.505s-0.028-0.1-0.142-0.1c-0.114,0-0.228-0.015-0.497-0.07c-0.354-0.085-0.767-0.143-1.32-0.143
|
||||
c-1.803,0-2.938,1.036-2.938,2.555c0,0.966,0.342,1.846,1.848,3.08l0.639,0.525c1.218,1.008,1.631,1.576,1.631,2.555
|
||||
c0,0.909-0.667,1.888-2.031,1.888c-0.95,0-1.887-0.397-2.099-1.448c-0.044-0.198-0.044-0.396-0.044-0.524
|
||||
c0-0.114-0.014-0.156-0.099-0.156c-0.071,0-0.1,0.071-0.114,0.227c-0.014,0.228-0.07,0.795-0.07,1.505
|
||||
c0,0.383,0.015,0.44,0.212,0.54C153.686,13.364,154.338,13.464,155.006,13.464 M127.632,13.265c0.127,0,0.213-0.028,0.213-0.113
|
||||
c0-0.058-0.042-0.085-0.143-0.085h-0.142c-0.24,0-0.539-0.128-0.539-0.412c0-0.255,0.071-0.596,0.198-0.951l0.853-2.512
|
||||
c0.028-0.07,0.069-0.114,0.142-0.114h3.051c0.072,0,0.1,0.029,0.129,0.086l1.318,3.491c0.086,0.228,0,0.355-0.084,0.384
|
||||
c-0.056,0.015-0.1,0.043-0.1,0.1c0,0.085,0.156,0.085,0.427,0.099c0.979,0.028,2.015,0.028,2.228,0.028
|
||||
c0.156,0,0.284-0.028,0.284-0.113c0-0.07-0.058-0.085-0.142-0.085c-0.143,0-0.355-0.014-0.569-0.085
|
||||
c-0.298-0.086-0.71-0.313-1.22-1.575c-0.866-2.158-3.094-8.02-3.308-8.56c-0.17-0.439-0.227-0.511-0.312-0.511
|
||||
s-0.143,0.085-0.313,0.554l-3.221,8.813c-0.213,0.59-0.444,1.061-0.89,1.253c-0.37-0.124-0.739-0.406-1.208-0.932
|
||||
c-1.066-1.198-3.283-4.028-3.81-4.748c0.299-0.356,2.784-2.783,3.139-3.123c0.639-0.611,0.951-0.966,1.534-1.221
|
||||
c0.283-0.128,0.581-0.199,0.794-0.199c0.113,0,0.143-0.028,0.143-0.1c0-0.07-0.057-0.1-0.214-0.1c-0.355,0-1.291,0.044-1.361,0.044
|
||||
c-0.342,0-0.781-0.044-1.065-0.044c-0.099,0-0.17,0.029-0.17,0.1c0,0.057,0.056,0.085,0.128,0.114
|
||||
c0.113,0.042,0.184,0.128,0.184,0.298c0,0.241-0.369,0.61-0.766,1.021c-0.512,0.554-3.081,3.165-3.32,3.435l-0.058-0.852
|
||||
c0-2.214,0-2.611,0.027-3.065c0.03-0.497,0.143-0.738,0.525-0.809c0.171-0.028,0.256-0.043,0.356-0.043
|
||||
c0.057,0,0.112-0.028,0.112-0.085c0-0.085-0.071-0.114-0.228-0.114c-0.425,0-1.248,0.044-1.376,0.044
|
||||
c-0.085,0-0.923-0.044-1.562-0.044c-0.156,0-0.228,0.029-0.228,0.114c0,0.057,0.058,0.085,0.114,0.085
|
||||
c0.127,0,0.369,0.015,0.482,0.043c0.468,0.1,0.581,0.326,0.61,0.809c0.028,0.454,0.028,0.852,0.028,3.065v2.499
|
||||
c0,1.362,0,2.483-0.07,3.08c-0.058,0.411-0.128,0.724-0.413,0.78c-0.128,0.028-0.298,0.057-0.425,0.057
|
||||
c-0.086,0-0.114,0.042-0.114,0.085c0,0.085,0.071,0.113,0.229,0.113c0.425,0,1.248-0.042,1.362-0.042
|
||||
c0.113,0,0.937,0.042,1.632,0.042c0.155,0,0.227-0.042,0.227-0.113c0-0.043-0.028-0.085-0.112-0.085
|
||||
c-0.129,0-0.356-0.028-0.555-0.057c-0.426-0.057-0.511-0.369-0.554-0.78c-0.07-0.597-0.07-1.718-0.07-3.08l0.007-1.381
|
||||
c0.319,0.442,1.632,2.193,2.501,3.293c0.755,0.956,1.319,1.632,1.925,1.966c0.259,0.141,0.392,0.24,1.051,0.24
|
||||
c0,0,0.933-0.047,1.43-0.047C126.829,13.221,127.291,13.265,127.632,13.265 M128.369,8.567c-0.042,0-0.07-0.029-0.042-0.1
|
||||
l1.249-3.833c0.07-0.212,0.143-0.212,0.214,0l1.347,3.833c0.015,0.057,0.015,0.1-0.057,0.1H128.369z M82.699,11.703
|
||||
c-0.256,0.71-0.54,1.25-1.192,1.335c-0.113,0.015-0.313,0.028-0.412,0.028c-0.07,0-0.127,0.027-0.127,0.085
|
||||
c0,0.086,0.085,0.113,0.27,0.113c0.667,0,1.447-0.042,1.604-0.042c0.157,0,0.767,0.042,1.107,0.042c0.127,0,0.213-0.027,0.213-0.113
|
||||
c0-0.058-0.042-0.085-0.142-0.085h-0.143c-0.241,0-0.539-0.128-0.539-0.412c0-0.255,0.07-0.596,0.199-0.951l0.852-2.512
|
||||
c0.027-0.07,0.07-0.114,0.141-0.114h3.053c0.071,0,0.099,0.029,0.127,0.086l1.32,3.491c0.085,0.228,0,0.355-0.085,0.384
|
||||
c-0.057,0.015-0.1,0.043-0.1,0.1c0,0.085,0.157,0.085,0.427,0.1c0.979,0.027,2.015,0.027,2.228,0.027
|
||||
c0.156,0,0.284-0.027,0.284-0.113c0-0.07-0.057-0.085-0.143-0.085c-0.142,0-0.354-0.014-0.567-0.085
|
||||
c-0.299-0.086-0.71-0.313-1.221-1.575c-0.866-2.158-3.095-8.02-3.308-8.559c-0.169-0.44-0.226-0.512-0.312-0.512
|
||||
c-0.085,0-0.143,0.085-0.313,0.554L82.699,11.703z M84.686,8.567c-0.042,0-0.07-0.029-0.042-0.1l1.25-3.833
|
||||
c0.069-0.212,0.141-0.212,0.213,0l1.347,3.833c0.015,0.057,0.015,0.1-0.056,0.1H84.686z M63.874,2.989
|
||||
c0.439-0.005,1.402-0.078,2.173,0.708c0.772,0.787,0.815,1.763,0.815,2.243c0,1.339-1.1,2.343-2.512,2.343
|
||||
c-0.584,0-1.229-0.1-1.441-0.228c-0.071-0.043-0.099-0.1-0.099-0.17V3.244c0-0.085,0.042-0.142,0.113-0.17
|
||||
C63.065,3.031,63.448,2.994,63.874,2.989 M65.519,8.418c1.482-0.406,2.48-1.644,2.48-3.321c0-0.773-0.408-1.429-0.729-1.734
|
||||
c-0.232-0.218-0.889-0.83-2.708-0.83c-0.671,0-1.906,0.045-2.292,0.045c-0.167,0-0.965-0.043-1.604-0.043
|
||||
c-0.155,0-0.226,0.029-0.226,0.114c0,0.057,0.056,0.085,0.113,0.085c0.127,0,0.368,0.015,0.481,0.043
|
||||
c0.469,0.1,0.583,0.326,0.611,0.809c0.028,0.454,0.028,0.852,0.028,3.065v2.499c0,1.362,0,2.483-0.071,3.08
|
||||
c-0.057,0.411-0.127,0.724-0.412,0.78c-0.128,0.028-0.297,0.057-0.426,0.057c-0.085,0-0.113,0.042-0.113,0.085
|
||||
c0,0.086,0.071,0.113,0.228,0.113c0.426,0,1.319-0.042,1.334-0.042c0.071,0,0.965,0.042,1.746,0.042
|
||||
c0.155,0,0.227-0.042,0.227-0.113c0-0.043-0.027-0.085-0.113-0.085c-0.127,0-0.44-0.028-0.639-0.057
|
||||
c-0.426-0.057-0.511-0.369-0.554-0.78c-0.07-0.597-0.07-1.718-0.07-3.08V8.808c0-0.07,0.027-0.113,0.099-0.113l1.377,0.022
|
||||
c0.086,0,0.162,0.033,0.188,0.091c0.216,0.473,0.515,1.27,0.943,2.148c0.586,1.202,0.688,1.733,1.298,2.061
|
||||
c0.369,0.199,0.756,0.248,1.551,0.248h0.684c0.256,0,0.342-0.027,0.342-0.113c0-0.043-0.057-0.087-0.128-0.085
|
||||
c-0.141,0.003-0.376-0.036-0.646-0.084c-0.229-0.04-0.901-0.203-1.316-0.98C66.683,11.03,66.086,9.615,65.519,8.418 M102.369,9.149
|
||||
c0,1.362,0,2.483-0.071,3.08c-0.057,0.411-0.128,0.724-0.412,0.78c-0.128,0.028-0.297,0.057-0.425,0.057
|
||||
c-0.085,0-0.114,0.042-0.114,0.085c0,0.086,0.071,0.113,0.227,0.113c0.213,0,0.539-0.027,0.824-0.027
|
||||
c0.297-0.015,0.539-0.015,0.566-0.015c0.072,0,0.555,0.042,1.179,0.085c0.611,0.043,1.363,0.085,1.974,0.085
|
||||
c2.412,0,3.689-0.993,4.3-1.633c0.795-0.836,1.533-2.214,1.533-4.001c0-1.69-0.667-2.868-1.377-3.605
|
||||
c-1.688-1.746-4.286-1.619-5.691-1.619c-0.852,0-1.746,0.044-1.917,0.044c-0.07,0-0.965-0.044-1.604-0.044
|
||||
c-0.156,0-0.227,0.029-0.227,0.114c0,0.057,0.057,0.085,0.113,0.085c0.129,0,0.369,0.015,0.482,0.043
|
||||
c0.469,0.1,0.582,0.326,0.611,0.809c0.028,0.454,0.028,0.852,0.028,3.065V9.149z M103.561,6.424c0-1.093,0-2.541,0.016-3.023
|
||||
c0-0.156,0.041-0.228,0.169-0.283c0.114-0.057,0.639-0.1,0.923-0.1c1.689,0,3.307,0.198,4.642,1.604
|
||||
c0.582,0.61,1.362,1.774,1.362,3.577c0,1.306-0.397,2.668-1.136,3.392c-0.838,0.838-2.058,1.321-3.378,1.321
|
||||
c-1.674,0-2.229-0.299-2.413-0.569c-0.112-0.155-0.142-0.724-0.155-1.078c-0.014-0.27-0.029-1.575-0.029-3.08V6.424z M95.334,2.989
|
||||
c0.438-0.005,1.401-0.078,2.173,0.708c0.772,0.787,0.815,1.763,0.815,2.243c0,1.339-1.101,2.343-2.513,2.343
|
||||
c-0.583,0-1.228-0.1-1.44-0.228c-0.071-0.043-0.1-0.1-0.1-0.17V3.244c0-0.085,0.043-0.142,0.114-0.17
|
||||
C94.525,3.031,94.909,2.994,95.334,2.989 M96.979,8.418c1.483-0.406,2.479-1.644,2.479-3.321c0-0.773-0.407-1.429-0.727-1.734
|
||||
c-0.234-0.218-0.889-0.83-2.71-0.83c-0.669,0-1.905,0.045-2.29,0.045c-0.168,0-0.966-0.043-1.605-0.043
|
||||
c-0.155,0-0.227,0.029-0.227,0.114c0,0.057,0.058,0.085,0.114,0.085c0.127,0,0.369,0.015,0.482,0.043
|
||||
c0.468,0.1,0.581,0.326,0.609,0.809c0.029,0.454,0.029,0.852,0.029,3.065v2.499c0,1.362,0,2.483-0.071,3.08
|
||||
c-0.057,0.411-0.128,0.724-0.411,0.78c-0.128,0.028-0.299,0.057-0.426,0.057c-0.086,0-0.114,0.042-0.114,0.085
|
||||
c0,0.086,0.071,0.113,0.228,0.113c0.426,0,1.319-0.042,1.335-0.042c0.069,0,0.965,0.042,1.745,0.042
|
||||
c0.156,0,0.227-0.042,0.227-0.113c0-0.043-0.028-0.085-0.113-0.085c-0.128,0-0.44-0.028-0.639-0.057
|
||||
c-0.426-0.057-0.511-0.369-0.554-0.78c-0.071-0.597-0.071-1.718-0.071-3.08V8.808c0-0.07,0.028-0.113,0.1-0.113l1.378,0.022
|
||||
c0.084,0,0.16,0.033,0.188,0.091c0.215,0.473,0.513,1.27,0.943,2.148c0.585,1.202,0.687,1.733,1.297,2.061
|
||||
c0.368,0.199,0.756,0.248,1.551,0.248h0.686c0.254,0,0.339-0.027,0.339-0.113c0-0.043-0.057-0.087-0.127-0.085
|
||||
c-0.141,0.003-0.376-0.036-0.646-0.084c-0.229-0.04-0.9-0.203-1.317-0.98C98.143,11.03,97.545,9.615,96.979,8.418 M79.32,6.65
|
||||
c0-2.214,0-2.611,0.028-3.065c0.028-0.497,0.142-0.737,0.525-0.809c0.17-0.028,0.255-0.043,0.354-0.043
|
||||
c0.057,0,0.113-0.028,0.113-0.085c0-0.085-0.071-0.114-0.228-0.114c-0.426,0-1.319,0.044-1.391,0.044
|
||||
c-0.07,0-0.965-0.044-1.604-0.044c-0.156,0-0.228,0.029-0.228,0.114c0,0.057,0.057,0.085,0.114,0.085
|
||||
c0.127,0,0.369,0.015,0.481,0.043c0.469,0.1,0.583,0.326,0.611,0.809c0.028,0.454,0.028,0.852,0.028,3.065v0.299
|
||||
c0,0.07-0.043,0.085-0.086,0.085h-6.018c-0.043,0-0.085-0.015-0.085-0.085V6.65c0-2.214,0-2.611,0.028-3.065
|
||||
c0.028-0.497,0.143-0.737,0.525-0.809c0.17-0.028,0.256-0.043,0.354-0.043c0.058,0,0.114-0.028,0.114-0.085
|
||||
c0-0.085-0.072-0.114-0.229-0.114c-0.426,0-1.318,0.044-1.391,0.044c-0.07,0-0.965-0.044-1.604-0.044
|
||||
c-0.156,0-0.227,0.029-0.227,0.114c0,0.057,0.057,0.085,0.113,0.085c0.128,0,0.369,0.015,0.482,0.043
|
||||
c0.469,0.1,0.582,0.326,0.61,0.809c0.028,0.454,0.028,0.852,0.028,3.065v2.499c0,1.362,0,2.483-0.071,3.08
|
||||
c-0.057,0.411-0.127,0.724-0.411,0.78c-0.128,0.028-0.298,0.057-0.426,0.057c-0.085,0-0.113,0.042-0.113,0.085
|
||||
c0,0.086,0.071,0.113,0.227,0.113c0.426,0,1.32-0.042,1.391-0.042c0.072,0,0.965,0.042,1.746,0.042c0.156,0,0.228-0.042,0.228-0.113
|
||||
c0-0.043-0.028-0.085-0.114-0.085c-0.127,0-0.439-0.028-0.639-0.057c-0.426-0.057-0.51-0.369-0.554-0.78
|
||||
c-0.07-0.597-0.07-1.718-0.07-3.08V7.658c0-0.07,0.042-0.085,0.085-0.085h6.018c0.043,0,0.086,0.028,0.086,0.085v1.491
|
||||
c0,1.362,0,2.483-0.07,3.08c-0.058,0.411-0.128,0.724-0.412,0.78c-0.128,0.028-0.299,0.057-0.427,0.057
|
||||
c-0.085,0-0.113,0.042-0.113,0.085c0,0.086,0.071,0.113,0.228,0.113c0.426,0,1.32-0.042,1.391-0.042
|
||||
c0.071,0,0.965,0.042,1.747,0.042c0.155,0,0.226-0.042,0.226-0.113c0-0.043-0.028-0.085-0.112-0.085c-0.129,0-0.44-0.028-0.64-0.057
|
||||
c-0.426-0.057-0.511-0.369-0.554-0.78c-0.07-0.597-0.07-1.718-0.07-3.08V6.65z M46.516,7.658c0-0.07,0.027-0.099,0.085-0.099
|
||||
c0.213,0,0.922,0,1.107,0.028c0.34,0.043,0.695,0.085,1.177,0.412c1.094,0.752,1.378,1.986,1.378,2.838
|
||||
c0,1.604-1.235,2.016-2.002,2.016c-0.255,0-0.865-0.028-1.249-0.213c-0.439-0.213-0.439-0.411-0.482-1.107
|
||||
c-0.014-0.213-0.014-1.973-0.014-3.065V7.658z M46.516,3.159c0-0.085,0.042-0.128,0.17-0.156c0.228-0.057,0.525-0.07,0.681-0.07
|
||||
c1.392,0,1.917,1.263,1.917,2.441c0,0.582-0.213,1.092-0.511,1.434c-0.299,0.34-0.497,0.369-1.292,0.369
|
||||
c-0.525,0-0.781-0.043-0.866-0.058c-0.071-0.028-0.099-0.057-0.099-0.156V3.159z M45.38,9.149c0,1.362,0,2.483-0.071,3.08
|
||||
c-0.057,0.411-0.127,0.724-0.412,0.78c-0.127,0.028-0.297,0.057-0.426,0.057c-0.085,0-0.112,0.042-0.112,0.085
|
||||
c0,0.086,0.07,0.113,0.227,0.113c0.213,0,0.54-0.027,0.823-0.027c0.298-0.015,0.539-0.015,0.567-0.015
|
||||
c0.058,0,0.454,0.015,0.866,0.042c0.411,0.015,0.866,0.043,1.022,0.043c2.426,0,3.619-1.575,3.619-3.095
|
||||
c0-1.66-1.405-2.667-2.456-2.994c0.667-0.695,1.334-1.391,1.334-2.556c0-0.709-0.511-2.129-2.839-2.129
|
||||
c-0.652,0-1.206,0.044-1.547,0.044c-0.07,0-0.965-0.044-1.604-0.044c-0.156,0-0.228,0.029-0.228,0.114
|
||||
c0,0.057,0.057,0.085,0.114,0.085c0.127,0,0.368,0.015,0.481,0.043c0.47,0.1,0.583,0.326,0.611,0.809
|
||||
C45.38,4.039,45.38,4.437,45.38,6.65V9.149z M37.294,9.149c0,1.362,0,2.483-0.07,3.08c-0.057,0.411-0.128,0.724-0.412,0.78
|
||||
c-0.128,0.028-0.298,0.057-0.426,0.057c-0.085,0-0.113,0.042-0.113,0.085c0,0.086,0.071,0.113,0.227,0.113
|
||||
c0.213,0,0.539-0.027,0.823-0.027c0.298-0.015,0.54-0.015,0.567-0.015c0.213,0,0.555,0.015,1.107,0.042
|
||||
c0.554,0.015,1.334,0.043,2.399,0.043c0.553,0,0.667,0,0.766-0.369c0.071-0.298,0.185-1.263,0.185-1.377
|
||||
c0-0.099,0-0.213-0.085-0.213c-0.07,0-0.1,0.058-0.128,0.213c-0.099,0.582-0.27,0.866-0.638,1.022
|
||||
c-0.369,0.156-0.994,0.156-1.363,0.156c-1.391,0-1.604-0.185-1.646-1.164c-0.014-0.298,0-1.944,0-2.427V7.9
|
||||
c0-0.058,0.028-0.1,0.099-0.1c0.242,0,1.647,0.028,2.03,0.07c0.554,0.058,0.682,0.299,0.738,0.497
|
||||
c0.057,0.185,0.057,0.326,0.057,0.469c0,0.07,0.028,0.128,0.1,0.128c0.1,0,0.1-0.157,0.1-0.271c0-0.1,0.027-0.624,0.057-0.908
|
||||
c0.042-0.468,0.113-0.709,0.113-0.795c0-0.084-0.028-0.113-0.071-0.113c-0.056,0-0.113,0.071-0.212,0.185
|
||||
c-0.129,0.142-0.327,0.17-0.668,0.198c-0.326,0.028-2.072,0.028-2.257,0.028c-0.07,0-0.085-0.042-0.085-0.142V3.23
|
||||
c0-0.1,0.028-0.143,0.085-0.143c0.156,0,1.704,0.015,1.944,0.043c0.768,0.085,0.909,0.256,1.008,0.482
|
||||
c0.071,0.171,0.086,0.412,0.086,0.511c0,0.114,0.027,0.185,0.113,0.185c0.057,0,0.085-0.085,0.1-0.155
|
||||
c0.028-0.171,0.057-0.795,0.07-0.938c0.043-0.397,0.114-0.567,0.114-0.667c0-0.07-0.015-0.128-0.058-0.128
|
||||
c-0.07,0-0.127,0.058-0.198,0.07c-0.114,0.029-0.341,0.058-0.61,0.072c-0.326,0.015-3.151,0.015-3.251,0.015l-0.581-0.029
|
||||
c-0.313-0.015-0.695-0.015-1.022-0.015c-0.155,0-0.227,0.029-0.227,0.114c0,0.057,0.057,0.085,0.113,0.085
|
||||
c0.128,0,0.369,0.015,0.482,0.043c0.469,0.1,0.582,0.326,0.61,0.809c0.028,0.454,0.028,0.852,0.028,3.065V9.149z M54.173,9.149
|
||||
c0,1.362,0,2.483-0.07,3.08c-0.057,0.411-0.128,0.724-0.412,0.78c-0.128,0.028-0.298,0.057-0.426,0.057
|
||||
c-0.085,0-0.113,0.042-0.113,0.085c0,0.086,0.071,0.113,0.227,0.113c0.214,0,0.54-0.027,0.823-0.027
|
||||
c0.299-0.015,0.54-0.015,0.568-0.015c0.213,0,0.554,0.015,1.107,0.042c0.553,0.015,1.334,0.043,2.398,0.043
|
||||
c0.554,0,0.667,0,0.767-0.369c0.07-0.298,0.185-1.263,0.185-1.377c0-0.099,0-0.213-0.085-0.213c-0.071,0-0.1,0.058-0.128,0.213
|
||||
c-0.1,0.582-0.27,0.866-0.639,1.022s-0.993,0.156-1.363,0.156c-1.391,0-1.604-0.185-1.646-1.164c-0.014-0.298,0-1.944,0-2.427V7.9
|
||||
c0-0.058,0.029-0.1,0.1-0.1c0.241,0,1.647,0.028,2.03,0.07c0.554,0.058,0.681,0.299,0.738,0.497
|
||||
c0.057,0.185,0.057,0.326,0.057,0.469c0,0.07,0.028,0.128,0.099,0.128c0.1,0,0.1-0.157,0.1-0.271c0-0.1,0.028-0.624,0.057-0.908
|
||||
c0.043-0.468,0.113-0.709,0.113-0.795c0-0.084-0.028-0.113-0.07-0.113c-0.057,0-0.113,0.071-0.213,0.185
|
||||
c-0.128,0.142-0.326,0.17-0.667,0.198c-0.326,0.028-2.072,0.028-2.256,0.028c-0.072,0-0.087-0.042-0.087-0.142V3.23
|
||||
c0-0.1,0.029-0.143,0.087-0.143c0.155,0,1.702,0.015,1.943,0.043c0.767,0.085,0.908,0.256,1.008,0.482
|
||||
c0.071,0.171,0.085,0.412,0.085,0.511c0,0.114,0.028,0.185,0.113,0.185c0.057,0,0.085-0.085,0.1-0.155
|
||||
c0.028-0.171,0.057-0.795,0.071-0.938c0.042-0.397,0.113-0.567,0.113-0.667c0-0.07-0.015-0.128-0.057-0.128
|
||||
c-0.071,0-0.128,0.058-0.199,0.07c-0.113,0.029-0.34,0.058-0.609,0.072c-0.327,0.015-3.151,0.015-3.251,0.015l-0.582-0.029
|
||||
c-0.313-0.015-0.695-0.015-1.021-0.015c-0.156,0-0.228,0.029-0.228,0.114c0,0.057,0.057,0.085,0.113,0.085
|
||||
c0.128,0,0.369,0.015,0.482,0.043c0.47,0.1,0.582,0.326,0.611,0.809c0.027,0.454,0.027,0.852,0.027,3.065V9.149z M67.401,56.393
|
||||
c0-0.144,0.057-0.199,0.17-0.199c0.427,0,1.846,0,2.214,0.056c0.682,0.086,1.392,0.171,2.356,0.824
|
||||
c2.186,1.504,2.754,3.975,2.754,5.677c0,3.209-2.47,4.031-4.002,4.031c-0.512,0-1.732-0.057-2.499-0.426
|
||||
c-0.88-0.426-0.88-0.824-0.965-2.215c-0.028-0.425-0.028-3.944-0.028-6.131V56.393z M67.401,47.394c0-0.17,0.085-0.256,0.341-0.313
|
||||
c0.454-0.114,1.051-0.142,1.362-0.142c2.782,0,3.832,2.526,3.832,4.883c0,1.163-0.426,2.185-1.021,2.867
|
||||
c-0.596,0.682-0.993,0.737-2.583,0.737c-1.051,0-1.562-0.086-1.732-0.113c-0.142-0.057-0.198-0.114-0.198-0.312V47.394z
|
||||
M65.131,59.372c0,2.726,0,4.969-0.142,6.159c-0.114,0.824-0.257,1.449-0.824,1.563c-0.256,0.057-0.596,0.113-0.852,0.113
|
||||
c-0.17,0-0.227,0.085-0.227,0.171c0,0.171,0.141,0.228,0.454,0.228c0.426,0,1.079-0.057,1.646-0.057
|
||||
c0.597-0.03,1.079-0.03,1.136-0.03c0.114,0,0.908,0.03,1.731,0.087c0.824,0.027,1.731,0.084,2.044,0.084
|
||||
c4.854,0,7.239-3.15,7.239-6.188c0-3.32-2.811-5.336-4.911-5.99c1.334-1.39,2.668-2.781,2.668-5.108
|
||||
c0-1.419-1.021-4.259-5.677-4.259c-1.306,0-2.413,0.086-3.095,0.086c-0.142,0-1.931-0.086-3.207-0.086
|
||||
c-0.313,0-0.454,0.058-0.454,0.229c0,0.113,0.113,0.17,0.227,0.17c0.256,0,0.738,0.028,0.965,0.085
|
||||
c0.938,0.198,1.164,0.653,1.221,1.618c0.058,0.908,0.058,1.703,0.058,6.131V59.372z M84.098,54.376c0-4.428,0-5.223,0.057-6.131
|
||||
c0.057-0.994,0.283-1.477,1.05-1.618c0.342-0.057,0.511-0.085,0.71-0.085c0.114,0,0.227-0.057,0.227-0.17
|
||||
c0-0.171-0.142-0.229-0.454-0.229c-0.852,0-2.64,0.086-2.781,0.086c-0.143,0-1.931-0.086-2.867-0.086
|
||||
c-0.313,0-0.454,0.058-0.454,0.229c0,0.113,0.113,0.17,0.227,0.17c0.199,0,0.567,0.028,0.88,0.113
|
||||
c0.625,0.142,0.908,0.625,0.965,1.59c0.058,0.908,0.058,1.703,0.058,6.131v4.996c0,2.726,0,4.969-0.142,6.159
|
||||
c-0.114,0.824-0.256,1.449-0.823,1.563c-0.256,0.057-0.597,0.113-0.853,0.113c-0.17,0-0.227,0.085-0.227,0.171
|
||||
c0,0.171,0.142,0.228,0.454,0.228c0.852,0,2.64-0.087,2.782-0.087c0.142,0,1.93,0.087,3.491,0.087c0.313,0,0.454-0.087,0.454-0.228
|
||||
c0-0.086-0.057-0.171-0.228-0.171c-0.255,0-0.88-0.057-1.277-0.113c-0.851-0.113-1.021-0.738-1.106-1.563
|
||||
c-0.142-1.19-0.142-3.434-0.142-6.159V54.376z M92.693,50.146c0.908,1.022,4.111,4.599,7.398,8.146
|
||||
c3.004,3.237,7.085,7.409,7.396,7.693c1.508,1.505,1.852,1.817,2.08,1.817c0.201,0,0.258-0.143,0.258-2.017l0.057-16.634
|
||||
c0-1.703,0.113-2.328,1.051-2.526c0.34-0.085,0.54-0.085,0.682-0.085c0.198,0,0.312-0.085,0.312-0.199
|
||||
c0-0.17-0.199-0.199-0.511-0.199c-1.164,0-2.104,0.086-2.42,0.086c-0.314,0-1.679-0.086-2.953-0.086
|
||||
c-0.341,0-0.566,0.029-0.566,0.199c0,0.114,0.028,0.199,0.226,0.199c0.229,0,0.879,0.028,1.39,0.142
|
||||
c0.878,0.228,1.076,0.852,1.105,2.697l0.313,14.42c-0.908-0.937-3.997-4.399-6.804-7.408c-4.363-4.685-8.586-9.255-9.013-9.737
|
||||
c-0.286-0.283-0.772-0.908-1.002-0.908c-0.228,0-0.313,0.313-0.313,1.419l-0.029,16.267c0,2.582-0.142,3.405-0.852,3.604
|
||||
c-0.426,0.144-0.936,0.171-1.164,0.171c-0.142,0-0.227,0.058-0.227,0.171c0,0.197,0.17,0.228,0.455,0.228
|
||||
c1.277,0,2.474-0.087,2.731-0.087c0.257,0,1.394,0.087,3.01,0.087c0.34,0,0.51-0.057,0.51-0.228c0-0.113-0.085-0.171-0.227-0.171
|
||||
c-0.256,0-0.879-0.027-1.417-0.171c-0.765-0.226-1.049-0.965-1.105-3.292L92.693,50.146z M130.306,65.19
|
||||
c0,0.482-0.199,0.794-0.567,0.993c-0.737,0.426-2.214,0.596-3.236,0.596c-2.61,0-5.194-0.852-7.437-3.037
|
||||
c-0.994-0.965-3.01-3.86-3.01-7.864c0-3.32,1.164-5.904,2.812-7.21c2.156-1.702,4.286-1.873,6.073-1.873
|
||||
c3.663,0,5.962,1.221,6.671,2.3c0.427,0.682,0.568,1.476,0.596,1.874c0.028,0.254,0.058,0.425,0.199,0.425
|
||||
c0.199,0,0.256-0.142,0.256-0.596c0-2.839,0.199-3.634,0.199-4.03c0-0.114-0.057-0.228-0.341-0.257
|
||||
c-0.71-0.027-1.704-0.142-2.3-0.283c-0.539-0.113-2.554-0.482-4.344-0.482c-2.185,0-4.995,0.198-7.55,1.788
|
||||
c-2.526,1.59-4.74,4.797-4.74,9.34c0,3.548,1.646,6.585,3.378,8.089c3.15,2.754,7.182,3.038,9.339,3.038
|
||||
c1.646,0,4.202-0.313,6.019-1.276c0.34-0.199,0.368-0.257,0.368-1.533v-3.18c0-1.192,0-2.044,0.057-2.953
|
||||
c0.058-0.992,0.284-1.476,1.051-1.617c0.34-0.058,0.512-0.085,0.709-0.085c0.113,0,0.228-0.058,0.228-0.171
|
||||
c0-0.171-0.141-0.228-0.454-0.228c-0.852,0-2.64,0.086-2.782,0.086c-0.142,0-1.93-0.086-3.207-0.086
|
||||
c-0.313,0-0.455,0.057-0.455,0.228c0,0.113,0.114,0.171,0.228,0.171c0.255,0,0.738,0.027,0.966,0.085
|
||||
c1.135,0.312,1.276,0.625,1.276,2.924V65.19z M139.192,59.372c0,2.726,0,4.969-0.143,6.159c-0.113,0.824-0.256,1.449-0.822,1.563
|
||||
c-0.257,0.057-0.598,0.113-0.854,0.113c-0.169,0-0.227,0.085-0.227,0.171c0,0.171,0.142,0.228,0.454,0.228
|
||||
c0.425,0,1.079-0.057,1.647-0.057c0.596-0.03,1.078-0.03,1.135-0.03c0.426,0,1.107,0.03,2.215,0.087
|
||||
c1.106,0.027,2.667,0.084,4.797,0.084c1.106,0,1.335,0,1.532-0.738c0.143-0.596,0.37-2.525,0.37-2.754c0-0.197,0-0.426-0.171-0.426
|
||||
c-0.143,0-0.199,0.114-0.256,0.426c-0.198,1.165-0.539,1.732-1.277,2.045c-0.737,0.312-1.987,0.312-2.725,0.312
|
||||
c-2.781,0-3.208-0.369-3.293-2.327c-0.028-0.596,0-3.89,0-4.854v-2.497c0-0.114,0.057-0.199,0.198-0.199
|
||||
c0.482,0,3.294,0.056,4.061,0.142c1.105,0.114,1.362,0.597,1.476,0.994c0.113,0.369,0.113,0.652,0.113,0.937
|
||||
c0,0.142,0.056,0.255,0.198,0.255c0.199,0,0.199-0.313,0.199-0.539c0-0.198,0.057-1.249,0.114-1.816
|
||||
c0.083-0.937,0.226-1.42,0.226-1.59s-0.056-0.228-0.143-0.228c-0.112,0-0.227,0.143-0.425,0.369
|
||||
c-0.255,0.284-0.653,0.342-1.334,0.397c-0.653,0.058-4.145,0.058-4.515,0.058c-0.141,0-0.169-0.086-0.169-0.283v-7.836
|
||||
c0-0.199,0.057-0.284,0.169-0.284c0.313,0,3.407,0.029,3.891,0.085c1.532,0.171,1.816,0.512,2.015,0.966
|
||||
c0.142,0.341,0.171,0.822,0.171,1.021c0,0.228,0.057,0.369,0.227,0.369c0.113,0,0.171-0.17,0.199-0.312
|
||||
c0.057-0.342,0.115-1.59,0.142-1.874c0.085-0.795,0.228-1.135,0.228-1.334c0-0.143-0.028-0.255-0.114-0.255
|
||||
c-0.14,0-0.255,0.112-0.396,0.142c-0.228,0.057-0.682,0.113-1.221,0.142c-0.653,0.028-6.302,0.028-6.501,0.028l-1.164-0.057
|
||||
c-0.624-0.029-1.391-0.029-2.044-0.029c-0.313,0-0.453,0.058-0.453,0.229c0,0.113,0.113,0.17,0.226,0.17
|
||||
c0.257,0,0.739,0.028,0.966,0.085c0.936,0.198,1.164,0.653,1.221,1.618c0.058,0.908,0.058,1.703,0.058,6.131V59.372z
|
||||
M155.766,50.146c0.908,1.022,4.11,4.599,7.397,8.146c3.004,3.237,7.085,7.409,7.397,7.693c1.508,1.505,1.851,1.817,2.079,1.817
|
||||
c0.201,0,0.259-0.143,0.259-2.017l0.057-16.634c0-1.703,0.114-2.328,1.051-2.526c0.34-0.085,0.539-0.085,0.681-0.085
|
||||
c0.199,0,0.313-0.085,0.313-0.199c0-0.17-0.199-0.199-0.512-0.199c-1.164,0-2.104,0.086-2.419,0.086s-1.679-0.086-2.953-0.086
|
||||
c-0.341,0-0.567,0.029-0.567,0.199c0,0.114,0.028,0.199,0.227,0.199c0.227,0,0.88,0.028,1.389,0.142
|
||||
c0.879,0.228,1.076,0.852,1.105,2.697l0.314,14.42c-0.909-0.937-3.999-4.399-6.804-7.408c-4.364-4.685-8.587-9.255-9.014-9.737
|
||||
c-0.286-0.283-0.773-0.908-1.002-0.908s-0.313,0.313-0.313,1.419l-0.029,16.267c0,2.582-0.143,3.405-0.852,3.604
|
||||
c-0.427,0.144-0.938,0.171-1.165,0.171c-0.141,0-0.227,0.058-0.227,0.171c0,0.197,0.171,0.228,0.454,0.228
|
||||
c1.277,0,2.476-0.087,2.732-0.087c0.258,0,1.395,0.087,3.01,0.087c0.34,0,0.51-0.057,0.51-0.228c0-0.113-0.085-0.171-0.228-0.171
|
||||
c-0.254,0-0.876-0.027-1.416-0.171c-0.766-0.226-1.048-0.965-1.105-3.292L155.766,50.146z M29.806,47.365l3.569,0.057
|
||||
c2.721,0.057,3.4,0.71,3.485,1.562l0.029,0.312c0.029,0.397,0.087,0.482,0.231,0.482c0.116,0,0.204-0.113,0.204-0.369
|
||||
c0-0.312,0.086-2.271,0.086-3.122c0-0.17,0-0.341-0.145-0.341c-0.116,0-0.377,0.085-0.803,0.143
|
||||
c-0.453,0.085-1.104,0.142-2.012,0.142H23.815c-0.34,0-1.419-0.057-2.242-0.142c-0.767-0.058-1.051-0.341-1.249-0.341
|
||||
c-0.114,0-0.228,0.369-0.284,0.539c-0.057,0.227-0.625,2.668-0.625,2.952c0,0.17,0.057,0.256,0.143,0.256
|
||||
c0.113,0,0.199-0.057,0.283-0.284c0.086-0.198,0.172-0.397,0.483-0.879c0.454-0.682,1.136-0.881,2.896-0.909l4.201-0.057v12.007
|
||||
c0,2.726,0,4.969-0.143,6.159c-0.112,0.824-0.255,1.449-0.823,1.563c-0.255,0.057-0.596,0.113-0.852,0.113
|
||||
c-0.17,0-0.227,0.085-0.227,0.171c0,0.171,0.143,0.228,0.454,0.228c0.852,0,2.64-0.087,2.782-0.087c0.142,0,1.929,0.087,3.487,0.087
|
||||
c0.312,0,0.453-0.087,0.453-0.228c0-0.086-0.057-0.171-0.226-0.171c-0.256,0-0.879-0.057-1.275-0.113
|
||||
c-0.851-0.113-1.021-0.738-1.105-1.563c-0.142-1.19-0.142-3.434-0.142-6.159V47.365z M41.755,58.519c0,4.145,1.079,6.132,2.47,7.466
|
||||
c2.016,1.9,4.883,2.015,5.848,2.015c1.676,0,3.804-0.284,5.848-2.101c2.271-2.015,2.611-5.423,2.611-8.487v-3.038
|
||||
c0-4.428,0-5.223,0.058-6.131c0.057-0.993,0.283-1.448,1.051-1.618c0.339-0.057,0.511-0.085,0.709-0.085
|
||||
c0.113,0,0.228-0.057,0.228-0.17c0-0.171-0.143-0.229-0.455-0.229c-0.852,0-2.186,0.086-2.385,0.086
|
||||
c-0.17,0-1.731-0.086-3.009-0.086c-0.313,0-0.453,0.058-0.453,0.229c0,0.113,0.112,0.17,0.226,0.17c0.257,0,0.739,0.028,0.966,0.085
|
||||
c0.937,0.198,1.164,0.653,1.221,1.618c0.057,0.908,0.057,1.703,0.057,6.131v3.549c0,2.924-0.341,5.337-1.646,6.954
|
||||
c-1.022,1.222-2.725,2.045-4.457,2.045c-1.617,0-2.895-0.256-4.286-1.563c-1.221-1.163-2.129-2.923-2.129-7.011v-3.975
|
||||
c0-4.428,0-5.223,0.057-6.131c0.057-0.993,0.284-1.504,1.051-1.618c0.341-0.057,0.511-0.085,0.709-0.085
|
||||
c0.114,0,0.228-0.057,0.228-0.17c0-0.171-0.142-0.229-0.454-0.229c-0.852,0-2.555,0.086-2.811,0.086
|
||||
c-0.255,0-1.987-0.086-3.265-0.086c-0.313,0-0.454,0.058-0.454,0.229c0,0.113,0.114,0.17,0.228,0.17
|
||||
c0.256,0,0.738,0.028,0.965,0.085c0.938,0.198,1.164,0.653,1.221,1.618c0.057,0.908,0.057,1.703,0.057,6.131V58.519z M51.902,53.502
|
||||
c0-0.767-0.568-1.248-1.306-1.248c-0.71,0-1.136,0.539-1.136,1.22c0,0.88,0.71,1.221,1.221,1.221
|
||||
C51.221,54.694,51.902,54.354,51.902,53.502 M51.902,47.797c0-0.767-0.568-1.249-1.306-1.249c-0.71,0-1.136,0.54-1.136,1.221
|
||||
c0,0.88,0.71,1.22,1.221,1.22C51.221,48.988,51.902,48.648,51.902,47.797 M106.209,30.812c2.97-0.814,4.97-3.294,4.97-6.658
|
||||
c0-1.547-0.817-2.86-1.46-3.473c-0.466-0.438-1.779-1.664-5.427-1.664c-1.344,0-3.82,0.09-4.593,0.09
|
||||
c-0.335,0-1.935-0.085-3.215-0.085c-0.313,0-0.455,0.057-0.455,0.228c0,0.114,0.114,0.171,0.228,0.171
|
||||
c0.257,0,0.739,0.028,0.968,0.085c0.938,0.199,1.165,0.654,1.223,1.621c0.057,0.91,0.057,1.708,0.057,6.145v5.007
|
||||
c0,2.731,0,4.978-0.141,6.172c-0.114,0.825-0.258,1.452-0.826,1.564c-0.257,0.058-0.598,0.114-0.854,0.114
|
||||
c-0.17,0-0.228,0.085-0.228,0.17c0,0.172,0.143,0.229,0.455,0.229c0.854,0,2.646-0.085,2.674-0.085c0.142,0,1.935,0.085,3.499,0.085
|
||||
c0.313,0,0.455-0.085,0.455-0.229c0-0.085-0.057-0.17-0.229-0.17c-0.255,0-0.881-0.057-1.278-0.114
|
||||
c-0.854-0.112-1.024-0.739-1.11-1.564c-0.143-1.194-0.143-3.44-0.143-6.172v-0.683c0-0.143,0.057-0.228,0.2-0.228l2.76,0.042
|
||||
c0.171,0,0.321,0.067,0.376,0.186c0.432,0.944,1.029,2.54,1.89,4.303c1.175,2.409,1.378,3.476,2.602,4.13
|
||||
c0.739,0.399,1.515,0.499,3.107,0.499h1.371c0.512,0,0.684-0.057,0.684-0.229c0-0.085-0.114-0.173-0.257-0.17
|
||||
c-0.281,0.008-0.753-0.071-1.292-0.167c-0.462-0.082-1.808-0.408-2.639-1.966C108.541,36.046,107.344,33.212,106.209,30.812
|
||||
M4.476,31.418c0,4.155,1.081,6.147,2.477,7.485c2.02,1.906,4.895,2.021,5.862,2.021c1.679,0,3.813-0.284,5.863-2.105
|
||||
c2.277-2.021,2.618-5.438,2.618-8.511v-3.045c0-4.44,0-5.237,0.058-6.147c0.057-0.997,0.284-1.451,1.052-1.622
|
||||
c0.343-0.058,0.514-0.086,0.713-0.086c0.113,0,0.228-0.057,0.228-0.171c0-0.171-0.143-0.228-0.456-0.228
|
||||
c-0.854,0-2.191,0.085-2.391,0.085c-0.171,0-1.736-0.085-3.017-0.085c-0.313,0-0.455,0.057-0.455,0.228
|
||||
c0,0.114,0.113,0.171,0.227,0.171c0.257,0,0.741,0.028,0.969,0.086c0.939,0.198,1.166,0.654,1.224,1.622
|
||||
c0.057,0.91,0.057,1.707,0.057,6.147v3.558c0,2.932-0.341,5.351-1.651,6.973c-1.023,1.224-2.731,2.049-4.468,2.049
|
||||
c-1.622,0-2.903-0.256-4.298-1.565c-1.224-1.167-2.134-2.931-2.134-7.029v-3.984c0-4.44,0-5.237,0.057-6.147
|
||||
c0.057-0.997,0.284-1.509,1.054-1.622c0.341-0.058,0.512-0.086,0.711-0.086c0.113,0,0.228-0.057,0.228-0.171
|
||||
c0-0.171-0.143-0.228-0.455-0.228c-0.854,0-2.562,0.085-2.818,0.085c-0.256,0-1.992-0.085-3.272-0.085
|
||||
C2.142,19.009,2,19.065,2,19.236c0,0.114,0.113,0.171,0.228,0.171c0.256,0,0.739,0.028,0.968,0.086
|
||||
c0.939,0.198,1.166,0.654,1.223,1.622c0.058,0.91,0.058,1.707,0.058,6.147V31.418z M27.707,23.021
|
||||
c0.911,1.025,4.121,4.611,7.418,8.17c3.012,3.243,7.104,7.428,7.415,7.712c1.513,1.508,1.856,1.821,2.086,1.821
|
||||
c0.202,0,0.259-0.143,0.259-2.021l0.057-16.679c0-1.708,0.114-2.334,1.054-2.532c0.341-0.086,0.54-0.086,0.684-0.086
|
||||
c0.198,0,0.313-0.086,0.313-0.199c0-0.171-0.199-0.199-0.513-0.199c-1.167,0-2.11,0.085-2.426,0.085
|
||||
c-0.316,0-1.683-0.085-2.961-0.085c-0.342,0-0.568,0.028-0.568,0.199c0,0.113,0.028,0.199,0.227,0.199
|
||||
c0.228,0,0.882,0.028,1.393,0.143c0.881,0.228,1.08,0.854,1.108,2.704l0.313,14.457c-0.91-0.938-4.007-4.411-6.82-7.428
|
||||
c-4.376-4.696-8.608-9.278-9.037-9.762c-0.286-0.285-0.774-0.911-1.004-0.911s-0.315,0.313-0.315,1.424l-0.028,16.307
|
||||
c0,2.591-0.143,3.416-0.854,3.615c-0.427,0.143-0.938,0.17-1.167,0.17c-0.142,0-0.228,0.059-0.228,0.171
|
||||
c0,0.2,0.171,0.229,0.456,0.229c1.28,0,2.481-0.086,2.739-0.086s1.397,0.086,3.018,0.086c0.341,0,0.511-0.057,0.511-0.229
|
||||
c0-0.112-0.085-0.171-0.227-0.171c-0.256,0-0.881-0.027-1.421-0.17c-0.768-0.228-1.051-0.967-1.108-3.301L27.707,23.021z
|
||||
M53.576,27.263c0-4.44,0-5.237,0.057-6.147c0.058-0.997,0.285-1.48,1.053-1.622c0.343-0.058,0.514-0.086,0.712-0.086
|
||||
c0.114,0,0.229-0.057,0.229-0.171c0-0.171-0.144-0.228-0.456-0.228c-0.854,0-2.646,0.085-2.788,0.085
|
||||
c-0.144,0-1.937-0.085-2.875-0.085c-0.313,0-0.456,0.057-0.456,0.228c0,0.114,0.114,0.171,0.228,0.171
|
||||
c0.199,0,0.569,0.028,0.883,0.114c0.626,0.143,0.91,0.626,0.968,1.594c0.057,0.91,0.057,1.707,0.057,6.147v5.01
|
||||
c0,2.731,0,4.98-0.143,6.176c-0.113,0.825-0.256,1.451-0.824,1.565c-0.258,0.057-0.598,0.112-0.854,0.112
|
||||
c-0.171,0-0.228,0.086-0.228,0.171c0,0.172,0.142,0.229,0.455,0.229c0.854,0,2.646-0.086,2.79-0.086c0.142,0,1.935,0.086,3.5,0.086
|
||||
c0.313,0,0.454-0.086,0.454-0.229c0-0.085-0.056-0.171-0.227-0.171c-0.257,0-0.883-0.056-1.281-0.112
|
||||
c-0.854-0.114-1.024-0.74-1.109-1.565c-0.143-1.195-0.143-3.444-0.143-6.176V27.263z M162.65,21.653c0.77,0,1.254-0.569,1.254-1.309
|
||||
c0-0.712-0.542-1.139-1.226-1.139c-0.881,0-1.224,0.711-1.224,1.223C161.455,20.97,161.798,21.653,162.65,21.653 M169.952,21.653
|
||||
c0.77,0,1.253-0.569,1.253-1.309c0-0.712-0.54-1.139-1.224-1.139c-0.883,0-1.224,0.711-1.224,1.223
|
||||
C168.758,20.97,169.099,21.653,169.952,21.653 M163.043,31.104c-0.086,0-0.143-0.057-0.086-0.199l2.506-7.684
|
||||
c0.142-0.427,0.284-0.427,0.427,0l2.703,7.684c0.029,0.114,0.029,0.199-0.113,0.199H163.043z M159.06,37.395
|
||||
c-0.514,1.424-1.083,2.505-2.392,2.676c-0.228,0.028-0.625,0.056-0.826,0.056c-0.142,0-0.257,0.059-0.257,0.171
|
||||
c0,0.172,0.173,0.229,0.542,0.229c1.338,0,2.903-0.086,3.218-0.086c0.312,0,1.535,0.086,2.219,0.086
|
||||
c0.257,0,0.427-0.057,0.427-0.229c0-0.112-0.086-0.171-0.284-0.171h-0.285c-0.484,0-1.082-0.255-1.082-0.824
|
||||
c0-0.513,0.143-1.195,0.399-1.907l1.707-5.038c0.058-0.142,0.144-0.228,0.284-0.228h6.119c0.143,0,0.2,0.058,0.257,0.171
|
||||
l2.646,7.002c0.171,0.455,0,0.712-0.169,0.769c-0.114,0.028-0.2,0.085-0.2,0.199c0,0.17,0.313,0.17,0.853,0.199
|
||||
c1.965,0.057,4.042,0.057,4.47,0.057c0.312,0,0.568-0.057,0.568-0.229c0-0.142-0.113-0.171-0.284-0.171
|
||||
c-0.284,0-0.712-0.027-1.139-0.17c-0.598-0.171-1.424-0.626-2.448-3.159c-1.735-4.326-6.204-16.08-6.631-17.162
|
||||
c-0.341-0.882-0.455-1.024-0.627-1.024c-0.17,0-0.284,0.171-0.625,1.11L159.06,37.395z M63.469,22.481
|
||||
c-0.427-1.11-0.769-1.992-0.769-2.363c0-0.198,0.057-0.427,0.37-0.568c0.257-0.114,0.769-0.143,1.081-0.143
|
||||
c0.199,0,0.285-0.057,0.285-0.199s-0.257-0.199-0.769-0.199c-1.082,0-2.362,0.085-2.647,0.085c-0.341,0-1.964-0.085-3.329-0.085
|
||||
c-0.456,0-0.74,0.028-0.74,0.199c0,0.113,0.057,0.199,0.228,0.199s0.655,0,1.082,0.114c0.996,0.284,1.423,0.597,2.049,2.19
|
||||
l6.973,17.447c0.541,1.366,0.683,1.765,1.025,1.765c0.283,0,0.397-0.455,1.194-2.163c0.655-1.396,1.936-4.468,3.673-8.623
|
||||
c1.45-3.501,2.874-6.916,3.187-7.713c0.77-1.936,1.196-2.42,1.565-2.677c0.541-0.341,1.167-0.341,1.366-0.341
|
||||
c0.228,0,0.341-0.057,0.341-0.199s-0.17-0.199-0.483-0.199c-0.824,0-2.049,0.085-2.22,0.085c-0.341,0-1.651-0.085-2.789-0.085
|
||||
c-0.456,0-0.626,0.057-0.626,0.228c0,0.143,0.142,0.171,0.313,0.171c0.313,0,0.739,0,1.081,0.114
|
||||
c0.284,0.143,0.369,0.426,0.369,0.654c0,0.256-0.113,0.655-0.256,1.081c-0.625,2.05-4.439,11.982-6.091,15.797L63.469,22.481z
|
||||
M83.183,32.272c0,2.731,0,4.98-0.143,6.176c-0.113,0.825-0.256,1.451-0.825,1.565c-0.256,0.057-0.598,0.112-0.854,0.112
|
||||
c-0.171,0-0.228,0.086-0.228,0.171c0,0.172,0.142,0.229,0.455,0.229c0.427,0,1.082-0.057,1.65-0.057
|
||||
c0.598-0.029,1.082-0.029,1.139-0.029c0.427,0,1.11,0.029,2.22,0.086c1.111,0.029,2.676,0.085,4.81,0.085
|
||||
c1.11,0,1.339,0,1.537-0.739c0.143-0.598,0.37-2.532,0.37-2.762c0-0.198,0-0.426-0.171-0.426c-0.143,0-0.199,0.113-0.256,0.426
|
||||
c-0.199,1.167-0.541,1.736-1.28,2.05c-0.74,0.313-1.992,0.313-2.732,0.313c-2.789,0-3.217-0.369-3.302-2.333
|
||||
c-0.027-0.598,0-3.899,0-4.866v-2.505c0-0.114,0.057-0.199,0.199-0.199c0.483,0,3.302,0.056,4.07,0.142
|
||||
c1.11,0.114,1.366,0.598,1.479,0.997c0.114,0.37,0.114,0.654,0.114,0.938c0,0.143,0.057,0.257,0.199,0.257
|
||||
c0.199,0,0.199-0.313,0.199-0.541c0-0.199,0.056-1.253,0.113-1.822c0.086-0.939,0.229-1.422,0.229-1.593s-0.058-0.229-0.143-0.229
|
||||
c-0.114,0-0.228,0.142-0.427,0.37c-0.257,0.285-0.654,0.342-1.338,0.398c-0.654,0.057-4.155,0.057-4.525,0.057
|
||||
c-0.143,0-0.171-0.085-0.171-0.284v-7.854c0-0.199,0.057-0.286,0.171-0.286c0.313,0,3.415,0.029,3.899,0.087
|
||||
c1.536,0.17,1.821,0.512,2.02,0.967c0.144,0.342,0.172,0.825,0.172,1.024c0,0.229,0.056,0.37,0.228,0.37
|
||||
c0.114,0,0.171-0.171,0.198-0.313c0.058-0.342,0.115-1.595,0.144-1.879c0.085-0.797,0.228-1.139,0.228-1.338
|
||||
c0-0.142-0.028-0.256-0.114-0.256c-0.142,0-0.257,0.114-0.398,0.143c-0.229,0.057-0.683,0.113-1.224,0.142
|
||||
c-0.654,0.028-6.318,0.028-6.518,0.028l-1.166-0.057c-0.628-0.028-1.396-0.028-2.051-0.028c-0.313,0-0.455,0.057-0.455,0.228
|
||||
c0,0.114,0.114,0.171,0.229,0.171c0.256,0,0.739,0.028,0.967,0.086c0.939,0.198,1.167,0.654,1.224,1.622
|
||||
c0.058,0.91,0.058,1.707,0.058,6.147V32.272z M120.217,40.924c1.535,0,3.071-0.342,4.296-1.195c1.964-1.395,2.419-3.558,2.419-4.725
|
||||
c0-2.276-0.798-4.041-4.155-6.688l-0.797-0.627c-2.731-2.134-3.472-3.159-3.472-4.781c0-2.077,1.537-3.302,3.5-3.302
|
||||
c2.619,0,3.388,1.195,3.559,1.509c0.17,0.313,0.341,1.081,0.37,1.423c0.027,0.228,0.057,0.37,0.228,0.37
|
||||
c0.143,0,0.199-0.2,0.199-0.654c0-1.937,0.113-2.875,0.113-3.018s-0.058-0.199-0.285-0.199s-0.455-0.028-0.995-0.142
|
||||
c-0.712-0.171-1.538-0.285-2.647-0.285c-3.614,0-5.891,2.077-5.891,5.123c0,1.936,0.683,3.7,3.699,6.176l1.28,1.054
|
||||
c2.448,2.021,3.273,3.159,3.273,5.122c0,1.821-1.338,3.786-4.07,3.786c-1.906,0-3.785-0.797-4.212-2.902
|
||||
c-0.085-0.399-0.085-0.798-0.085-1.054c0-0.228-0.029-0.313-0.199-0.313c-0.143,0-0.199,0.143-0.228,0.455
|
||||
c-0.028,0.456-0.143,1.594-0.143,3.018c0,0.768,0.029,0.882,0.427,1.081C117.568,40.725,118.878,40.924,120.217,40.924
|
||||
M135.028,27.263c0-4.44,0-5.237,0.058-6.147c0.058-0.997,0.285-1.48,1.055-1.622c0.34-0.058,0.511-0.086,0.71-0.086
|
||||
c0.114,0,0.228-0.057,0.228-0.171c0-0.171-0.142-0.228-0.456-0.228c-0.853,0-2.646,0.085-2.788,0.085
|
||||
c-0.142,0-1.936-0.085-2.874-0.085c-0.313,0-0.456,0.057-0.456,0.228c0,0.114,0.114,0.171,0.228,0.171
|
||||
c0.2,0,0.569,0.028,0.883,0.114c0.627,0.143,0.91,0.626,0.968,1.594c0.057,0.91,0.057,1.707,0.057,6.147v5.01
|
||||
c0,2.731,0,4.98-0.143,6.176c-0.114,0.825-0.255,1.451-0.826,1.565c-0.255,0.057-0.597,0.112-0.854,0.112
|
||||
c-0.17,0-0.227,0.086-0.227,0.171c0,0.172,0.142,0.229,0.456,0.229c0.853,0,2.646-0.086,2.788-0.086
|
||||
c0.143,0,1.936,0.086,3.501,0.086c0.313,0,0.455-0.086,0.455-0.229c0-0.085-0.058-0.171-0.228-0.171
|
||||
c-0.257,0-0.882-0.056-1.281-0.112c-0.853-0.114-1.023-0.74-1.11-1.565c-0.143-1.195-0.143-3.444-0.143-6.176V27.263z
|
||||
M149.724,20.232l3.579,0.057c2.726,0.058,3.409,0.712,3.495,1.565l0.026,0.313c0.031,0.398,0.09,0.483,0.233,0.483
|
||||
c0.116,0,0.204-0.113,0.204-0.369c0-0.313,0.087-2.277,0.087-3.131c0-0.171,0-0.342-0.146-0.342c-0.115,0-0.379,0.086-0.805,0.142
|
||||
c-0.454,0.086-1.106,0.143-2.016,0.143h-10.666c-0.341,0-1.423-0.057-2.246-0.143c-0.77-0.056-1.055-0.341-1.254-0.341
|
||||
c-0.113,0-0.228,0.37-0.286,0.541c-0.056,0.228-0.625,2.675-0.625,2.96c0,0.171,0.057,0.256,0.142,0.256
|
||||
c0.114,0,0.2-0.057,0.286-0.284c0.086-0.2,0.172-0.398,0.483-0.882c0.455-0.684,1.139-0.884,2.903-0.912l4.212-0.057v12.04
|
||||
c0,2.731,0,4.98-0.143,6.176c-0.114,0.825-0.256,1.451-0.824,1.565c-0.258,0.057-0.599,0.112-0.855,0.112
|
||||
c-0.171,0-0.227,0.086-0.227,0.171c0,0.172,0.143,0.229,0.455,0.229c0.854,0,2.646-0.086,2.789-0.086s1.934,0.086,3.496,0.086
|
||||
c0.313,0,0.454-0.086,0.454-0.229c0-0.085-0.057-0.171-0.227-0.171c-0.256,0-0.88-0.056-1.278-0.112
|
||||
c-0.852-0.114-1.022-0.74-1.106-1.565c-0.143-1.195-0.143-3.444-0.143-6.176V20.232z M184.798,20.232l3.581,0.057
|
||||
c2.726,0.058,3.407,0.712,3.493,1.565l0.028,0.313c0.029,0.398,0.087,0.483,0.233,0.483c0.116,0,0.203-0.113,0.203-0.369
|
||||
c0-0.313,0.087-2.277,0.087-3.131c0-0.171,0-0.342-0.145-0.342c-0.116,0-0.379,0.086-0.805,0.142
|
||||
c-0.455,0.086-1.108,0.143-2.017,0.143h-10.666c-0.341,0-1.422-0.057-2.246-0.143c-0.77-0.056-1.055-0.341-1.253-0.341
|
||||
c-0.116,0-0.229,0.37-0.286,0.541c-0.057,0.228-0.625,2.675-0.625,2.96c0,0.171,0.056,0.256,0.141,0.256
|
||||
c0.115,0,0.2-0.057,0.286-0.284c0.085-0.2,0.172-0.398,0.484-0.882c0.455-0.684,1.138-0.884,2.902-0.912l4.212-0.057v12.04
|
||||
c0,2.731,0,4.98-0.143,6.176c-0.113,0.825-0.255,1.451-0.826,1.565c-0.255,0.057-0.597,0.112-0.854,0.112
|
||||
c-0.17,0-0.228,0.086-0.228,0.171c0,0.172,0.144,0.229,0.457,0.229c0.853,0,2.646-0.086,2.788-0.086
|
||||
c0.144,0,1.935,0.086,3.496,0.086c0.313,0,0.454-0.086,0.454-0.229c0-0.085-0.056-0.171-0.226-0.171c-0.256,0-0.88-0.056-1.28-0.112
|
||||
c-0.852-0.114-1.022-0.74-1.105-1.565c-0.144-1.195-0.144-3.444-0.144-6.176V20.232z M102.913,19.932
|
||||
c0.878-0.01,2.808-0.156,4.354,1.42c1.548,1.576,1.636,3.531,1.636,4.495c0,2.685-2.206,4.695-5.037,4.695
|
||||
c-1.17,0-2.461-0.199-2.887-0.455c-0.144-0.085-0.2-0.199-0.2-0.341v-9.303c0-0.171,0.086-0.284,0.229-0.341
|
||||
C101.292,20.017,102.06,19.941,102.913,19.932"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" fill="#A11E3B" d="M237.585,63.408c0.547-0.123,0.857-0.265,1.308-0.6
|
||||
c0.647-0.48,0.959-0.907,1.218-1.67c0.091,0.906-0.058,1.772-0.874,2.215C238.669,63.66,238.165,63.591,237.585,63.408
|
||||
M235.53,56.925c1.341-1.311,1.729-2.884,1.153-4.668c-0.354-1.097-0.819-1.717-1.771-2.365c0.273-0.301,0.439-0.461,0.746-0.728
|
||||
c0.259-0.225,0.41-0.345,0.69-0.542l0.335,0.9c0.428,1.151,1.082,1.86,1.113,2.947C237.852,54.414,236.641,56.05,235.53,56.925
|
||||
M255.319,31.198c-2.092,3.557-4.832,5.294-6.18,5.27c0.247-0.381,0.328-0.903,0.305-1.211c-1.206,0.023-2.019-0.567-2.625-1.603
|
||||
c-0.489-0.832-0.348-2.451-0.348-2.451c-1.101-0.154-1.735,0.975-1.735,2.018v10.386c0,0.782,0.086,1.302,0.367,1.852
|
||||
c1.129,2.202,3.647,3.552,5.753,3.273c-0.928,1.021-1.864,1.732-3.36,1.893c-0.849,0.09-1.37,0.027-2.172-0.263
|
||||
c1.033,0.938,2.068,1.421,3.476,1.167c1.439-0.258,2.259-1.53,3.002-1.736c0.453-0.126,0.846-0.053,1.37,0.048
|
||||
c-0.652,0.072-1.124,0.431-1.448,0.86c-0.268,0.356-0.336,0.984-0.355,1.362c0.472,0.113,0.993,0.142,1.563-0.078
|
||||
c0.427-0.163,0.661-0.324,0.967-0.666c0.646,0.424,1.07,1.515,1.07,1.515c-0.625-0.264-1.287-0.287-1.873-0.088
|
||||
c-1.785,0.607-2.51,1.759-5.909,1.16c-1.491-0.262-1.966-1.322-3.172-1.506c0.405,0.242,0.645,0.587,0.817,1.089
|
||||
c0.128,0.369,0.154,0.608,0.107,0.996c1.94-0.475,3.137,0.638,4.431,0.722c1.725,0.112,1.938-1.39,4.682-1.359
|
||||
c0.856,0.01,2.065,0.609,2.44,1.553c-0.915-0.433-2.268-0.307-2.992-0.105c-1.123,0.311-1.794,0.685-2.587,1.556
|
||||
c0.811,0.319,1.33,0.409,2.202,0.384c0.737-0.021,1.166-0.108,1.854-0.374c-0.967,0.925-1.898,1.438-3.413,1.954
|
||||
c-1.017,0.346-1.686,0.227-2.726,0.005c0.307-0.165,0.473-0.465,0.473-0.465c-1.542-0.267-1.679-1.193-2.926-1.448
|
||||
c-0.331-0.066-0.521-0.092-0.858-0.114c1.255,2.354,4.11,3.707,6.381,3.176c1.091-0.255,2.524-0.711,3.629-1.854
|
||||
c-0.33,1.621-0.938,2.472-2.268,3.061c-1.778,0.787-3.157,0.925-4.98,0.238c0.81,0.715,1.737,1.014,2.973,1.235
|
||||
c0.811,0.146,1.292,0.164,2.111,0.078c-2.111,1.284-5.568,0.598-7.846-1.093c-1.621-1.205-2.52-2.41-3.215-4.389
|
||||
c0.252,2.153,0.727,4.495,2.878,5.85c1.015,0.639,1.986,1.062,2.924,0.944c-0.783,0.541-1.911,0.678-2.819,0.678
|
||||
c-1.814,0-3.503-1.699-4.285-3.698c0.164,2.238-0.718,3.698-2.282,3.698c-0.882,0-1.338-0.386-2.186-0.396
|
||||
c-0.53-0.006-0.91,0.11-1.448,0.326c0.25-0.553,0.357-0.92,0.802-1.332c0.916-0.848,2.672-0.854,3.318-2.287
|
||||
c0.416-0.92,0.35-1.552,0.224-2.577c-0.656,1.843-1.854,2.693-3.891,3.628c-1.113,0.512-1.679,1.604-1.931,2.539
|
||||
c-0.098-1.251-0.029-2.087,0.627-3.156c0.783-1.274,2.665-1.64,3.438-2.953c0.6-1.019,0.736-1.76,0.734-2.942
|
||||
c-0.407,1.391-1.015,2.394-1.739,2.895c-1.557,1.077-3.212,1.526-3.976,2.858c-0.618,1.08-0.653,1.918-0.443,3.135
|
||||
c-0.832-0.786-1.129-1.646-0.956-2.778c0.147-0.973,0.529-1.581,1.342-2.135c-1.152,0.117-1.955,0.769-2.307,1.872
|
||||
c-0.284,0.895-0.174,1.61,0.367,2.378c-1.961-0.515-1.819-3.238-0.579-4.576c2.124-2.297,5.889-2.126,4.313-6.323
|
||||
c-0.185,1.575-0.455,2.498-1.64,3.332c-1.883,1.321-4.787,1.186-5.312,4.314c-0.151-2.404,0.586-3.184,1.98-4.5
|
||||
c0.86-0.812,2.49-1.207,2.383-3.531c-0.539,1.274-1.304,1.785-2.363,2.248c-1.228,0.534-1.979,0.29-2.992,1.574
|
||||
c-0.049-0.938,0.272-1.813,1.159-2.338c0.811-0.481,1.678-0.376,2.295-1.301c0,0-0.702-0.271-1.717,0.123
|
||||
c0.967-1.216,1.678-0.904,2.635-1.368c0.59-0.284,0.828-0.533,1.255-0.977c-0.839-0.097-1.632-0.108-2.49,0.097
|
||||
c-1.012,0.243-2.095,1.1-2.095,1.1c0.618-1.733,3.044-3.195,5.434-3.871c3.24-0.914,4.555-1.244,5.159-2.365
|
||||
c0.414-0.768,0.488-1.021,0.488-2.795V32.367c0-1.172-1.859-0.811-2.407-0.264c-0.495,0.495-0.656,1.094-0.272,1.887
|
||||
c-2.332,0.031-2.955-1.805-2.955-1.805c-0.016,0.203-0.02,0.414-0.018,0.635c-0.826-0.402-1.266-0.803-1.743-1.589
|
||||
c-0.302-0.497-0.426-0.82-0.534-1.392c-0.726,0.575-2.65,0.76-2.961,0.533c-0.788-0.576-1.245-2.045-1.448-3.513
|
||||
c-0.187-1.357-0.105-2.2,0.34-3.495c-1.107-1.979-1.352-4.262-1.352-6.582c0-1.938,1.182-4.409,2.799-5.984
|
||||
c0.657-3.239,4.154-5.18,6.711-5.18c2.428,0,4.431,1.393,5.62,3.986c1.104-2.554,3.739-3.986,6.433-3.986
|
||||
c2.519,0,4.267,0.954,5.707,3.02c1.179,0.247,1.919,0.531,2.752,1.4c1.103,1.153,1.894,2.224,1.943,4.159
|
||||
c0.015,0.534-0.231,0.818-0.52,1.269c0.962,1.363,1.386,2.377,1.386,4.045c0,1.704-0.154,2.584-0.916,3.985
|
||||
c0.083,0.162,0.12,0.261,0.165,0.437c0.064,0.254,0.08,0.406,0.066,0.668c-0.548,0.181-1.151,0.144-1.302,0.699
|
||||
C255.97,25.787,256.999,28.176,255.319,31.198 M245.106,30.978c0.112-1.009,0.563-1.955,1.197-2.678
|
||||
c0.331,0.091,0.583,0.222,0.908,0.46c0.238,0.174,0.39,0.311,0.545,0.505C246.68,29.453,245.608,30.124,245.106,30.978
|
||||
M251.367,29.599c0.16,1.255-0.09,2.697-0.701,3.717c0.139-0.857,0.091-1.853-0.22-2.645c0.35-0.176,0.562-0.389,0.771-0.759
|
||||
C251.282,29.798,251.33,29.698,251.367,29.599 M249.261,26.957c0.118,0.013,0.235,0.035,0.353,0.065
|
||||
c0.705,0.184,1.194,0.742,1.483,1.479c-0.426,0.197-0.702,0.402-1.064,0.775c-0.131,0.135-0.219,0.235-0.308,0.354
|
||||
c-0.182-0.144-0.39-0.253-0.626-0.321c-0.135-0.038-0.273-0.065-0.414-0.082c0.02-0.572,0.09-0.941,0.277-1.522
|
||||
C249.061,27.401,249.142,27.195,249.261,26.957 M247.431,27.37c0.48-0.272,0.999-0.428,1.52-0.431
|
||||
c-0.158,0.18-0.274,0.367-0.403,0.635c-0.09,0.186-0.131,0.298-0.187,0.496c-0.147-0.23-0.266-0.35-0.497-0.496
|
||||
C247.708,27.476,247.573,27.409,247.431,27.37 M232.526,22.254c0.15-0.109,0.301-0.209,0.456-0.302
|
||||
c0.104,0.145,0.165,0.252,0.252,0.431c0.189,0.388,0.276,0.666,0.312,1.044c-0.378,0.167-0.717,0.395-1.017,0.666
|
||||
c-0.095-0.211-0.137-0.379-0.168-0.64C232.306,22.979,232.348,22.641,232.526,22.254 M233.201,21.828
|
||||
c0.762-0.41,1.6-0.609,2.598-0.464l0.082,0.013c-0.21,0.359-0.387,0.603-0.688,0.961c-0.226,0.268-0.362,0.41-0.618,0.647
|
||||
c-0.271-0.246-0.426-0.382-0.707-0.617C233.606,22.148,233.437,22.011,233.201,21.828 M236.473,21.51
|
||||
c0.733,0.209,1.409,0.585,1.995,1.113c-0.077,0.343-0.147,0.699-0.188,1.01c-0.063,0.486-0.09,0.822-0.094,1.229
|
||||
c-0.667-0.807-1.431-1.406-2.322-1.641L236.473,21.51z M238.876,23.031c0.728,0.813,1.272,1.898,1.546,3.229
|
||||
c-0.227-0.199-0.452-0.315-0.787-0.424c-0.313-0.102-0.547-0.139-0.822-0.12l-0.211-0.311c0.105-0.318,0.164-0.587,0.223-0.983
|
||||
C238.904,23.876,238.92,23.514,238.876,23.031 M240.463,26.478c0.147,0.827,0.191,1.743,0.113,2.744
|
||||
c-0.373-0.897-0.785-1.814-1.253-2.656L240.463,26.478z M232.019,24.641c-0.075,0.095-0.147,0.192-0.216,0.293l-0.697-0.861
|
||||
l-0.692-0.297c0.102-0.255,0.333-0.717,0.488-0.893c-0.285-0.124-0.639-0.867-0.77-1.251c0.368,0.06,0.586,0.066,0.958,0.028
|
||||
c0.25-0.023,0.392-0.05,0.633-0.118l-0.662-2.337c0.597,0.178,0.927,0.329,1.452,0.662c0.438,0.277,0.828,0.359,1.035,0.834
|
||||
c0.053,0.125,0.08,0.215,0.099,0.329c-0.765,0.351-1.381,0.916-1.702,1.685c-0.045,0.333-0.056,0.524-0.049,0.858
|
||||
C231.903,23.997,231.932,24.254,232.019,24.641 M231.282,25.868c-0.522,1.156-0.729,2.479-0.672,3.56
|
||||
c-0.713-0.374-1.285-0.838-1.71-1.392c0.198-0.054,0.362-0.108,0.597-0.194c0.332-0.121,0.516-0.199,0.833-0.355
|
||||
c-0.048-0.49-0.135-0.775-0.368-1.21c-0.151-0.282-0.369-0.366-0.478-0.669c-0.071-0.196-0.091-0.319-0.09-0.528
|
||||
c0.278-0.042,0.45-0.03,0.72,0.051c0.234,0.07,0.347,0.165,0.555,0.293C230.925,25.579,231.078,25.689,231.282,25.868
|
||||
M228.604,27.601c-0.385-0.652-0.595-1.407-0.623-2.254c0.385,0.228,0.624,0.436,0.944,0.811c0.304,0.355,0.448,0.589,0.633,1.019
|
||||
c-0.146,0.104-0.233,0.157-0.396,0.231C228.957,27.503,228.783,27.565,228.604,27.601 M228,24.581
|
||||
c0.046-0.548,0.153-0.935,0.403-1.495c0-0.603,0.146-1.252,0.371-1.873l0.947,1.612l-0.401,0.92
|
||||
c-0.326,0.179-0.508,0.287-0.82,0.491C228.298,24.368,228.167,24.459,228,24.581 M228.902,20.887
|
||||
c0.384-0.922,0.926-1.746,1.403-2.216c0.068,0.363,0.124,0.631,0.235,1.048c0.133,0.499,0.229,0.775,0.431,1.251
|
||||
c-0.306-0.061-0.485-0.073-0.796-0.061c-0.278,0.013-0.429,0.122-0.708,0.104C229.239,21,229.08,20.966,228.902,20.887
|
||||
M230.978,18.107c0.764-0.544,1.676-0.911,2.636-1.069c-0.1,0.642-0.161,1.059-0.26,1.75l-0.119,0.856l-0.439-0.044
|
||||
c-0.253-0.162-0.393-0.259-0.633-0.44C231.661,18.782,231.367,18.523,230.978,18.107 M234.352,16.959
|
||||
c0.741-0.037,1.492,0.051,2.213,0.279c-0.139-0.186-0.315-0.369-0.52-0.537l0.011-0.719c0.06-0.245,0.088-0.384,0.134-0.633
|
||||
c0.038-0.211,0.062-0.349,0.086-0.53l0.093,0.013c0.223,0.035,0.439,0.079,0.647,0.129c0.146,0.332,0.408,0.908,0.558,1.082
|
||||
c0.121,0.142,0.194,0.219,0.327,0.35c0,0-0.306,0.547-0.356,0.794c-0.106,0.505-0.052,0.981,0.147,1.355l-0.972-0.692
|
||||
c-0.085,0.276-0.173,0.552-0.145,0.692c0.115,0.558,0.171,0.887,0.128,1.453c-0.021,0.273-0.047,0.453-0.102,0.681
|
||||
c-0.958-0.154-1.938-0.06-2.766,0.272c-0.045-0.3-0.042-0.524,0.001-0.865c0.051-0.395,0.227-0.587,0.283-0.982
|
||||
c0.042-0.296-0.017-0.471,0.029-0.766C234.183,18.118,234.269,17.39,234.352,16.959 M235.523,16.35
|
||||
c-0.226-0.122-0.466-0.215-0.714-0.265c-0.181-0.037-0.358-0.065-0.531-0.085c0.043-0.196,0.053-0.374,0.044-0.62
|
||||
c-0.011-0.229-0.031-0.393-0.082-0.573c0.278-0.039,0.565-0.062,0.855-0.065l0.506,0.505c0.082,0.324,0.082,0.532,0,0.854
|
||||
C235.577,16.197,235.553,16.275,235.523,16.35 M233.769,15.965c-1.202-0.026-2.173,0.352-3.027,0.837
|
||||
c0.66-0.966,1.721-1.609,2.958-1.896c0.067,0.171,0.096,0.318,0.108,0.533C233.82,15.647,233.812,15.796,233.769,15.965
|
||||
M238.683,15.604c0.937,0.537,1.639,1.323,2.112,2.385c-0.055,0.153-0.141,0.295-0.267,0.45c-0.089,0.11-0.148,0.168-0.261,0.253
|
||||
l-0.96-0.84c0.053-0.304,0-0.522-0.188-0.767c-0.146-0.193-0.279-0.284-0.513-0.351c-0.028-0.269-0.028-0.424,0-0.691
|
||||
C238.627,15.867,238.647,15.739,238.683,15.604 M241.53,21.729c0.007,0.185,0.01,0.374,0.01,0.566c0,0.94,0.02,1.759,0.04,2.555
|
||||
l-0.982-0.364c-0.118-0.329-0.243-0.629-0.372-0.903c0.043-0.259,0.092-0.454,0.184-0.745c0.137-0.434,0.24-0.674,0.461-1.072
|
||||
L241.53,21.729z M241.598,25.539c0.028,1.077,0.05,2.165,0.024,3.518c-0.194-1.417-0.432-2.592-0.705-3.565L241.598,25.539z
|
||||
M239.831,22.845c-0.413-0.674-0.867-1.138-1.35-1.464c0.366-0.386,0.608-0.61,1.034-0.97c0.331-0.278,0.525-0.429,0.879-0.678
|
||||
c-0.063,0.64-0.114,0.999-0.231,1.631C240.055,21.955,239.975,22.313,239.831,22.845 M238.16,21.186
|
||||
c-0.254-0.138-0.515-0.243-0.782-0.327c-0.09-0.306-0.136-0.534-0.184-0.894c-0.051-0.363-0.063-0.572-0.061-0.938
|
||||
c0.209,0.104,0.325,0.175,0.514,0.313c0.144,0.104,0.221,0.169,0.351,0.291c0.294-0.127,0.491-0.16,0.811-0.134
|
||||
c0.249,0.021,0.394,0.06,0.618,0.171c-0.357,0.276-0.542,0.461-0.819,0.818C238.405,20.746,238.294,20.919,238.16,21.186
|
||||
M228.436,19.074c0.018-1.903,0.399-3.186,1.424-4.628l0.286,0.093c0.057,0.293,0.114,0.458,0.253,0.723
|
||||
c0.127,0.24,0.225,0.379,0.4,0.563C229.748,16.735,228.94,17.898,228.436,19.074 M230.253,13.922
|
||||
c0.485-0.611,0.982-1.137,1.511-1.575c0.086,0.274,0.149,0.508,0.199,0.741l0.922,0.893l0.288,0.44
|
||||
c-0.716,0.252-1.374,0.621-1.965,1.071c-0.172-0.259-0.457-0.685-0.492-0.841c-0.035-0.154-0.251-0.54-0.453-0.725L230.253,13.922z
|
||||
M232.407,11.865c1.102-0.734,2.34-1.117,3.812-1.117c0.503,0,0.967,0.054,1.393,0.155l0.007,0.286
|
||||
c-0.072,0.473-0.151,0.74-0.351,1.177c-0.143,0.313-0.243,0.485-0.446,0.766c-0.167-0.145-1.782-1.352-2.001-1.354
|
||||
c-0.151,0.458-0.786,2.051-1.094,2.476l-0.115,0.03c-0.119-0.444-0.267-0.712-0.584-1.068c-0.264-0.296-0.453-0.439-0.806-0.618
|
||||
l0.119-0.351L232.407,11.865z M238.555,11.226c0.941,0.433,1.634,1.125,2.096,1.929c-0.057,0.087-0.114,0.167-0.196,0.271
|
||||
c-0.116,0.148-0.188,0.23-0.32,0.365c-0.149-0.099-0.228-0.168-0.343-0.306c-0.267-0.32-0.768-1.442-0.967-1.765
|
||||
C238.707,11.533,238.626,11.384,238.555,11.226 M240.985,13.85c0.419,1.068,0.487,2.244,0.241,3.239
|
||||
c-1.111-1.561-2.38-2.469-4.025-2.841l0.669-2.456c0.558,0.436,0.839,0.745,1.222,1.34c0.255,0.397,0.68,1.305,0.996,2.101
|
||||
c0.054-0.173,0.131-0.344,0.238-0.545C240.526,14.316,240.696,14.095,240.985,13.85 M236.504,14.125
|
||||
c-0.333-0.044-0.68-0.068-1.043-0.074c-0.449-0.008-0.884,0.029-1.303,0.106l0.686-1.18l0.356-0.454
|
||||
c0.328,0.262,0.498,0.432,0.761,0.76C236.208,13.594,236.35,13.809,236.504,14.125 M238.97,29.362
|
||||
c-0.226-0.26-0.492-0.474-0.779-0.646c-0.193-0.658-0.485-1.4-0.591-1.605c-0.166-0.324-0.348-0.501-0.579-0.715
|
||||
c-0.29,0.155-0.484,0.252-0.733,0.503c-0.168,0.166-0.575,0.508-0.686,0.717c-0.133-0.259-0.22-0.399-0.396-0.632
|
||||
c-0.354-0.475-0.608-0.715-1.101-1.043c-0.149,0.134-0.218,0.245-0.269,0.44c-0.037,0.146-0.041,0.237-0.014,0.385
|
||||
c-0.368-0.028-0.58-0.087-0.91-0.252c-0.309-0.156-0.508-0.299-0.704-0.522c0.169-0.21,0.362-0.398,0.584-0.559
|
||||
C236.211,22.962,239.052,26.224,238.97,29.362 M234.97,28.304c-0.061,0.021-0.119,0.045-0.176,0.069
|
||||
c-0.527,0.235-0.97,0.55-1.32,0.923l-2.056,0.263c-0.141-0.888-0.058-1.865,0.286-2.696c0.728,0.073,1.181,0.205,1.872,0.53
|
||||
C234.171,27.673,234.515,27.895,234.97,28.304 M232.963,29.987c-0.3,0.53-0.459,1.131-0.467,1.764
|
||||
c-0.417-0.351-0.729-0.888-0.921-1.512L232.963,29.987z M227.299,20.293c-0.372-0.69-0.652-1.364-0.815-2.03
|
||||
c0.154-0.063,0.289-0.1,0.485-0.137c0.276-0.051,0.473-0.064,0.708-0.039C227.518,18.748,227.403,19.458,227.299,20.293
|
||||
M226.382,17.753c-0.18-1.155,0.01-2.3,0.688-3.488c0.058-0.103,0.119-0.206,0.188-0.308c0.099,0.249,0.205,0.428,0.389,0.679
|
||||
c0.167,0.228,0.719,0.557,1.053,0.785c-0.361,0.685-0.624,1.31-0.824,1.956L226.382,17.753z M227.673,13.386
|
||||
c0.519-0.644,1.17-1.243,1.853-1.743c0.02,0.108,0.049,0.218,0.092,0.352c0.065,0.207,0.356,0.735,0.54,1.059
|
||||
c-0.365,0.517-0.696,1.044-1.021,1.591c-0.278-0.268-0.471-0.448-0.785-0.736C228.238,13.802,227.872,13.54,227.673,13.386
|
||||
M230.386,11.075c0.863-0.508,1.714-0.826,2.357-0.847c-0.801,0.68-1.442,1.353-1.994,2.039c-0.014-0.164-0.035-0.306-0.074-0.505
|
||||
C230.648,11.633,230.506,11.332,230.386,11.075 M244.364,30.745c-0.232-0.436-0.454-0.71-0.403-1.202
|
||||
c0.031-0.296,0.093-0.634,0.187-0.992c0.082,0.082,0.162,0.144,0.281,0.221c0.191,0.124,0.337,0.191,0.524,0.237
|
||||
C244.656,29.658,244.496,30.305,244.364,30.745 M244.256,28.167c0.211-0.68,0.528-1.415,0.958-2.1
|
||||
c0.856-1.366,1.903-2.493,3.303-3.007c0.123,0.483,0.577,1.678,0.577,1.678c-0.02,0.214-0.034,0.867-0.027,1.257
|
||||
c-1.38-0.093-2.374,0.736-3.368,1.843c-0.17,0.19-0.318,0.396-0.447,0.606c-0.263,0.043-0.48,0.003-0.751-0.126
|
||||
C244.398,28.268,244.334,28.23,244.256,28.167 M249.109,22.885c0.429-0.097,0.889-0.141,1.383-0.12
|
||||
c0.883,0.035,1.821,0.433,2.564,1.019c0.04,0.258,0.091,0.444-0.018,0.801c-0.125,0.413-0.198,0.719-0.444,1.15
|
||||
c-0.175-0.566-0.446-1.434-0.584-1.44c-0.204-0.01-1.237,0.372-1.626,0.435c0.031,0.187,0.069,0.381,0.118,0.613
|
||||
c0.23-0.07,0.984-0.314,1.235-0.4c0.13,0.35,0.476,1.468,0.496,1.909c0.268-0.146,0.278-0.152,0.583-0.174
|
||||
c0.175-0.014,0.494,0.021,0.668,0.051c-0.103,0.227-0.126,0.501-0.238,0.724c-0.2,0.396-0.378,0.619-0.716,0.907
|
||||
c-0.115,0.098-0.199,0.155-0.315,0.212l-0.043-0.18c-0.357-1.384-1.264-2.035-2.56-2.314c0.045-0.629,0.026-1.017-0.079-1.659
|
||||
C249.434,23.798,249.332,23.426,249.109,22.885 M255.184,28.248c-0.016,0.205-0.044,0.414-0.087,0.628
|
||||
c-0.207,1.028-0.761,2.091-1.434,3.061c-0.087-0.413-0.26-1.069-0.59-1.673c-0.216-0.397-0.499-0.593-0.729-0.721
|
||||
c-0.01-0.194-0.028-0.384-0.056-0.568c0.498-0.391,0.896-0.566,1.551-0.697C254.358,28.172,254.695,28.163,255.184,28.248
|
||||
M252.969,32.855c-0.748,0.919-1.547,1.692-2.147,2.181c0.708-1.074,1.008-1.782,1.285-3.039c0.123-0.556,0.201-1.086,0.231-1.586
|
||||
c0.281,0.211,0.441,0.448,0.563,0.821c0.127,0.376,0.013,0.62,0.031,1.017C252.944,32.488,252.954,32.668,252.969,32.855
|
||||
M242.379,27.525c-0.081-0.695-0.152-1.362-0.204-2.019l0.902-0.094C242.795,26.288,242.573,27.046,242.379,27.525 M242.154,25.216
|
||||
c-0.046-0.663-0.068-1.317-0.06-1.982c0.32,0.105,0.512,0.223,0.771,0.463c0.183,0.171,0.275,0.285,0.4,0.503
|
||||
c-0.129,0.209-0.218,0.319-0.391,0.494C242.627,24.943,242.441,25.08,242.154,25.216 M242.206,21.425
|
||||
c0.02-0.175,0.042-0.352,0.067-0.529c0.194-1.417,1.63-3.766,3.143-4.917c0.212,0.043,0.384,0.097,0.63,0.189
|
||||
c0.368,0.141,0.569,0.244,0.895,0.464c0.016-0.324,0.014-0.509-0.011-0.833c-0.02-0.277-0.04-0.458-0.084-0.692
|
||||
c0.393-0.199,0.788-0.366,1.188-0.5c0.184,0.086,0.339,0.181,0.544,0.326c0.304,0.216,0.462,0.363,0.7,0.648l0.511-1.331
|
||||
l0.188-0.011c0.047,0.59,0.031,0.965-0.062,1.58c-0.065,0.437-0.122,0.682-0.256,1.103l-1.729-1.256l-0.331,1.738
|
||||
c-0.441-0.107-0.693-0.156-1.144-0.227c-0.459-0.071-0.721-0.101-1.184-0.133c0.005,0.313,0.015,0.49,0.041,0.803
|
||||
c0.025,0.31,0.047,0.484,0.095,0.792c-0.404,0.232-0.649,0.341-1.093,0.483c-0.384,0.124-0.609,0.175-1.01,0.227
|
||||
c-0.082,0.185,0.156,0.279,0.434,0.463c0.195,0.131,0.234,0.3,0.361,0.505c-0.012,0.118,0.021,0.24-0.084,0.29
|
||||
c-0.39,0.185-0.577,0.264-0.946,0.431L242.206,21.425z M250.252,14.23c0.804-0.011,1.656,0.109,2.579,0.372l0.266,0.081l0.362,0.32
|
||||
c-0.398,0.246-0.611,0.41-0.948,0.733c-0.348,0.333-0.525,0.546-0.792,0.946c-0.343-0.504-0.526-0.794-0.835-1.317
|
||||
C250.621,14.922,250.462,14.637,250.252,14.23 M254.002,15.058c0.938,0.481,1.645,1.168,2.194,2.027
|
||||
c-0.096,0.191-0.207,0.375-0.327,0.547c-0.267,0.376-0.46,0.568-0.836,0.833c0.017-0.339-0.147-0.644-0.243-0.969
|
||||
c-0.118-0.398-0.202-0.45-0.365-0.833C254.169,16.061,254.062,15.663,254.002,15.058 M256.571,17.75
|
||||
c0.178,0.349,0.335,0.719,0.477,1.11c0.608,1.674,0.726,2.8-0.312,4.555c-0.172-1.063-0.476-1.883-0.997-2.603
|
||||
c0.009-0.351,0.05-0.678,0.13-1.112C255.978,19.103,256.306,18.351,256.571,17.75 M254.571,19.615l-0.241-0.186
|
||||
c-0.371-0.28-0.743-0.512-1.12-0.696c-0.021-0.29-0.073-0.521-0.184-0.845c-0.115-0.339-0.207-0.524-0.403-0.823
|
||||
c-0.098,0.355-0.159,0.555-0.276,0.905l-0.133,0.381c-1.317-0.365-2.687-0.211-4.175,0.368c-1.194,0.465-2.107,1.208-2.788,2.046
|
||||
c-0.235-0.138-0.375-0.249-0.576-0.458c-0.262-0.271-0.388-0.458-0.544-0.803c0.403-0.15,0.644-0.211,1.068-0.269
|
||||
c0.321-0.044,0.504-0.052,0.827-0.041c-0.024-0.269-0.036-0.42-0.053-0.689c-0.017-0.276-0.023-0.434-0.033-0.71
|
||||
c0.395-0.016,0.621-0.003,1.011,0.062c0.345,0.058,0.538,0.107,0.866,0.226c0.103-0.228,0.318-1.535,0.337-1.707
|
||||
c0.185,0.148,1.563,1.265,1.823,1.338c-0.002-0.278,0.01-0.436,0.052-0.71c0.075-0.494,0.16-0.773,0.372-1.225
|
||||
c0.201,0.212,0.307,0.343,0.472,0.586c0.199,0.295,0.508,1.046,0.535,1.205c0.289-0.303,0.45-0.476,0.732-0.784
|
||||
c0.276-0.302,0.432-0.474,0.7-0.782c0.309,0.225,0.83,0.881,1.007,1.218C254.073,17.654,254.504,19.355,254.571,19.615
|
||||
M245.165,20.872c-0.341,0.438-0.623,0.898-0.85,1.356c-0.247,0.502-0.468,1.021-0.664,1.536l-1.106-0.884l0.308-0.576l0.691-0.297
|
||||
l-0.371-0.577c0.324-0.207,0.522-0.304,0.884-0.434c0.309-0.11,0.491-0.249,0.815-0.205
|
||||
C244.991,20.809,245.071,20.829,245.165,20.872 M251.711,21.998c-0.996-0.269-1.973-0.229-2.888,0.056
|
||||
c-0.259-0.335-0.913-0.634-0.913-0.634c-0.251-0.132-1.037-0.445-1.474-0.585c0.701-0.691,1.486-1.21,2.325-1.521
|
||||
c0.214,0.106,0.374,0.22,0.588,0.407c0.288,0.252,0.43,0.429,0.618,0.762c0.143-0.305,0.218-0.479,0.342-0.792
|
||||
c0.11-0.281,0.179-0.472,0.257-0.713c0.2-0.001,0.402,0.008,0.604,0.031c0.263,0.547,0.583,1.337,0.583,1.337l0.603,1.898
|
||||
C252.15,22.143,251.936,22.059,251.711,21.998 M247.845,22.456c-1.078,0.561-2.046,1.457-2.834,2.561l-0.785-0.694
|
||||
c0.447-1.16,1.046-2.172,1.752-2.994L247.845,22.456z M244.824,25.288c-0.629,0.939-1.129,2.015-1.464,3.15
|
||||
c0.075-1.296,0.312-2.507,0.679-3.601L244.824,25.288z M251.84,19.124c0.202,0.048,0.402,0.108,0.604,0.181
|
||||
c0.954,0.343,1.747,0.995,2.297,1.798c-0.105,0.175-0.215,0.314-0.385,0.499c-0.425,0.463-0.784,0.729-1.358,1.04
|
||||
c-0.09-0.067-0.181-0.131-0.275-0.19c-0.009-0.44-0.017-0.863-0.116-1.304C252.418,20.314,252.229,19.804,251.84,19.124
|
||||
M255.133,21.781c0.563,1.185,0.636,2.566,0.014,3.742c-0.343-0.804-0.971-1.875-1.857-2.646L255.133,21.781z M227.117,27.986
|
||||
c0.552,0.421,0.887,0.633,1.503,0.954c0.557,0.29,0.887,0.431,1.481,0.633c-0.574,0.207-0.931,0.271-1.541,0.275
|
||||
c-0.288,0.002-0.452-0.01-0.736-0.053C227.824,29.796,227.131,28.999,227.117,27.986 M242.206,17.205
|
||||
c-0.153-0.53-0.248-1.119-0.269-1.721l0.669,0.182c-0.012-0.226-0.021-0.353-0.041-0.576c-0.037-0.403-0.067-0.631-0.134-1.031
|
||||
c0.508,0.13,0.796,0.198,1.308,0.308c0.314,0.067,0.512,0.107,0.793,0.158C243.643,15.192,242.877,16.08,242.206,17.205
|
||||
M242.13,13.614c0.219-0.838,0.629-1.603,1.279-2.149c0.712-0.601,1.565-1.123,2.513-1.509c0.004,0.415,0.047,0.698,0.165,1.138
|
||||
c0.075,0.278,0.156,0.424,0.247,0.699c0.124,0.386,0.188,0.606,0.289,1c-0.625-0.222-0.988-0.323-1.638-0.454
|
||||
c-0.442-0.089-0.695-0.128-1.144-0.174c-0.023,0.188-0.023,0.297,0,0.483c0.05,0.392,0.364,0.543,0.382,0.937
|
||||
c0.01,0.222-0.009,0.355-0.082,0.565L242.13,13.614z M246.491,9.744c1.317-0.442,2.783-0.616,4.283-0.378
|
||||
c-0.324,0.145-0.557,0.318-0.848,0.614c-0.289,0.296-0.402,0.513-0.597,0.877c-0.159,0.296-0.235,0.474-0.342,0.792l-0.628-0.464
|
||||
c-0.484-0.357-0.776-0.537-1.245-0.915C246.861,10.066,246.701,9.931,246.491,9.744 M251.321,9.471
|
||||
c0.392,0.089,0.782,0.206,1.173,0.354c0.533,0.202,1.033,0.479,1.483,0.811c-0.386,0.357-0.656,0.58-1.116,0.921
|
||||
c-0.205,0.153-0.322,0.236-0.536,0.38c-0.429-0.548-0.62-0.918-0.822-1.584C251.4,10.011,251.352,9.785,251.321,9.471
|
||||
M254.384,10.961c1.413,1.235,2.192,3.047,1.652,4.745c-0.69-0.735-1.381-1.31-2.114-1.738c-0.213-0.365-0.291-0.667-0.306-1.127
|
||||
C253.592,12.048,253.83,11.457,254.384,10.961 M252.572,13.355c-0.653-0.218-1.352-0.344-2.114-0.386
|
||||
c0.006-0.265,0.005-0.438-0.002-0.724c-0.012-0.454-0.027-0.711-0.071-1.164c0.352,0.081,0.55,0.163,0.856,0.355
|
||||
c0.398,0.252,0.59,0.467,0.856,0.857C252.355,12.672,252.474,12.935,252.572,13.355 M248.946,12.984
|
||||
c-0.667,0.049-1.291,0.151-1.875,0.311c0.004-0.201,0.001-0.374-0.011-0.621c-0.032-0.626-0.079-0.98-0.216-1.592
|
||||
c0.421,0.252,0.649,0.417,1.021,0.738C248.343,12.232,248.62,12.528,248.946,12.984 M246.436,13.497
|
||||
c-0.616,0.225-1.185,0.519-1.712,0.889c-0.207-0.73-0.302-1.492-0.134-1.569c0.425-0.059,0.695-0.022,1.092,0.143
|
||||
C246.02,13.102,246.222,13.243,246.436,13.497 M243.563,7.423c0.464-0.338,1-0.553,1.591-0.676c0.226,0.168,0.469,0.476,0.6,0.606
|
||||
c0.309,0.307,0.506,0.562,0.499,0.995c-0.003,0.161-0.025,0.294-0.071,0.416l-0.404,0.18c-0.188-0.257-0.378-0.424-0.688-0.619
|
||||
C244.865,8.186,243.938,7.644,243.563,7.423 M245.934,6.641c0.271-0.021,0.55-0.026,0.836-0.02c1.446,0.034,2.377,0.413,3.435,1.4
|
||||
c-0.94-0.011-1.691,0.047-2.422,0.211L246.75,7.97L245.934,6.641z M244.736,8.779c0.201,0.132,0.301,0.263,0.373,0.49
|
||||
c-1.234,0.636-1.986,1.252-2.969,2.392c-0.047-0.86-0.195-1.803,0.235-2.763c0.195-0.082,0.386-0.115,0.643-0.119
|
||||
c0.313-0.005,0.937-0.08,1.093-0.144C244.343,8.542,244.527,8.643,244.736,8.779 M229.134,10.183
|
||||
c0.371-0.665,0.854-1.309,1.434-1.86c0.31,0.162,0.529,0.313,0.835,0.573c0.234,0.197,0.376,0.337,0.547,0.542
|
||||
c-0.932,0.203-1.777,0.554-2.752,1.115c-0.004-0.063-0.012-0.128-0.027-0.206L229.134,10.183z M231.017,7.932
|
||||
c0.888-0.708,1.963-1.19,3.188-1.242c-0.102,0.526-0.337,1.323-0.442,1.573c0.062,0.064,0.366,0.601,0.449,0.945
|
||||
c-0.492,0.008-0.942,0.033-1.364,0.082C232.379,8.938,231.444,8.246,231.017,7.932 M234.924,6.702
|
||||
c1.25,0.078,2.138,0.363,2.803,0.833l0.076,0.638c0,0-0.33,0.841-0.577,1.357c-0.376-0.105-0.758-0.182-1.16-0.233
|
||||
c-0.093-0.233-0.195-0.468-0.333-0.612c-0.315-0.333-0.536-0.493-0.949-0.69l0.072-0.666L234.924,6.702z M238.591,8.399
|
||||
c0.422,0.583,0.721,1.304,0.997,2.142c-0.653-0.36-1.237-0.635-1.813-0.838L238.591,8.399z M234.491,32.701
|
||||
c-0.722-0.588-0.921-1.497-0.509-2.332l0.612,0.167l0.606,0.466C234.751,31.447,234.547,31.987,234.491,32.701 M234.43,29.827
|
||||
c0.798-0.623,2.174-0.588,2.796,0.233c-0.646,0.027-1.298,0.388-1.663,0.643l-0.386-0.784L234.43,29.827z M248.278,30.028
|
||||
c0.007,0.21,0.053,0.381,0.122,0.528c-0.093,0.264-0.137,0.49-0.172,0.823c-0.065,0.618-0.031,0.992,0.149,1.587l0.353-0.754
|
||||
l0.032-1.174c0.327,0.324,0.729,0.606,0.9,1.207c0.148,0.528,0.084,1.197-0.184,1.886c-1.02-0.065-1.72-0.408-2.019-1.268
|
||||
C247.212,32.146,247.378,30.597,248.278,30.028"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 60 KiB |
@@ -0,0 +1,144 @@
|
||||
/* Define default light theme colors */
|
||||
:root {
|
||||
--bg-color: #f8f8f8;
|
||||
--text-color: #404040;
|
||||
--header-bg-color: #343A40;
|
||||
--header-text-color: #b3b3b3;
|
||||
--code-bg-color: #f8f8f8;
|
||||
--link-color: #005cc5;
|
||||
--link-hover-color: #003d99;
|
||||
--side-bar-bg-color: #343131:
|
||||
}
|
||||
|
||||
/* Auto-toggle dark mode based on system preference */
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
--bg-color: #1a1a1a;
|
||||
--text-color: #d1d1d1;
|
||||
--header-bg-color: #262626;
|
||||
--header-text-color: #d1d1d1;
|
||||
--code-bg-color: #333333;
|
||||
--link-color: #4da6ff;
|
||||
--link-hover-color: #1a8cff;
|
||||
--side-bar-bg-color: #343131;
|
||||
}
|
||||
|
||||
.method dt, .class dt, .data dt, .attribute dt, .function dt,
|
||||
.descclassname, .descname {
|
||||
background-color: #525252 !important;
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
.toc-backref {
|
||||
color: grey !important;
|
||||
}
|
||||
|
||||
code.literal {
|
||||
background-color: #2d2d2d !important;
|
||||
border: 1px solid #6d6d6d !important;
|
||||
}
|
||||
|
||||
.wy-nav-content-wrap {
|
||||
background-color: rgba(0, 0, 0, 0.6) !important;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
background-color: #191919 !important;
|
||||
}
|
||||
|
||||
.sidebar-title {
|
||||
background-color: #2b2b2b !important;
|
||||
}
|
||||
|
||||
.xref, .py-meth {
|
||||
color: #7ec3e6 !important;
|
||||
}
|
||||
|
||||
.admonition, .note {
|
||||
background-color: #2d2d2d !important;
|
||||
}
|
||||
|
||||
.wy-side-nav-search {
|
||||
background-color: inherit;
|
||||
}
|
||||
|
||||
.wy-table thead, .rst-content table.docutils thead, .rst-content table.field-list thead {
|
||||
background-color: var(--header-bg-color);
|
||||
}
|
||||
|
||||
.wy-table thead th, .rst-content table.docutils thead th, .rst-content table.field-list thead th {
|
||||
border: solid 2px var(--text-color);
|
||||
color: var(--text-color);
|
||||
}
|
||||
|
||||
.wy-table thead p, .rst-content table.docutils thead p, .rst-content table.field-list thead p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.wy-table-odd td, .wy-table-striped tr:nth-child(2n-1) td, .rst-content table.docutils:not(.field-list) tr:nth-child(2n-1) td {
|
||||
background-color: #343131;
|
||||
}
|
||||
|
||||
.highlight .m {
|
||||
color: inherit
|
||||
}
|
||||
|
||||
/* Literal.Number */
|
||||
.highlight .nv {
|
||||
color: #3a7ca8
|
||||
}
|
||||
|
||||
.wy-menu-vertical li code {
|
||||
color: #E74C3C;
|
||||
}
|
||||
|
||||
.wy-menu-vertical .xref {
|
||||
color: #2980B9 !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* Main colors adapted from pytorch doc */
|
||||
.wy-side-nav-search, .wy-nav-top {
|
||||
background-color: var(--header-bg-color);
|
||||
}
|
||||
|
||||
.wy-body-for-nav, .wy-nav-content, .wy-nav-content-wrap {
|
||||
background-color: var(--bg-color);
|
||||
background: var(--bg-color);
|
||||
}
|
||||
|
||||
.caption[role="heading"] {
|
||||
background-color: var(--side-bar-bg-color);
|
||||
}
|
||||
|
||||
a.icon.icon-home {
|
||||
color: var(--header-text-color);
|
||||
}
|
||||
|
||||
/* Apply the colors */
|
||||
body, h1, h2, .rst-content .toctree-wrapper p.caption, h3, h4, h5, h6, legend, p.caption, .field-list .xref.py.docutils, .field-list code.docutils, .field-list .docutils.literal.notranslate {
|
||||
background-color: var(--bg-color);
|
||||
color: var(--text-color);
|
||||
font-family: "Lato","proxima-nova","Helvetica Neue",Arial,sans-serif;
|
||||
}
|
||||
|
||||
/* Code blocks */
|
||||
.codeblock, pre.literal-block, .rst-content .literal-block, .rst-content pre.literal-block, div[class^='highlight'] {
|
||||
background-color: var(--code-bg-color);
|
||||
}
|
||||
|
||||
/* Justify and Center */
|
||||
.justify {
|
||||
text-align: justify;
|
||||
}
|
||||
|
||||
.center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* Docstring styles */
|
||||
.field-list .xref.py.docutils, .field-list code.docutils, .field-list .docutils.literal.notranslate {
|
||||
border: None;
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{% extends "!layout.html" %}
|
||||
|
||||
{% block extrahead %}
|
||||
{{ super() }}
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,8 @@
|
||||
API
|
||||
===
|
||||
|
||||
.. autosummary::
|
||||
:toctree: generated
|
||||
|
||||
fancy_gym.register
|
||||
fancy_gym.upgrade
|
||||
@@ -0,0 +1,53 @@
|
||||
# This conf.py is in large parts inspired by the oen used by stable-baselines 3
|
||||
|
||||
import datetime
|
||||
|
||||
project = 'Fancy Gym'
|
||||
author = 'Fabian Otto, Onur Celik, Dominik Roth, Hongyi Zhou'
|
||||
copyright = f'2020-{datetime.date.today().year}, {author}'
|
||||
|
||||
release = '0.2' # The full version, including alpha/beta/rc tags
|
||||
version = '0.2' # The short X.Y version
|
||||
|
||||
extensions = [
|
||||
'myst_parser',
|
||||
'sphinx.ext.duration',
|
||||
'sphinx.ext.doctest',
|
||||
'sphinx.ext.autodoc',
|
||||
'sphinx.ext.autosummary',
|
||||
# 'sphinx.ext.intersphinx',
|
||||
'sphinx.ext.mathjax',
|
||||
'sphinx.ext.ifconfig',
|
||||
'sphinx.ext.viewcode',
|
||||
]
|
||||
|
||||
autosummary_generate = True
|
||||
|
||||
intersphinx_mapping = {
|
||||
'python': ('https://docs.python.org/3/', None),
|
||||
'sphinx': ('https://www.sphinx-doc.org/en/master/', None),
|
||||
}
|
||||
|
||||
intersphinx_disabled_domains = ['std']
|
||||
|
||||
language = "en"
|
||||
pygments_style = "sphinx"
|
||||
|
||||
templates_path = ['_templates']
|
||||
exclude_patterns = ['build', 'Thumbs.db', '.DS_Store']
|
||||
|
||||
html_theme = 'sphinx_rtd_theme'
|
||||
html_logo = "_static/imgs/icon.svg"
|
||||
html_favicon = "_static/imgs/icon.svg"
|
||||
epub_show_urls = 'footnote'
|
||||
html_static_path = ['_static']
|
||||
|
||||
html_context = {
|
||||
'display_github': True,
|
||||
'github_user': 'ALRhub',
|
||||
'github_repo': 'fancy_gym',
|
||||
'github_version': 'release/docs/source/',
|
||||
}
|
||||
|
||||
def setup(app):
|
||||
app.add_css_file("style.css")
|
||||
@@ -0,0 +1,79 @@
|
||||
# DeepMind Control (DMC)
|
||||
|
||||
<!-- TODO: Add Vid -->
|
||||
|
||||
These are the Environment Wrappers for selected
|
||||
[DeepMind Control](https://github.com/google-deepmind/dm_control)
|
||||
environments in order to use our Motion Primitive gym interface with them.
|
||||
|
||||
## Step-Based Environments
|
||||
|
||||
When installing fancy_gym with the optional dmc extra (e.g. `pip install fancy_gym[dmc]`), all regular dmc tasks are avaible via [Shimmy](https://github.com/Farama-Foundation/Shimmy).
|
||||
|
||||
| Name | Description | Action Dim | Observation Dim |
|
||||
| --------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ---------- | --------------- |
|
||||
| `dm_control/acrobot-swingup-v0` | Underactuated double pendulum (Acrobot) with torque applied to the second joint to swing up and balance. | 1 | 6 |
|
||||
| `dm_control/acrobot-swingup_sparse-v0` | Similar to `acrobot-swingup-v0`, but with sparse rewards for achieving the swingup task. | 1 | 6 |
|
||||
| `dm_control/ball_in_cup-catch-v0` | Planar ball-in-cup task where a receptacle must swing to catch a ball. Sparse reward for catching. | 2 | 8 |
|
||||
| `dm_control/cartpole-balance-v0` | Cart-pole task where the goal is to balance an unactuated pole by moving a cart, starting near upright. | 1 | 5 |
|
||||
| `dm_control/cartpole-balance_sparse-v0` | Similar to `cartpole-balance-v0`, but with sparse rewards. | 1 | 5 |
|
||||
| `dm_control/cartpole-swingup-v0` | Cart-pole task with the pole starting downward, requiring swinging up and balancing. | 1 | 5 |
|
||||
| `dm_control/cartpole-swingup_sparse-v0` | Similar to `cartpole-swingup-v0`, but with sparse rewards for the swingup task. | 1 | 5 |
|
||||
| `dm_control/cartpole-two_poles-v0` | Extension of the Cart-pole domain with two serially connected poles, increasing the balancing challenge. | 1 | 8 |
|
||||
| `dm_control/cartpole-three_poles-v0` | Extension of the Cart-pole domain with three serially connected poles, further increasing the challenge. | 1 | 11 |
|
||||
| `dm_control/cheetah-run-v0` | Planar bipedal cheetah robot tasked with running. The reward is proportional to forward velocity up to a maximum speed. | 6 | 17 |
|
||||
| `dm_control/dog-stand-v0` | Dog robot task focusing on achieving a standing posture. | 38 | 223 |
|
||||
| `dm_control/dog-walk-v0` | Dog robot tasked with walking, requiring coordination of movements. | 38 | 223 |
|
||||
| `dm_control/dog-trot-v0` | Dog robot performing a trotting gait. | 38 | 223 |
|
||||
| `dm_control/dog-run-v0` | Dog robot tasked with running, combining speed with stability. | 38 | 223 |
|
||||
| `dm_control/dog-fetch-v0` | Dog robot playing fetch, involving locomotion and object interaction. | 38 | 232 |
|
||||
| `dm_control/finger-spin-v0` | Finger robot required to rotate an unactuated body on a hinge. | 2 | 9 |
|
||||
| `dm_control/finger-turn_easy-v0` | Finger robot task to align the tip of a free body with a target, easier version with a larger target. | 2 | 12 |
|
||||
| `dm_control/finger-turn_hard-v0` | Similar to `finger-turn_easy-v0`, but with a smaller target for increased difficulty. | 2 | 12 |
|
||||
| `dm_control/fish-upright-v0` | Fish robot task focused on righting itself in a fluid environment. | 5 | 21 |
|
||||
| `dm_control/fish-swim-v0` | Fish robot swimming to a target, incorporating fluid dynamics. | 5 | 24 |
|
||||
| `dm_control/hopper-stand-v0` | One-legged hopper robot tasked with achieving a minimal torso height. | 4 | 15 |
|
||||
| `dm_control/hopper-hop-v0` | One-legged hopper robot required to hop, combining height and forward velocity. | 4 | 15 |
|
||||
| `dm_control/humanoid-stand-v0` | Simplified humanoid robot maintaining a standing posture. | 21 | 67 |
|
||||
| `dm_control/humanoid-walk-v0` | Simplified humanoid robot walking at a specified speed. | 21 | 67 |
|
||||
| `dm_control/humanoid-run-v0` | Simplified humanoid robot running, aiming for a high horizontal speed. | 21 | 67 |
|
||||
| `dm_control/humanoid-run_pure_state-v0` | Simplified humanoid robot running with a focus on pure state control. | 21 | 55 |
|
||||
| `dm_control/humanoid_CMU-stand-v0` | Advanced humanoid robot (CMU model) maintaining a standing posture. | 56 | 137 |
|
||||
| `dm_control/humanoid_CMU-walk-v0` | Advanced humanoid robot (CMU model) walking. | 56 | 137 |
|
||||
| `dm_control/humanoid_CMU-run-v0` | Advanced humanoid robot (CMU model) running. | 56 | 137 |
|
||||
| `dm_control/lqr-lqr_2_1-v0` | Linear quadratic regulator (LQR) task with 2 masses and 1 actuator, focusing on position and control optimization. | 1 | 4 |
|
||||
| `dm_control/lqr-lqr_6_2-v0` | Linear quadratic regulator (LQR) task with 6 masses and 2 actuators, more complex control optimization challenge. | 2 | 12 |
|
||||
| `dm_control/manipulator-bring_ball-v0` | Planar manipulator robot bringing a ball to a target location, with object initialization variations. | 5 | 44 |
|
||||
| `dm_control/manipulator-bring_peg-v0` | Planar manipulator task of bringing a peg to a target peg. | 5 | 44 |
|
||||
| `dm_control/manipulator-insert_ball-v0` | Planar manipulator task requiring inserting a ball into a basket. | 5 | 44 |
|
||||
| `dm_control/manipulator-insert_peg-v0` | Planar manipulator challenge of inserting a peg into a slot. | 5 | 44 |
|
||||
| `dm_control/pendulum-swingup-v0` | Classic inverted pendulum task with a torque-limited actuator, requiring multiple swings to swing up and balance. | 1 | 3 |
|
||||
| `dm_control/point_mass-easy-v0` | Planar point mass in an easy task, with actuators corresponding to global x and y axes | 2 | 4 |
|
||||
| `dm_control/point_mass-hard-v0` | Planar point mass in a hard task, with randomized control gains per episode, challenging memoryless agents. | 2 | 4 |
|
||||
| `dm_control/quadruped-walk-v0` | Four-legged robot (Quadruped) tasked with walking. | 12 | 78 |
|
||||
| `dm_control/quadruped-run-v0` | Quadruped robot required to run, balancing speed and stability. | 12 | 78 |
|
||||
| `dm_control/quadruped-escape-v0` | Quadruped robot in an escape task, combining locomotion with environmental interaction. | 12 | 101 |
|
||||
| `dm_control/quadruped-fetch-v0` | Quadruped robot playing fetch, involving complex movements and object interaction. | 12 | 90 |
|
||||
| `dm_control/reacher-easy-v0` | Two-link planar reacher with a randomized target, easier version with a larger target sphere. | 2 | 6 |
|
||||
| `dm_control/reacher-hard-v0` | Similar to `reacher-easy-v0`, but with a smaller target sphere for increased difficulty. | 2 | 6 |
|
||||
| `dm_control/stacker-stack_2-v0` | Stacker task requiring stacking of 2 boxes, with rewards for correct placement and gripper positioning. | 5 | 49 |
|
||||
| `dm_control/stacker-stack_4-v0` | More complex stacker task with 4 boxes, increasing the stacking challenge. | 5 | 63 |
|
||||
| `dm_control/swimmer-swimmer6-v0` | Six-link planar swimmer in fluid dynamics, rewarded for positioning the nose inside a target. | 5 | 25 |
|
||||
| `dm_control/swimmer-swimmer15-v0` | Fifteen-link planar swimmer, a more complex version of the swimmer task with extended dynamics. | 14 | 61 |
|
||||
| `dm_control/walker-stand-v0` | Planar walker robot tasked with maintaining an upright torso and minimal height. | 6 | 24 |
|
||||
| `dm_control/walker-walk-v0` | Planar walker robot walking task, focusing on forward velocity and stability. | 6 | 24 |
|
||||
| `dm_control/walker-run-v0` | Planar walker robot running task, aiming for high speed and balance. | 6 | 24 |
|
||||
|
||||
## MP Environments
|
||||
|
||||
[//]: <> (These environments are wrapped-versions of their Deep Mind Control Suite (DMC) counterparts. Given most task can be)
|
||||
[//]: <> (solved in shorter horizon lengths than the original 1000 steps, we often shorten the episodes for those task.)
|
||||
|
||||
| Name | Description | Trajectory Horizon | Action Dimension | Context Dimension |
|
||||
| ---------------------------------------- | ------------------------------------------------------------------------------ | ------------------ | ---------------- | ----------------- |
|
||||
| `dm_control_ProDMP/ball_in_cup-catch-v0` | A ProMP wrapped version of the "catch" task for the "ball_in_cup" environment. | 1000 | 10 | 2 |
|
||||
| `dm_control_DMP/ball_in_cup-catch-v0` | A DMP wrapped version of the "catch" task for the "ball_in_cup" environment. | 1000 | 10 | 2 |
|
||||
| `dm_control_ProDMP/reacher-easy-v0` | A ProMP wrapped version of the "easy" task for the "reacher" environment. | 1000 | 10 | 4 |
|
||||
| `dm_control_DMP/reacher-easy-v0` | A DMP wrapped version of the "easy" task for the "reacher" environment. | 1000 | 10 | 4 |
|
||||
| `dm_control_ProDMP/reacher-hard-v0` | A ProMP wrapped version of the "hard" task for the "reacher" environment. | 1000 | 10 | 4 |
|
||||
| `dm_control_DMP/reacher-hard-v0` | A DMP wrapped version of the "hard" task for the "reacher" environment. | 1000 | 10 | 4 |
|
||||
@@ -0,0 +1,18 @@
|
||||
AirHockey
|
||||
=========
|
||||
|
||||
Fancy Gym provides access to a range of environments for the `Robot Air Hockey Challenge <https://air-hockey-challenge.robot-learning.net/>`_. The challenge aims to close the gap between simulated learning and real-world application by focusing on various aspects of robotic operation, such as dealing with disturbances, observation noise, safety, and actuator limitations.
|
||||
|
||||
The environments available through Fancy Gym allow for the development of agents capable of performing tasks with different levels of complexity. These tasks include hitting and defending in air hockey with both three degrees of freedom (3 DoF) and seven degrees of freedom (7 DoF) configurations. The 7 DoF tasks are based on the KUKA iiwa14 robot model, which is used in the simulations to represent a higher level of control complexity akin to real-world settings.
|
||||
|
||||
Participants in the challenge are required to develop strategies that enable their robots to react and adapt within these dynamic environments. The final phase of the challenge involves a tournament where the developed agents will be tested in a comprehensive game scenario, both in simulation and, for the top teams, on actual robotic systems.
|
||||
|
||||
For detailed information on the challenge, including rules, stages, and submission requirements, please visit the `official Robot Air Hockey Challenge website <https://air-hockey-challenge.robot-learning.net/>`_.
|
||||
|
||||
The available environments are as follows:
|
||||
- fancy/AirHockey-7dof-hit-v0
|
||||
- fancy/AirHockey-7dof-defend-v0
|
||||
- fancy/AirHockey-3dof-hit-v0
|
||||
- fancy/AirHockey-3dof-defend-v0
|
||||
- fancy/AirHockey-7dof-hit-airhockit2023-v0
|
||||
- fancy/AirHockey-7dof-defend-airhockit2023-v0
|
||||
@@ -1,13 +1,15 @@
|
||||
### Classic Control
|
||||
# Classic Control
|
||||
|
||||
## Step-based Environments
|
||||
Classic Control environments provide a foundational platform for exploring and experimenting with RL algorithms. These environments are designed to be simple, allowing researchers and practitioners to focus on the fundamental principles of control without the complexities of high-dimensional and physics-based simulations.
|
||||
|
||||
## Step-Based Environments
|
||||
|
||||
| Name | Description | Horizon | Action Dimension | Observation Dimension |
|
||||
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | ---------------- | --------------------- |
|
||||
| `fancy/SimpleReacher-v0` | Simple reaching task (2 links) without any physics simulation. Provides no reward until 150 time steps. This allows the agent to explore the space, but requires precise actions towards the end of the trajectory. | 200 | 2 | 9 |
|
||||
| `fancy/LongSimpleReacher-v0` | Simple reaching task (5 links) without any physics simulation. Provides no reward until 150 time steps. This allows the agent to explore the space, but requires precise actions towards the end of the trajectory. | 200 | 5 | 18 |
|
||||
| `fancy/ViaPointReacher-v0` | Simple reaching task leveraging a via point, which supports self collision detection. Provides a reward only at 100 and 199 for reaching the viapoint and goal point, respectively. | 200 | 5 | 18 |
|
||||
| `fancy/HoleReacher-v0` | 5 link reaching task where the end-effector needs to reach into a narrow hole without collding with itself or walls | 200 | 5 | 18 |
|
||||
| `fancy/HoleReacher-v0` | 5 link reaching task where the end-effector needs to reach into a narrow hole without collding with itself or walls. | 200 | 5 | 18 |
|
||||
|
||||
## MP Environments
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
Fancy
|
||||
=====
|
||||
|
||||
Fancy Gym adds a couple new environments. Some of these are adaptations of existing environments while others were designed and build by us from the ground up.
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<div class='center'>
|
||||
<img src="../../_static/imgs/env_gifs/Box_Pushing.gif" style="margin: 5%; width: 45%;">
|
||||
<p>Box Pushing Task (<a href="./mujoco.html#box-pushing">fancy/BoxPushingDense-v0</a>)</p>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
.. toctree::
|
||||
mujoco.md
|
||||
airhockey
|
||||
classic_control.md
|
||||
@@ -0,0 +1,114 @@
|
||||
# Mujoco
|
||||
|
||||
## Step-Based Environments
|
||||
|
||||
### Box Pushing
|
||||
|
||||
<div class='center'>
|
||||
<img src="../../_static/imgs/env_gifs/Box_Pushing.gif" style="margin: 5%; width: 45%;">
|
||||
</div>
|
||||
|
||||
The box-pushing task presents an advanced environment for reinforcement learning (RL) systems, utilizing the versatile Franka Emika Panda robotic arm, which boasts seven degrees of freedom (DoFs). The objective of this task is to precisely manipulate a box to a specified goal location and orientation.
|
||||
|
||||
This environment defines its context space with a goal position constrained within a certain range along the x and y axes and a goal orientation that encompasses the full 360-degree range on the z-axis. The robot's mission is to achieve positional accuracy within 5 centimeters and an orientation accuracy within 0.5 radians of the specified goal.
|
||||
|
||||
The observation space includes the sine and cosine values of the robotic joint angles, their velocities, and quaternion orientations for the end-effector and the box. The action space describes the applied torques for each joint.
|
||||
|
||||
A composite reward function serves as the performance metric for the RL system. It accounts for the distance to the goal, the box's orientation, maintaining a rod within the box, achieving the rod's desired orientation, and includes penalties for joint position and velocity limit violations, as well as an action cost for energy expenditure.
|
||||
|
||||
Variations of this environment are available, differing in reward structures and the optionality of randomizing the box's initial position. These variations are purposefully designed to challenge RL algorithms, enhancing their generalization and adaptation capabilities. Temporally sparse environments only provide a reward at the last timestep. Spatially sparse environments only provide a reward, if the goal is almost reached, the box is close enought to the goal and somewhat correctly aligned.
|
||||
|
||||
| Name | Description | Horizon | Action Dimension | Observation Dimension |
|
||||
| ------------------------------------------ | -------------------------------------------------------------------- | ------- | ---------------- | --------------------- |
|
||||
| `fancy/BoxPushingDense-v0` | Custom Box-pushing task with dense rewards | 100 | 3 | 13 |
|
||||
| `fancy/BoxPushingTemporalSparse-v0` | Custom Box-pushing task with temporally sparse rewards | 100 | 3 | 13 |
|
||||
| `fancy/BoxPushingTemporalSpatialSparse-v0` | Custom Box-pushing task with temporally and spatially sparse rewards | 100 | 3 | 13 |
|
||||
|
||||
---
|
||||
|
||||
### Table Tennis
|
||||
|
||||
<div class='center'>
|
||||
<img src="../../_static/imgs/env_gifs/Table_Tennis.gif" style="margin: 5%; width: 45%;">
|
||||
</div>
|
||||
|
||||
The table tennis task offers a robotic arm equipped with seven degrees of freedom (DoFs). The task is to respond to incoming balls and return them accurately to a specified goal location on the opponent's side of the table.
|
||||
|
||||
The context space for this environment includes the initial ball position, with x-coordinates ranging from -1 to -0.2 meters and y-coordinates from -0.65 to 0.65 meters, and the goal position with x-coordinates between -1.2 to -0.2 meters and y-coordinates from -0.6 to 0.6 meters. The full observation space comprises the sine and cosine values of the joint angles, the joint velocities, and the ball's velocity, providing comprehensive information for the RL system to base its decisions on.
|
||||
|
||||
A task is considered successfully completed when the returned ball not only lands on the opponent's side of the table but also within a tight margin of 20 centimeters from the goal location. The reward function is designed to reflect various conditions of play, including whether the ball was hit, if it landed on the table, and the proximity of the ball's landing position to the goal location.
|
||||
|
||||
Variations of the table tennis environment are available to cater to different research needs. These variations maintain the foundational challenge of precise ball return while providing additional complexity for RL algorithms to overcome.
|
||||
|
||||
| Name | Description | Horizon | Action Dimension | Observation Dimension |
|
||||
| ----------------------------------- | -------------------------------------------------------------------------------------------------- | ------- | ---------------- | --------------------- |
|
||||
| `fancy/TableTennis2D-v0` | Table Tennis task with 2D context, based on a custom environment for table tennis | 350 | 7 | 19 |
|
||||
| `fancy/TableTennis2DReplan-v0` | Table Tennis task with 2D context and replanning, based on a custom environment for table tennis | 350 | 7 | 19 |
|
||||
| `fancy/TableTennis4D-v0` | Table Tennis task with 4D context, based on a custom environment for table tennis | 350 | 7 | 22 |
|
||||
| `fancy/TableTennis4DReplan-v0` | Table Tennis task with 4D context and replanning, based on a custom environment for table tennis | 350 | 7 | 22 |
|
||||
| `fancy/TableTennisWind-v0` | Table Tennis task with wind effects, based on a custom environment for table tennis | 350 | 7 | 19 |
|
||||
| `fancy/TableTennisGoalSwitching-v0` | Table Tennis task with goal switching, based on a custom environment for table tennis | 350 | 7 | 19 |
|
||||
| `fancy/TableTennisWindReplan-v0` | Table Tennis task with wind effects and replanning, based on a custom environment for table tennis | 350 | 7 | 19 |
|
||||
|
||||
---
|
||||
|
||||
### Beer Pong
|
||||
|
||||
<div class='center'>
|
||||
<img src="../../_static/imgs/env_gifs/Beer_Pong.gif" style="margin: 5%; width: 45%;">
|
||||
</div>
|
||||
<!-- TODO: Vid is ugly and unsuccessful. Replace. -->
|
||||
|
||||
The Beer Pong task is based upon a robotic system with seven Degrees of Freedom (DoF), challenging the robot to throw a ball into a cup placed on a large table. The environment's context is established by the cup's location, defined within a range of x-coordinates from -1.42 to 1.42 meters and y-coordinates from -4.05 to -1.25 meters.
|
||||
|
||||
The observation space includes the cosine and sine of the robot's joint angles, the angular velocities, and distances of the ball relative to the top and bottom of the cup, along with the cup's position and the current timestep. The action space for the robot is defined by the torques applied to each joint. For episode-based methods, the parameter space is expanded to 15 dimensions, which includes two weights for the basis functions per joint and the duration of the throw, namely the ball release time.
|
||||
|
||||
Action penalties are implemented in the form of squared torque sums applied across all joints, penalizing excessive force and encouraging efficient motion. The reward function at each timestep t before the final timestep T penalizes the action penalty, while at t=T, a non-Markovian reward based on the ball's position relative to the cup and the action penalty is considered.
|
||||
|
||||
An additional reward component at the final timestep T assesses the chosen ball release time to ensure it falls within a reasonable range. The overall return for an episode is the sum of the rewards at each timestep, the task-specific reward, and the release time reward.
|
||||
|
||||
A successful throw in this task is determined by the ball landing in the cup at the episode's conclusion, showcasing the robot's ability to accurately predict and execute the complex motion required for this popular party game.
|
||||
|
||||
| Name | Description | Horizon | Action Dimension | Observation Dimension |
|
||||
| ------------------------------- | ---------------------------------------------------------------------------------------------- | ------- | ---------------- | --------------------- |
|
||||
| `fancy/BeerPong-v0` | Beer Pong task, based on a custom environment with multiple task variations | 300 | 3 | 29 |
|
||||
| `fancy/BeerPongStepBased-v0` | Step-based rewards for the Beer Pong task, based on a custom environment with episodic rewards | 300 | 3 | 29 |
|
||||
| `fancy/BeerPongFixedRelease-v0` | Beer Pong with fixed release, based on a custom environment with episodic rewards | 300 | 3 | 29 |
|
||||
|
||||
---
|
||||
|
||||
### Variations of existing environments
|
||||
|
||||
| Name | Description | Horizon | Action Dimension | Observation Dimension |
|
||||
| ------------------------------ | ------------------------------------------------------------------------------------------------ | ------- | ---------------- | --------------------- |
|
||||
| `fancy/Reacher-v0` | Modified (5 links) gymnasiums's mujoco `Reacher-v2` (2 links) | 200 | 5 | 21 |
|
||||
| `fancy/ReacherSparse-v0` | Same as `fancy/Reacher-v0`, but the distance penalty is only provided in the last time step. | 200 | 5 | 21 |
|
||||
| `fancy/LongReacher-v0` | Modified (7 links) gymnasiums's mujoco `Reacher-v2` (2 links) | 200 | 7 | 27 |
|
||||
| `fancy/LongReacherSparse-v0` | Same as `fancy/LongReacher-v0`, but the distance penalty is only provided in the last time step. | 200 | 7 | 27 |
|
||||
| `fancy/Reacher5d-v0` | Reacher task with 5 links, based on Gymnasium's `gym.envs.mujoco.ReacherEnv` | 200 | 5 | 20 |
|
||||
| `fancy/Reacher5dSparse-v0` | Sparse Reacher task with 5 links, based on Gymnasium's `gym.envs.mujoco.ReacherEnv` | 200 | 5 | 20 |
|
||||
| `fancy/Reacher7d-v0` | Reacher task with 7 links, based on Gymnasium's `gym.envs.mujoco.ReacherEnv` | 200 | 7 | 22 |
|
||||
| `fancy/Reacher7dSparse-v0` | Sparse Reacher task with 7 links, based on Gymnasium's `gym.envs.mujoco.ReacherEnv` | 200 | 7 | 22 |
|
||||
| `fancy/HopperJumpSparse-v0` | Hopper Jump task with sparse rewards, based on Gymnasium's `gym.envs.mujoco.Hopper` | 250 | 3 | 15 / 16\* |
|
||||
| `fancy/HopperJump-v0` | Hopper Jump task with continuous rewards, based on Gymnasium's `gym.envs.mujoco.Hopper` | 250 | 3 | 15 / 16\* |
|
||||
| `fancy/AntJump-v0` | Ant Jump task, based on Gymnasium's `gym.envs.mujoco.Ant` | 200 | 8 | 119 |
|
||||
| `fancy/HalfCheetahJump-v0` | HalfCheetah Jump task, based on Gymnasium's `gym.envs.mujoco.HalfCheetah` | 100 | 6 | 112 |
|
||||
| `fancy/HopperJumpOnBox-v0` | Hopper Jump on Box task, based on Gymnasium's `gym.envs.mujoco.Hopper` | 250 | 4 | 16 / 100\* |
|
||||
| `fancy/HopperThrow-v0` | Hopper Throw task, based on Gymnasium's `gym.envs.mujoco.Hopper` | 250 | 3 | 18 / 100\* |
|
||||
| `fancy/HopperThrowInBasket-v0` | Hopper Throw in Basket task, based on Gymnasium's `gym.envs.mujoco.Hopper` | 250 | 3 | 18 / 100\* |
|
||||
| `fancy/Walker2DJump-v0` | Walker 2D Jump task, based on Gymnasium's `gym.envs.mujoco.Walker2d` | 300 | 6 | 18 / 19\* |
|
||||
|
||||
\*Observation dimensions depend on configuration.
|
||||
|
||||
<!--
|
||||
No longer used?
|
||||
| Name | Description | Horizon | Action Dimension | Observation Dimension |
|
||||
| --------------------------- | --------------------------------------------------------------------------------------------------- | ------- | ---------------- | --------------------- |
|
||||
| `fancy/BallInACupSimple-v0` | Ball-in-a-cup task where a robot needs to catch a ball attached to a cup at its end-effector. | 4000 | 3 | wip |
|
||||
| `fancy/BallInACup-v0` | Ball-in-a-cup task where a robot needs to catch a ball attached to a cup at its end-effector | 4000 | 7 | wip |
|
||||
| `fancy/BallInACupGoal-v0` | Similar to `fancy/BallInACupSimple-v0` but the ball needs to be caught at a specified goal position | 4000 | 7 | wip |
|
||||
-->
|
||||
|
||||
## MP Environments
|
||||
|
||||
Most of these envs also exist as MP-variants. Refer to them using `fancy_DMP/<name>` `fancy_ProMP/<name>` or `fancy_ProDMP/<name>`.
|
||||
@@ -1,64 +1,70 @@
|
||||
# Metaworld
|
||||
|
||||
<div class='center'>
|
||||
<img src="../_static/imgs/env_gifs/Metaworld.gif" style="margin: 5%; width: 45%;">
|
||||
<p>Metaworld Dial Turn Task (metaworld/dial-turn-v2)</p>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
[Metaworld](https://meta-world.github.io/) is an open-source simulated benchmark designed to advance meta-reinforcement learning and multi-task learning, comprising 50 diverse robotic manipulation tasks. The benchmark features a universal tabletop environment equipped with a simulated Sawyer arm and a variety of everyday objects. This shared environment is pivotal for reusing structured learning and efficiently acquiring related tasks.
|
||||
|
||||
## Step-Based Envs
|
||||
## Step-Based Environments
|
||||
|
||||
`fancy_gym` makes all metaworld ML1 tasks avaible via the standard gym interface. To access metaworld environments using a different mode of operation (MT1 / ML100 / etc.) please use the functionality provided by metaworld directly.
|
||||
`fancy_gym` makes all metaworld ML1 tasks avaible via the standard gym interface.
|
||||
|
||||
| Name | Description | Horizon | Action Dimension | Observation Dimension | Context Dimension |
|
||||
| ---------------------------------------- | ------------------------------------------------------------------------------------- | ------- | ---------------- | --------------------- | ----------------- |
|
||||
| `metaworld/assembly-v2` | A task where the robot must assemble components. | 500 | 4 | 39 | 6 |
|
||||
| `metaworld/basketball-v2` | A task where the robot must play a game of basketball. | 500 | 4 | 39 | 6 |
|
||||
| `metaworld/bin-picking-v2` | A task involving the robot picking objects from a bin. | 500 | 4 | 39 | 6 |
|
||||
| `metaworld/box-close-v2` | A task requiring the robot to close a box. | 500 | 4 | 39 | 6 |
|
||||
| `metaworld/button-press-topdown-v2` | A task where the robot must press a button from a top-down perspective. | 500 | 4 | 39 | 6 |
|
||||
| `metaworld/button-press-topdown-wall-v2` | A task involving the robot pressing a button with a wall from a top-down perspective. | 500 | 4 | 39 | 6 |
|
||||
| `metaworld/button-press-v2` | A task where the robot must press a button. | 500 | 4 | 39 | 6 |
|
||||
| `metaworld/button-press-wall-v2` | A task involving the robot pressing a button with a wall. | 500 | 4 | 39 | 6 |
|
||||
| `metaworld/coffee-button-v2` | A task where the robot must press a button on a coffee machine. | 500 | 4 | 39 | 6 |
|
||||
| `metaworld/coffee-pull-v2` | A task involving the robot pulling a lever on a coffee machine. | 500 | 4 | 39 | 6 |
|
||||
| `metaworld/coffee-push-v2` | A task involving the robot pushing a component on a coffee machine. | 500 | 4 | 39 | 6 |
|
||||
| `metaworld/dial-turn-v2` | A task where the robot must turn a dial. | 500 | 4 | 39 | 6 |
|
||||
| `metaworld/disassemble-v2` | A task requiring the robot to disassemble an object. | 500 | 4 | 39 | 6 |
|
||||
| `metaworld/door-close-v2` | A task where the robot must close a door. | 500 | 4 | 39 | 6 |
|
||||
| `metaworld/door-lock-v2` | A task involving the robot locking a door. | 500 | 4 | 39 | 6 |
|
||||
| `metaworld/door-open-v2` | A task where the robot must open a door. | 500 | 4 | 39 | 6 |
|
||||
| `metaworld/door-unlock-v2` | A task involving the robot unlocking a door. | 500 | 4 | 39 | 6 |
|
||||
| `metaworld/hand-insert-v2` | A task requiring the robot to insert a hand into an object. | 500 | 4 | 39 | 6 |
|
||||
| `metaworld/drawer-close-v2` | A task where the robot must close a drawer. | 500 | 4 | 39 | 6 |
|
||||
| `metaworld/drawer-open-v2` | A task involving the robot opening a drawer. | 500 | 4 | 39 | 6 |
|
||||
| `metaworld/faucet-open-v2` | A task requiring the robot to open a faucet. | 500 | 4 | 39 | 6 |
|
||||
| `metaworld/faucet-close-v2` | A task where the robot must close a faucet. | 500 | 4 | 39 | 6 |
|
||||
| `metaworld/hammer-v2` | A task where the robot must use a hammer. | 500 | 4 | 39 | 6 |
|
||||
| `metaworld/handle-press-side-v2` | A task involving the robot pressing a handle from the side. | 500 | 4 | 39 | 6 |
|
||||
| `metaworld/handle-press-v2` | A task where the robot must press a handle. | 500 | 4 | 39 | 6 |
|
||||
| `metaworld/handle-pull-side-v2` | A task requiring the robot to pull a handle from the side. | 500 | 4 | 39 | 6 |
|
||||
| `metaworld/handle-pull-v2` | A task where the robot must pull a handle. | 500 | 4 | 39 | 6 |
|
||||
| `metaworld/lever-pull-v2` | A task involving the robot pulling a lever. | 500 | 4 | 39 | 6 |
|
||||
| `metaworld/peg-insert-side-v2` | A task requiring the robot to insert a peg from the side. | 500 | 4 | 39 | 6 |
|
||||
| `metaworld/pick-place-wall-v2` | A task involving the robot picking and placing an object with a wall. | 500 | 4 | 39 | 6 |
|
||||
| `metaworld/pick-out-of-hole-v2` | A task where the robot must pick an object out of a hole. | 500 | 4 | 39 | 6 |
|
||||
| `metaworld/reach-v2` | A task where the robot must reach an object. | 500 | 4 | 39 | 6 |
|
||||
| `metaworld/push-back-v2` | A task involving the robot pushing an object backward. | 500 | 4 | 39 | 6 |
|
||||
| `metaworld/push-v2` | A task where the robot must push an object. | 500 | 4 | 39 | 6 |
|
||||
| `metaworld/pick-place-v2` | A task involving the robot picking up and placing an object. | 500 | 4 | 39 | 6 |
|
||||
| `metaworld/plate-slide-v2` | A task requiring the robot to slide a plate. | 500 | 4 | 39 | 6 |
|
||||
| `metaworld/plate-slide-side-v2` | A task involving the robot sliding a plate from the side. | 500 | 4 | 39 | 6 |
|
||||
| `metaworld/plate-slide-back-v2` | A task where the robot must slide a plate backward. | 500 | 4 | 39 | 6 |
|
||||
| `metaworld/plate-slide-back-side-v2` | A task involving the robot sliding a plate backward from the side. | 500 | 4 | 39 | 6 |
|
||||
| `metaworld/peg-unplug-side-v2` | A task where the robot must unplug a peg from the side. | 500 | 4 | 39 | 6 |
|
||||
| `metaworld/soccer-v2` | A task where the robot must play soccer. | 500 | 4 | 39 | 6 |
|
||||
| `metaworld/stick-push-v2` | A task involving the robot pushing a stick. | 500 | 4 | 39 | 6 |
|
||||
| `metaworld/stick-pull-v2` | A task where the robot must pull a stick. | 500 | 4 | 39 | 6 |
|
||||
| `metaworld/push-wall-v2` | A task involving the robot pushing against a wall. | 500 | 4 | 39 | 6 |
|
||||
| `metaworld/reach-wall-v2` | A task where the robot must reach an object with a wall. | 500 | 4 | 39 | 6 |
|
||||
| `metaworld/shelf-place-v2` | A task involving the robot placing an object on a shelf. | 500 | 4 | 39 | 6 |
|
||||
| `metaworld/sweep-into-v2` | A task where the robot must sweep objects into a container. | 500 | 4 | 39 | 6 |
|
||||
| `metaworld/sweep-v2` | A task requiring the robot to sweep. | 500 | 4 | 39 | 6 |
|
||||
| `metaworld/window-open-v2` | A task where the robot must open a window. | 500 | 4 | 39 | 6 |
|
||||
| `metaworld/window-close-v2` | A task involving the robot closing a window. | 500 | 4 | 39 | 6 |
|
||||
| `metaworld/assembly-v2` | A task where the robot must assemble components. | 150 | 4 | 39 | 6 |
|
||||
| `metaworld/basketball-v2` | A task where the robot must play a game of basketball. | 150 | 4 | 39 | 6 |
|
||||
| `metaworld/bin-picking-v2` | A task involving the robot picking objects from a bin. | 150 | 4 | 39 | 6 |
|
||||
| `metaworld/box-close-v2` | A task requiring the robot to close a box. | 150 | 4 | 39 | 6 |
|
||||
| `metaworld/button-press-topdown-v2` | A task where the robot must press a button from a top-down perspective. | 150 | 4 | 39 | 6 |
|
||||
| `metaworld/button-press-topdown-wall-v2` | A task involving the robot pressing a button with a wall from a top-down perspective. | 150 | 4 | 39 | 6 |
|
||||
| `metaworld/button-press-v2` | A task where the robot must press a button. | 150 | 4 | 39 | 6 |
|
||||
| `metaworld/button-press-wall-v2` | A task involving the robot pressing a button with a wall. | 150 | 4 | 39 | 6 |
|
||||
| `metaworld/coffee-button-v2` | A task where the robot must press a button on a coffee machine. | 150 | 4 | 39 | 6 |
|
||||
| `metaworld/coffee-pull-v2` | A task involving the robot pulling a lever on a coffee machine. | 150 | 4 | 39 | 6 |
|
||||
| `metaworld/coffee-push-v2` | A task involving the robot pushing a component on a coffee machine. | 150 | 4 | 39 | 6 |
|
||||
| `metaworld/dial-turn-v2` | A task where the robot must turn a dial. | 150 | 4 | 39 | 6 |
|
||||
| `metaworld/disassemble-v2` | A task requiring the robot to disassemble an object. | 150 | 4 | 39 | 6 |
|
||||
| `metaworld/door-close-v2` | A task where the robot must close a door. | 150 | 4 | 39 | 6 |
|
||||
| `metaworld/door-lock-v2` | A task involving the robot locking a door. | 150 | 4 | 39 | 6 |
|
||||
| `metaworld/door-open-v2` | A task where the robot must open a door. | 150 | 4 | 39 | 6 |
|
||||
| `metaworld/door-unlock-v2` | A task involving the robot unlocking a door. | 150 | 4 | 39 | 6 |
|
||||
| `metaworld/hand-insert-v2` | A task requiring the robot to insert a hand into an object. | 150 | 4 | 39 | 6 |
|
||||
| `metaworld/drawer-close-v2` | A task where the robot must close a drawer. | 150 | 4 | 39 | 6 |
|
||||
| `metaworld/drawer-open-v2` | A task involving the robot opening a drawer. | 150 | 4 | 39 | 6 |
|
||||
| `metaworld/faucet-open-v2` | A task requiring the robot to open a faucet. | 150 | 4 | 39 | 6 |
|
||||
| `metaworld/faucet-close-v2` | A task where the robot must close a faucet. | 150 | 4 | 39 | 6 |
|
||||
| `metaworld/hammer-v2` | A task where the robot must use a hammer. | 150 | 4 | 39 | 6 |
|
||||
| `metaworld/handle-press-side-v2` | A task involving the robot pressing a handle from the side. | 150 | 4 | 39 | 6 |
|
||||
| `metaworld/handle-press-v2` | A task where the robot must press a handle. | 150 | 4 | 39 | 6 |
|
||||
| `metaworld/handle-pull-side-v2` | A task requiring the robot to pull a handle from the side. | 150 | 4 | 39 | 6 |
|
||||
| `metaworld/handle-pull-v2` | A task where the robot must pull a handle. | 150 | 4 | 39 | 6 |
|
||||
| `metaworld/lever-pull-v2` | A task involving the robot pulling a lever. | 150 | 4 | 39 | 6 |
|
||||
| `metaworld/peg-insert-side-v2` | A task requiring the robot to insert a peg from the side. | 150 | 4 | 39 | 6 |
|
||||
| `metaworld/pick-place-wall-v2` | A task involving the robot picking and placing an object with a wall. | 150 | 4 | 39 | 6 |
|
||||
| `metaworld/pick-out-of-hole-v2` | A task where the robot must pick an object out of a hole. | 150 | 4 | 39 | 6 |
|
||||
| `metaworld/reach-v2` | A task where the robot must reach an object. | 150 | 4 | 39 | 6 |
|
||||
| `metaworld/push-back-v2` | A task involving the robot pushing an object backward. | 150 | 4 | 39 | 6 |
|
||||
| `metaworld/push-v2` | A task where the robot must push an object. | 150 | 4 | 39 | 6 |
|
||||
| `metaworld/pick-place-v2` | A task involving the robot picking up and placing an object. | 150 | 4 | 39 | 6 |
|
||||
| `metaworld/plate-slide-v2` | A task requiring the robot to slide a plate. | 150 | 4 | 39 | 6 |
|
||||
| `metaworld/plate-slide-side-v2` | A task involving the robot sliding a plate from the side. | 150 | 4 | 39 | 6 |
|
||||
| `metaworld/plate-slide-back-v2` | A task where the robot must slide a plate backward. | 150 | 4 | 39 | 6 |
|
||||
| `metaworld/plate-slide-back-side-v2` | A task involving the robot sliding a plate backward from the side. | 150 | 4 | 39 | 6 |
|
||||
| `metaworld/peg-unplug-side-v2` | A task where the robot must unplug a peg from the side. | 150 | 4 | 39 | 6 |
|
||||
| `metaworld/soccer-v2` | A task where the robot must play soccer. | 150 | 4 | 39 | 6 |
|
||||
| `metaworld/stick-push-v2` | A task involving the robot pushing a stick. | 150 | 4 | 39 | 6 |
|
||||
| `metaworld/stick-pull-v2` | A task where the robot must pull a stick. | 150 | 4 | 39 | 6 |
|
||||
| `metaworld/push-wall-v2` | A task involving the robot pushing against a wall. | 150 | 4 | 39 | 6 |
|
||||
| `metaworld/reach-wall-v2` | A task where the robot must reach an object with a wall. | 150 | 4 | 39 | 6 |
|
||||
| `metaworld/shelf-place-v2` | A task involving the robot placing an object on a shelf. | 150 | 4 | 39 | 6 |
|
||||
| `metaworld/sweep-into-v2` | A task where the robot must sweep objects into a container. | 150 | 4 | 39 | 6 |
|
||||
| `metaworld/sweep-v2` | A task requiring the robot to sweep. | 150 | 4 | 39 | 6 |
|
||||
| `metaworld/window-open-v2` | A task where the robot must open a window. | 150 | 4 | 39 | 6 |
|
||||
| `metaworld/window-close-v2` | A task involving the robot closing a window. | 150 | 4 | 39 | 6 |
|
||||
|
||||
## MP-Based Envs
|
||||
## MP Environments
|
||||
|
||||
All envs also exist in MP-variants. Refer to them using `metaworld_ProMP/<name-v2>` or `metaworld_ProDMP/<name-v2>` (DMP is currently not supported as of now).
|
||||
@@ -1,11 +1,20 @@
|
||||
# OpenAI Gym Wrappers
|
||||
# Gymnasium
|
||||
|
||||
These are the Environment Wrappers for selected [OpenAI Gym](https://gym.openai.com/) environments to use
|
||||
the Motion Primitive gym interface for them.
|
||||
<div class='center'>
|
||||
<img src="../_static/imgs/env_gifs/Lunar_Lander.gif" style="margin: 5%; width: 60%;">
|
||||
<p>Lunar Lander Task (LunarLander-v2)</p>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
We provide MP versions for selected [Farama Gymnasium](https://gymnasium.farama.org/) (previously OpenAI Gym) environments.
|
||||
|
||||
## Step-Based Environments
|
||||
|
||||
We refer to the [Gymnasium docs](https://gymnasium.farama.org/content/basic_usage/) for an overview of step-based environments provided by them.
|
||||
|
||||
## MP Environments
|
||||
|
||||
These environments are wrapped-versions of their OpenAI-gym counterparts.
|
||||
These environments are wrapped-versions of their Gymnasium counterparts.
|
||||
|
||||
| Name | Description | Trajectory Horizon | Action Dimension |
|
||||
| ------------------------------------ | -------------------------------------------------------------------- | ------------------ | ---------------- |
|
||||
@@ -0,0 +1,6 @@
|
||||
DeepMind Control Examples
|
||||
=========================
|
||||
|
||||
.. literalinclude:: ../../../fancy_gym/examples/examples_dmc.py
|
||||
:language: python
|
||||
:linenos:
|
||||
@@ -0,0 +1,8 @@
|
||||
.. _example-general:
|
||||
|
||||
General Usage Examples
|
||||
======================
|
||||
|
||||
.. literalinclude:: ../../../fancy_gym/examples/examples_general.py
|
||||
:language: python
|
||||
:linenos:
|
||||
@@ -0,0 +1,6 @@
|
||||
Metaworld Examples
|
||||
==================
|
||||
|
||||
.. literalinclude:: ../../../fancy_gym/examples/examples_metaworld.py
|
||||
:language: python
|
||||
:linenos:
|
||||
@@ -0,0 +1,9 @@
|
||||
.. _example-mp:
|
||||
|
||||
|
||||
Movement Primitives Examples
|
||||
============================
|
||||
|
||||
.. literalinclude:: ../../../fancy_gym/examples/examples_movement_primitives.py
|
||||
:language: python
|
||||
:linenos:
|
||||
@@ -0,0 +1,6 @@
|
||||
MP Params Tuning Example
|
||||
========================
|
||||
|
||||
.. literalinclude:: ../../../fancy_gym/examples/mp_params_tuning.py
|
||||
:language: python
|
||||
:linenos:
|
||||
@@ -0,0 +1,6 @@
|
||||
OpenAI Envs Examples
|
||||
====================
|
||||
|
||||
.. literalinclude:: ../../../fancy_gym/examples/examples_open_ai.py
|
||||
:language: python
|
||||
:linenos:
|
||||
@@ -0,0 +1,6 @@
|
||||
PD Control Gain Tuning Example
|
||||
==============================
|
||||
|
||||
.. literalinclude:: ../../../fancy_gym/examples/pd_control_gain_tuning.py
|
||||
:language: python
|
||||
:linenos:
|
||||
@@ -0,0 +1,6 @@
|
||||
Replanning Example
|
||||
==================
|
||||
|
||||
.. literalinclude:: ../../../fancy_gym/examples/example_replanning_envs.py
|
||||
:language: python
|
||||
:linenos:
|
||||
@@ -0,0 +1,23 @@
|
||||
fancy\_gym.envs
|
||||
===============
|
||||
|
||||
.. automodule:: fancy_gym.envs
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
fancy\_gym.register
|
||||
===================
|
||||
|
||||
.. currentmodule:: fancy_gym
|
||||
|
||||
.. autofunction:: register
|
||||
@@ -0,0 +1,6 @@
|
||||
fancy\_gym.upgrade
|
||||
==================
|
||||
|
||||
.. currentmodule:: fancy_gym
|
||||
|
||||
.. autofunction:: upgrade
|
||||
@@ -0,0 +1,125 @@
|
||||
Basic Usage
|
||||
-----------
|
||||
|
||||
We will only show the basics here and prepared :ref:`multiple examples <example-general>` for a more detailed look.
|
||||
|
||||
Step-Based Environments
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Regular step based environments added by Fancy Gym are added into the
|
||||
``fancy/`` namespace.
|
||||
|
||||
.. note::
|
||||
Legacy versions of Fancy Gym used ``fancy_gym.make(...)``. This is no longer supported and will raise an Exception on new versions.
|
||||
|
||||
.. code:: python
|
||||
|
||||
import gymnasium as gym
|
||||
import fancy_gym
|
||||
|
||||
env = gym.make('fancy/Reacher5d-v0')
|
||||
# or env = gym.make('metaworld/reach-v2') # fancy_gym allows access to all metaworld ML1 tasks via the metaworld/ NS
|
||||
# or env = gym.make('dm_control/ball_in_cup-catch-v0')
|
||||
# or env = gym.make('Reacher-v2')
|
||||
observation = env.reset(seed=1)
|
||||
|
||||
for i in range(1000):
|
||||
action = env.action_space.sample()
|
||||
observation, reward, terminated, truncated, info = env.step(action)
|
||||
if i % 5 == 0:
|
||||
env.render()
|
||||
|
||||
if terminated or truncated:
|
||||
observation, info = env.reset()
|
||||
|
||||
Black-Box Environments
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
All environments provide by default the cumulative episode reward, this
|
||||
can however be changed if necessary. Optionally, each environment
|
||||
returns all collected information from each step as part of the infos.
|
||||
This information is, however, mainly meant for debugging as well as
|
||||
logging and not for training.
|
||||
|
||||
+---------------------+--------------------------------------------------------------------------------------------------------------------------------------------+----------+
|
||||
| Key | Description | Type |
|
||||
+=====================+============================================================================================================================================+==========+
|
||||
| `positions` | Generated trajectory from MP | Optional |
|
||||
+---------------------+--------------------------------------------------------------------------------------------------------------------------------------------+----------+
|
||||
| `velocities` | Generated trajectory from MP | Optional |
|
||||
+---------------------+--------------------------------------------------------------------------------------------------------------------------------------------+----------+
|
||||
| `step_actions` | Step-wise executed action based on controller output | Optional |
|
||||
+---------------------+--------------------------------------------------------------------------------------------------------------------------------------------+----------+
|
||||
| `step_observations` | Step-wise intermediate observations | Optional |
|
||||
+---------------------+--------------------------------------------------------------------------------------------------------------------------------------------+----------+
|
||||
| `step_rewards` | Step-wise rewards | Optional |
|
||||
+---------------------+--------------------------------------------------------------------------------------------------------------------------------------------+----------+
|
||||
| `trajectory_length` | Total number of environment interactions | Always |
|
||||
+---------------------+--------------------------------------------------------------------------------------------------------------------------------------------+----------+
|
||||
| `other` | All other information from the underlying environment are returned as a list with length `trajectory_length` maintaining the original key. | Always |
|
||||
| | In case some information are not provided every time step, the missing values are filled with `None`. | |
|
||||
+---------------------+--------------------------------------------------------------------------------------------------------------------------------------------+----------+
|
||||
|
||||
Existing MP tasks can be created the same way as above. The namespace of
|
||||
a MP-variant of an environment is given by
|
||||
``<original namespace>_<MP name>/``. Just keep in mind, calling
|
||||
``step()`` executes a full trajectory.
|
||||
|
||||
.. note::
|
||||
Currently, we are also in the process of enabling replanning as
|
||||
well as learning of sub-trajectories. This allows to split the
|
||||
episode into multiple trajectories and is a hybrid setting between
|
||||
step-based and black-box leaning. While this is already
|
||||
implemented, it is still in beta and requires further testing. Feel
|
||||
free to try it and open an issue with any problems that occur.
|
||||
|
||||
.. code:: python
|
||||
|
||||
import gymnasium as gym
|
||||
import fancy_gym
|
||||
|
||||
env = gym.make('fancy_ProMP/Reacher5d-v0')
|
||||
# or env = gym.make('metaworld_ProDMP/reach-v2')
|
||||
# or env = gym.make('dm_control_DMP/ball_in_cup-catch-v0')
|
||||
# or env = gym.make('gym_ProMP/Reacher-v2') # mp versions of envs added directly by gymnasium are in the gym_<MP-type> NS
|
||||
|
||||
# render() can be called once in the beginning with all necessary arguments.
|
||||
# To turn it of again just call render() without any arguments.
|
||||
env.render(mode='human')
|
||||
|
||||
# This returns the context information, not the full state observation
|
||||
observation, info = env.reset(seed=1)
|
||||
|
||||
for i in range(5):
|
||||
action = env.action_space.sample()
|
||||
observation, reward, terminated, truncated, info = env.step(action)
|
||||
|
||||
# terminated or truncated is always True as we are working on the episode level, hence we always reset()
|
||||
observation, info = env.reset()
|
||||
|
||||
To show all available environments, we provide some additional
|
||||
convenience variables. All of them return a dictionary with the keys
|
||||
``DMP``, ``ProMP``, ``ProDMP`` and ``all`` that store a list of
|
||||
available environment ids.
|
||||
|
||||
.. code:: python
|
||||
|
||||
import fancy_gym
|
||||
|
||||
print("All Black-box tasks:")
|
||||
print(fancy_gym.ALL_MOVEMENT_PRIMITIVE_ENVIRONMENTS)
|
||||
|
||||
print("Fancy Black-box tasks:")
|
||||
print(fancy_gym.ALL_FANCY_MOVEMENT_PRIMITIVE_ENVIRONMENTS)
|
||||
|
||||
print("OpenAI Gym Black-box tasks:")
|
||||
print(fancy_gym.ALL_GYM_MOVEMENT_PRIMITIVE_ENVIRONMENTS)
|
||||
|
||||
print("Deepmind Control Black-box tasks:")
|
||||
print(fancy_gym.ALL_DMC_MOVEMENT_PRIMITIVE_ENVIRONMENTS)
|
||||
|
||||
print("MetaWorld Black-box tasks:")
|
||||
print(fancy_gym.ALL_METAWORLD_MOVEMENT_PRIMITIVE_ENVIRONMENTS)
|
||||
|
||||
print("If you add custom envs, their mp versions will be found in:")
|
||||
print(fancy_gym.MOVEMENT_PRIMITIVE_ENVIRONMENTS_FOR_NS['<my_custom_namespace>'])
|
||||
@@ -0,0 +1,36 @@
|
||||
What is Episodic RL?
|
||||
--------------------
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<div class="justify">
|
||||
|
||||
Movement primitive (MP) environments differ from traditional step-based
|
||||
environments. They align more with concepts from stochastic search,
|
||||
black-box optimization, and methods commonly found in classical robotics
|
||||
and control. Instead of individual steps, MP environments operate on an
|
||||
episode basis, executing complete trajectories. These trajectories are
|
||||
produced by trajectory generators like Dynamic Movement Primitives
|
||||
(DMP), Probabilistic Movement Primitives (ProMP) or Probabilistic
|
||||
Dynamic Movement Primitives (ProDMP).
|
||||
|
||||
|
||||
Once generated, these trajectories are converted into step-by-step
|
||||
actions using a trajectory tracking controller. The specific controller
|
||||
chosen depends on the environment’s requirements. Currently, we support
|
||||
position, velocity, and PD-Controllers tailored for position, velocity,
|
||||
and torque control. Additionally, we have a specialized controller
|
||||
designed for the MetaWorld control suite.
|
||||
|
||||
|
||||
While the overarching objective of MP environments remains the learning
|
||||
of an optimal policy, the actions here represent the parametrization of
|
||||
motion primitives to craft the right trajectory. Our framework further
|
||||
enhances this by accommodating a contextual setting. At the episode’s
|
||||
onset, we present the context space—a subset of the observation space.
|
||||
This demands the prediction of a new action or MP parametrization for
|
||||
every unique context.
|
||||
|
||||
.. raw:: html
|
||||
|
||||
</div>
|
||||
@@ -0,0 +1,73 @@
|
||||
Installation
|
||||
------------
|
||||
|
||||
.. note::
|
||||
We recommend installing ``fancy_gym`` into a virtual environment as
|
||||
provided by `venv <https://docs.python.org/3/library/venv.html>`__. 3rd
|
||||
party alternatives to venv like `Poetry <https://python-poetry.org/>`__
|
||||
or `Conda <https://docs.conda.io/en/latest/>`__ can also be used.
|
||||
|
||||
Installation from PyPI (recommended)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Install ``fancy_gym`` via
|
||||
|
||||
.. code:: bash
|
||||
|
||||
pip install fancy_gym
|
||||
|
||||
We have a few optional dependencies. If you also want to install those
|
||||
use
|
||||
|
||||
.. code:: bash
|
||||
|
||||
# to install all optional dependencies
|
||||
pip install 'fancy_gym[all]'
|
||||
|
||||
# or choose only those you want
|
||||
pip install 'fancy_gym[dmc,box2d,mujoco-legacy,jax,testing]'
|
||||
|
||||
Pip can not automatically install up-to-date versions of metaworld,
|
||||
since they are not avaible on PyPI yet. Install metaworld via
|
||||
|
||||
.. code:: bash
|
||||
|
||||
pip install metaworld@git+https://github.com/Farama-Foundation/Metaworld.git@d155d0051630bb365ea6a824e02c66c068947439#egg=metaworld
|
||||
|
||||
Installation from master
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
1. Clone the repository
|
||||
|
||||
.. code:: bash
|
||||
|
||||
git clone git@github.com:ALRhub/fancy_gym.git
|
||||
|
||||
2. Go to the folder
|
||||
|
||||
.. code:: bash
|
||||
|
||||
cd fancy_gym
|
||||
|
||||
3. Install with
|
||||
|
||||
.. code:: bash
|
||||
|
||||
pip install -e .
|
||||
|
||||
We have a few optional dependencies. If you also want to install those
|
||||
use
|
||||
|
||||
.. code:: bash
|
||||
|
||||
# to install all optional dependencies
|
||||
pip install -e '.[all]'
|
||||
|
||||
# or choose only those you want
|
||||
pip install -e '.[dmc,box2d,mujoco-legacy,jax,testing]'
|
||||
|
||||
Metaworld has to be installed manually with
|
||||
|
||||
.. code:: bash
|
||||
|
||||
pip install metaworld@git+https://github.com/Farama-Foundation/Metaworld.git@d155d0051630bb365ea6a824e02c66c068947439#egg=metaworld
|
||||
@@ -0,0 +1,138 @@
|
||||
Creating new MP Environments
|
||||
----------------------------
|
||||
|
||||
This guide will explain to you how to upgrade an existing step-based Gymnasium environment into one, that supports Movement Primitives (MPs). If you are looking for a guide to build such a Gymnasium environment instead, please have a look at `this guide <https://gymnasium.farama.org/tutorials/gymnasium_basics/environment_creation/>`__.
|
||||
|
||||
In case a required task is not supported yet in the MP framework, it can
|
||||
be created relatively easy. For the task at hand, the following
|
||||
`interface <https://github.com/ALRhub/fancy_gym/tree/master/fancy_gym/black_box/raw_interface_wrapper.py>`__
|
||||
needs to be implemented.
|
||||
|
||||
.. code:: python
|
||||
|
||||
from abc import abstractmethod
|
||||
from typing import Union, Tuple
|
||||
|
||||
import gymnasium as gym
|
||||
import numpy as np
|
||||
|
||||
|
||||
class RawInterfaceWrapper(gym.Wrapper):
|
||||
mp_config = {
|
||||
'ProMP': {},
|
||||
'DMP': {},
|
||||
'ProDMP': {},
|
||||
}
|
||||
|
||||
@property
|
||||
def context_mask(self) -> np.ndarray:
|
||||
"""
|
||||
Returns boolean mask of the same shape as the observation space.
|
||||
It determines whether the observation is returned for the contextual case or not.
|
||||
This effectively allows to filter unwanted or unnecessary observations from the full step-based case.
|
||||
E.g. Velocities starting at 0 are only changing after the first action. Given we only receive the
|
||||
context/part of the first observation, the velocities are not necessary in the observation for the task.
|
||||
Returns:
|
||||
bool array representing the indices of the observations
|
||||
"""
|
||||
return np.ones(self.env.observation_space.shape[0], dtype=bool)
|
||||
|
||||
@property
|
||||
@abstractmethod
|
||||
def current_pos(self) -> Union[float, int, np.ndarray, Tuple]:
|
||||
"""
|
||||
Returns the current position of the action/control dimension.
|
||||
The dimensionality has to match the action/control dimension.
|
||||
This is not required when exclusively using velocity control,
|
||||
it should, however, be implemented regardless.
|
||||
E.g. The joint positions that are directly or indirectly controlled by the action.
|
||||
"""
|
||||
raise NotImplementedError()
|
||||
|
||||
@property
|
||||
@abstractmethod
|
||||
def current_vel(self) -> Union[float, int, np.ndarray, Tuple]:
|
||||
"""
|
||||
Returns the current velocity of the action/control dimension.
|
||||
The dimensionality has to match the action/control dimension.
|
||||
This is not required when exclusively using position control,
|
||||
it should, however, be implemented regardless.
|
||||
E.g. The joint velocities that are directly or indirectly controlled by the action.
|
||||
"""
|
||||
raise NotImplementedError()
|
||||
|
||||
Default configurations for MPs can be overitten by defining attributes
|
||||
in mp_config. Available parameters are documented in the `MP_PyTorch
|
||||
Userguide <https://github.com/ALRhub/MP_PyTorch/blob/main/doc/README.md>`__.
|
||||
|
||||
.. code:: python
|
||||
|
||||
class RawInterfaceWrapper(gym.Wrapper):
|
||||
mp_config = {
|
||||
'ProMP': {
|
||||
'phase_generator_kwargs': {
|
||||
'phase_generator_type': 'linear'
|
||||
# When selecting another generator type, the default configuration will not be merged for the attribute.
|
||||
},
|
||||
'controller_kwargs': {
|
||||
'p_gains': 0.5 * np.array([1.0, 4.0, 2.0, 4.0, 1.0, 4.0, 1.0]),
|
||||
'd_gains': 0.5 * np.array([0.1, 0.4, 0.2, 0.4, 0.1, 0.4, 0.1]),
|
||||
},
|
||||
'basis_generator_kwargs': {
|
||||
'num_basis': 3,
|
||||
'num_basis_zero_start': 1,
|
||||
'num_basis_zero_goal': 1,
|
||||
},
|
||||
},
|
||||
'DMP': {},
|
||||
'ProDMP': {}.
|
||||
}
|
||||
|
||||
[...]
|
||||
|
||||
If you created a new task wrapper, feel free to open a PR, so we can
|
||||
integrate it for others to use as well. Without the integration the task
|
||||
can still be used. A rough outline can be shown here, for more details
|
||||
we recommend having a look at the
|
||||
:ref:`multiple examples <example-mp>`.
|
||||
|
||||
If the step-based is already registered with gym, you can simply do the
|
||||
following:
|
||||
|
||||
.. code:: python
|
||||
|
||||
fancy_gym.upgrade(
|
||||
id='custom/cool_new_env-v0',
|
||||
mp_wrapper=my_custom_MPWrapper
|
||||
)
|
||||
|
||||
If the step-based is not yet registered with gym we can add both the
|
||||
step-based and MP-versions via
|
||||
|
||||
.. code:: python
|
||||
|
||||
fancy_gym.register(
|
||||
id='custom/cool_new_env-v0',
|
||||
entry_point=my_custom_env,
|
||||
mp_wrapper=my_custom_MPWrapper
|
||||
)
|
||||
|
||||
From this point on, you can access MP-version of your environments via
|
||||
|
||||
.. code:: python
|
||||
|
||||
env = gym.make('custom_ProDMP/cool_new_env-v0')
|
||||
|
||||
rewards = 0
|
||||
observation, info = env.reset()
|
||||
|
||||
# number of samples/full trajectories (multiple environment steps)
|
||||
for i in range(5):
|
||||
ac = env.action_space.sample()
|
||||
observation, reward, terminated, truncated, info = env.step(ac)
|
||||
rewards += reward
|
||||
|
||||
if terminated or truncated:
|
||||
print(rewards)
|
||||
rewards = 0
|
||||
observation, info = env.reset()
|
||||
@@ -0,0 +1,166 @@
|
||||
Fancy Gym
|
||||
=========
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<div style="text-align: center;">
|
||||
<img src="_static/imgs/fancy_namelogo.svg" style="margin: 5%; width: 80%;"></a>
|
||||
</div>
|
||||
<style>
|
||||
/* Little Hack: We don't want to show the title (ugly), but need to define it since it also sets the pages metadata (for titlebar and stuff) */
|
||||
h1 {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
Built upon the foundation of
|
||||
`Gymnasium <https://gymnasium.farama.org/>`__ (a maintained fork of
|
||||
OpenAI’s renowned Gym library) ``fancy_gym`` offers a comprehensive
|
||||
collection of reinforcement learning environments.
|
||||
|
||||
Key Features
|
||||
------------
|
||||
|
||||
- **New Challenging Environments**: ``fancy_gym`` includes several new
|
||||
environments (`Panda Box Pushing <envs/fancy/mujoco.html#box-pushing>`_,
|
||||
`Table Tennis <envs/fancy/mujoco.html#table-tennis>`_,
|
||||
`etc. <envs/fancy/index.html>`_) that present a higher degree of
|
||||
difficulty, pushing the boundaries of reinforcement learning research.
|
||||
- **Support for Movement Primitives**: ``fancy_gym`` supports a range
|
||||
of movement primitives (MPs), including Dynamic Movement Primitives
|
||||
(DMPs), Probabilistic Movement Primitives (ProMP), and Probabilistic
|
||||
Dynamic Movement Primitives (ProDMP).
|
||||
- **Upgrade to Movement Primitives**: With our framework, it’s
|
||||
straightforward to transform standard Gymnasium environments into
|
||||
environments that support movement primitives.
|
||||
- **Benchmark Suite Compatibility**: ``fancy_gym`` makes it easy to
|
||||
access renowned benchmark suites such as `DeepMind
|
||||
Control <envs/dmc.html>`__
|
||||
and `Metaworld <envs/meta.html>`__, whether you want
|
||||
to use them in the regular step-based setting or using MPs.
|
||||
- **Contribute Your Own Environments**: If you’re inspired to create
|
||||
custom gym environments, both step-based and with movement
|
||||
primitives, this
|
||||
`guide <guide/upgrading_envs.html>`__
|
||||
will assist you. We encourage and highly appreciate submissions via
|
||||
PRs to integrate these environments into ``fancy_gym``.
|
||||
|
||||
Quickstart Guide
|
||||
----------------
|
||||
|
||||
Install via pip (`or use an alternative installation method <guide/installation.html>`__)
|
||||
|
||||
.. code:: bash
|
||||
|
||||
pip install 'fancy_gym[all]'
|
||||
|
||||
|
||||
Try out one of our step-based environments (`or explore our other envs <envs/fancy/index.html>`__)
|
||||
|
||||
.. code:: python
|
||||
|
||||
import gymnasium as gym
|
||||
import fancy_gym
|
||||
import time
|
||||
|
||||
env = gym.make('fancy/BoxPushingDense-v0', render_mode='human')
|
||||
observation = env.reset()
|
||||
env.render()
|
||||
|
||||
for i in range(1000):
|
||||
action = env.action_space.sample() # Randomly sample an action
|
||||
observation, reward, terminated, truncated, info = env.step(action)
|
||||
time.sleep(1/env.metadata['render_fps'])
|
||||
|
||||
if terminated or truncated:
|
||||
observation, info = env.reset()
|
||||
|
||||
|
||||
Explore the MP-based variant (`or learn more about Movement Primitives (MPs) <guide/episodic_rl.html>`__)
|
||||
|
||||
.. code:: python
|
||||
|
||||
import gymnasium as gym
|
||||
import fancy_gym
|
||||
|
||||
env = gym.make('fancy_ProMP/BoxPushingDense-v0', render_mode='human')
|
||||
env.reset()
|
||||
env.render()
|
||||
|
||||
for i in range(10):
|
||||
action = env.action_space.sample() # Randomly sample MP parameters
|
||||
observation, reward, terminated, truncated, info = env.step(action) # Will execute full trajectory, based on MP
|
||||
observation = env.reset()
|
||||
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 3
|
||||
:caption: User Guide
|
||||
|
||||
guide/installation
|
||||
guide/episodic_rl
|
||||
guide/basic_usage
|
||||
guide/upgrading_envs
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 3
|
||||
:caption: Environments
|
||||
|
||||
envs/fancy/index
|
||||
envs/dmc
|
||||
envs/meta
|
||||
envs/open_ai
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 3
|
||||
:caption: Examples
|
||||
|
||||
examples/general
|
||||
examples/dmc
|
||||
examples/metaworld
|
||||
examples/open_ai
|
||||
examples/movement_primitives
|
||||
examples/mp_params_tuning
|
||||
examples/pd_control_gain_tuning
|
||||
examples/replanning_envs
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 3
|
||||
:caption: API
|
||||
|
||||
api
|
||||
|
||||
Citing the Project
|
||||
------------------
|
||||
|
||||
To cite `fancy_gym` in publications:
|
||||
|
||||
.. code:: bibtex
|
||||
|
||||
@software{fancy_gym,
|
||||
title = {Fancy Gym},
|
||||
author = {Otto, Fabian and Celik, Onur and Roth, Dominik and Zhou, Hongyi},
|
||||
abstract = {Fancy Gym: Unifying interface for various RL benchmarks with support for Black Box approaches.},
|
||||
url = {https://github.com/ALRhub/fancy_gym},
|
||||
organization = {Autonomous Learning Robots Lab (ALR) at KIT},
|
||||
}
|
||||
|
||||
Icon Attribution
|
||||
----------------
|
||||
|
||||
The icon is based on the
|
||||
`Gymnasium <https://github.com/Farama-Foundation/Gymnasium>`__ icon as
|
||||
can be found
|
||||
`here <https://gymnasium.farama.org/_static/img/gymnasium_black.svg>`__.
|
||||
|
||||
=================
|
||||
|
||||
.. raw:: html
|
||||
|
||||
<div style="text-align: center; background: #f8f8f8; border-radius: 10px;">
|
||||
<a href="https://alr.iar.kit.edu/"><img src="_static/imgs/alr.svg" style="margin: 5%; width: 20%;"></a>
|
||||
<a href="https://www.kit.edu/"><img src="_static/imgs/kit.svg" style="margin: 5%; width: 20%;"></a>
|
||||
<a href="https://uni-tuebingen.de/"><img src="_static/imgs/uni_tuebingen.svg" style="margin: 5%; width: 20%;"></a>
|
||||
</div>
|
||||
<br>
|
||||
@@ -1,19 +0,0 @@
|
||||
# DeepMind Control (DMC) Wrappers
|
||||
|
||||
These are the Environment Wrappers for selected
|
||||
[DeepMind Control](https://deepmind.com/research/publications/2020/dm-control-Software-and-Tasks-for-Continuous-Control)
|
||||
environments in order to use our Motion Primitive gym interface with them.
|
||||
|
||||
## MP Environments
|
||||
|
||||
[//]: <> (These environments are wrapped-versions of their Deep Mind Control Suite (DMC) counterparts. Given most task can be)
|
||||
[//]: <> (solved in shorter horizon lengths than the original 1000 steps, we often shorten the episodes for those task.)
|
||||
|
||||
| Name | Description | Trajectory Horizon | Action Dimension | Context Dimension |
|
||||
| ---------------------------------------- | ------------------------------------------------------------------------------ | ------------------ | ---------------- | ----------------- |
|
||||
| `dm_control_ProDMP/ball_in_cup-catch-v0` | A ProMP wrapped version of the "catch" task for the "ball_in_cup" environment. | 1000 | 10 | 2 |
|
||||
| `dm_control_DMP/ball_in_cup-catch-v0` | A DMP wrapped version of the "catch" task for the "ball_in_cup" environment. | 1000 | 10 | 2 |
|
||||
| `dm_control_ProDMP/reacher-easy-v0` | A ProMP wrapped version of the "easy" task for the "reacher" environment. | 1000 | 10 | 4 |
|
||||
| `dm_control_DMP/reacher-easy-v0` | A DMP wrapped version of the "easy" task for the "reacher" environment. | 1000 | 10 | 4 |
|
||||
| `dm_control_ProDMP/reacher-hard-v0` | A ProMP wrapped version of the "hard" task for the "reacher" environment. | 1000 | 10 | 4 |
|
||||
| `dm_control_DMP/reacher-hard-v0` | A DMP wrapped version of the "hard" task for the "reacher" environment. | 1000 | 10 | 4 |
|
||||
@@ -291,7 +291,7 @@ register(
|
||||
)
|
||||
|
||||
# Air Hockey environments
|
||||
for env_mode in ["7dof-hit", "7dof-defend", "3dof-hit", "3dof-defend"]:
|
||||
for env_mode in ["7dof-hit", "7dof-defend", "3dof-hit", "3dof-defend", "7dof-hit-airhockit2023", "7dof-defend-airhockit2023"]:
|
||||
register(
|
||||
id=f'fancy/AirHockey-{env_mode}-v0',
|
||||
entry_point='fancy_gym.envs.mujoco:AirHockeyEnv',
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
# Custom Mujoco tasks
|
||||
|
||||
## Step-based Environments
|
||||
|
||||
| Name | Description | Horizon | Action Dimension | Observation Dimension |
|
||||
| ------------------------------------------ | -------------------------------------------------------------------------------------------------- | ------- | ---------------- | --------------------- |
|
||||
| `fancy/Reacher-v0` | Modified (5 links) gymnasiums's mujoco `Reacher-v2` (2 links) | 200 | 5 | 21 |
|
||||
| `fancy/ReacherSparse-v0` | Same as `fancy/Reacher-v0`, but the distance penalty is only provided in the last time step. | 200 | 5 | 21 |
|
||||
| `fancy/ReacherSparseBalanced-v0` | Same as `fancy/ReacherSparse-v0`, but the end-effector has to remain upright. | 200 | 5 | 21 |
|
||||
| `fancy/LongReacher-v0` | Modified (7 links) gymnasiums's mujoco `Reacher-v2` (2 links) | 200 | 7 | 27 |
|
||||
| `fancy/LongReacherSparse-v0` | Same as `fancy/LongReacher-v0`, but the distance penalty is only provided in the last time step. | 200 | 7 | 27 |
|
||||
| `fancy/LongReacherSparseBalanced-v0` | Same as `fancy/LongReacherSparse-v0`, but the end-effector has to remain upright. | 200 | 7 | 27 |
|
||||
| `fancy/Reacher5d-v0` | Reacher task with 5 links, based on Gymnasium's `gym.envs.mujoco.ReacherEnv` | 200 | 5 | 20 |
|
||||
| `fancy/Reacher5dSparse-v0` | Sparse Reacher task with 5 links, based on Gymnasium's `gym.envs.mujoco.ReacherEnv` | 200 | 5 | 20 |
|
||||
| `fancy/Reacher7d-v0` | Reacher task with 7 links, based on Gymnasium's `gym.envs.mujoco.ReacherEnv` | 200 | 7 | 22 |
|
||||
| `fancy/Reacher7dSparse-v0` | Sparse Reacher task with 7 links, based on Gymnasium's `gym.envs.mujoco.ReacherEnv` | 200 | 7 | 22 |
|
||||
| `fancy/HopperJumpSparse-v0` | Hopper Jump task with sparse rewards, based on Gymnasium's `gym.envs.mujoco.Hopper` | 250 | 3 | 15 / 16\* |
|
||||
| `fancy/HopperJump-v0` | Hopper Jump task with continuous rewards, based on Gymnasium's `gym.envs.mujoco.Hopper` | 250 | 3 | 15 / 16\* |
|
||||
| `fancy/AntJump-v0` | Ant Jump task, based on Gymnasium's `gym.envs.mujoco.Ant` | 200 | 8 | 119 |
|
||||
| `fancy/HalfCheetahJump-v0` | HalfCheetah Jump task, based on Gymnasium's `gym.envs.mujoco.HalfCheetah` | 100 | 6 | 112 |
|
||||
| `fancy/HopperJumpOnBox-v0` | Hopper Jump on Box task, based on Gymnasium's `gym.envs.mujoco.Hopper` | 250 | 4 | 16 / 100\* |
|
||||
| `fancy/HopperThrow-v0` | Hopper Throw task, based on Gymnasium's `gym.envs.mujoco.Hopper` | 250 | 3 | 18 / 100\* |
|
||||
| `fancy/HopperThrowInBasket-v0` | Hopper Throw in Basket task, based on Gymnasium's `gym.envs.mujoco.Hopper` | 250 | 3 | 18 / 100\* |
|
||||
| `fancy/Walker2DJump-v0` | Walker 2D Jump task, based on Gymnasium's `gym.envs.mujoco.Walker2d` | 300 | 6 | 18 / 19\* |
|
||||
| `fancy/BeerPong-v0` | Beer Pong task, based on a custom environment with multiple task variations | 300 | 3 | 29 |
|
||||
| `fancy/BeerPongStepBased-v0` | Step-based Beer Pong task, based on a custom environment with episodic rewards | 300 | 3 | 29 |
|
||||
| `fancy/BeerPongFixedRelease-v0` | Beer Pong with fixed release, based on a custom environment with episodic rewards | 300 | 3 | 29 |
|
||||
| `fancy/BoxPushingDense-v0` | Custom Box-pushing task with dense rewards | 100 | 3 | 13 |
|
||||
| `fancy/BoxPushingTemporalSparse-v0` | Custom Box-pushing task with temporally sparse rewards | 100 | 3 | 13 |
|
||||
| `fancy/BoxPushingTemporalSpatialSparse-v0` | Custom Box-pushing task with temporally and spatially sparse rewards | 100 | 3 | 13 |
|
||||
| `fancy/TableTennis2D-v0` | Table Tennis task with 2D context, based on a custom environment for table tennis | 350 | 7 | 19 |
|
||||
| `fancy/TableTennis2DReplan-v0` | Table Tennis task with 2D context and replanning, based on a custom environment for table tennis | 350 | 7 | 19 |
|
||||
| `fancy/TableTennis4D-v0` | Table Tennis task with 4D context, based on a custom environment for table tennis | 350 | 7 | 22 |
|
||||
| `fancy/TableTennis4DReplan-v0` | Table Tennis task with 4D context and replanning, based on a custom environment for table tennis | 350 | 7 | 22 |
|
||||
| `fancy/TableTennisWind-v0` | Table Tennis task with wind effects, based on a custom environment for table tennis | 350 | 7 | 19 |
|
||||
| `fancy/TableTennisGoalSwitching-v0` | Table Tennis task with goal switching, based on a custom environment for table tennis | 350 | 7 | 19 |
|
||||
| `fancy/TableTennisWindReplan-v0` | Table Tennis task with wind effects and replanning, based on a custom environment for table tennis | 350 | 7 | 19 |
|
||||
|
||||
\*Observation dimensions depend on configuration.
|
||||
|
||||
<!--
|
||||
No longer used?
|
||||
| Name | Description | Horizon | Action Dimension | Observation Dimension |
|
||||
| --------------------------- | --------------------------------------------------------------------------------------------------- | ------- | ---------------- | --------------------- |
|
||||
| `fancy/BallInACupSimple-v0` | Ball-in-a-cup task where a robot needs to catch a ball attached to a cup at its end-effector. | 4000 | 3 | wip |
|
||||
| `fancy/BallInACup-v0` | Ball-in-a-cup task where a robot needs to catch a ball attached to a cup at its end-effector | 4000 | 7 | wip |
|
||||
| `fancy/BallInACupGoal-v0` | Similar to `fancy/BallInACupSimple-v0` but the ball needs to be caught at a specified goal position | 4000 | 7 | wip |
|
||||
-->
|
||||
@@ -8,9 +8,9 @@ from fancy_gym.envs.mujoco.air_hockey.utils import robot_to_world
|
||||
from mushroom_rl.core import Environment
|
||||
|
||||
class AirHockeyEnv(Environment):
|
||||
metadata = {"render_modes": ["human"], "render_fps": 50}
|
||||
metadata = {"render_modes": ["human", "rgb_array"], "render_fps": 50}
|
||||
|
||||
def __init__(self, env_mode=None, interpolation_order=3, render_mode=None, **kwargs):
|
||||
def __init__(self, env_mode=None, interpolation_order=3, render_mode=None, width=1920, height=1080, **kwargs):
|
||||
"""
|
||||
Environment Constructor
|
||||
|
||||
@@ -30,7 +30,10 @@ class AirHockeyEnv(Environment):
|
||||
"7dof-defend": position.IiwaPositionDefend,
|
||||
|
||||
"3dof-hit": position.PlanarPositionHit,
|
||||
"3dof-defend": position.PlanarPositionDefend
|
||||
"3dof-defend": position.PlanarPositionDefend,
|
||||
|
||||
"7dof-hit-airhockit2023": position.IiwaPositionHitAirhocKIT2023,
|
||||
"7dof-defend-airhockit2023": position.IiwaPositionDefendAirhocKIT2023,
|
||||
}
|
||||
|
||||
if env_mode not in env_dict:
|
||||
@@ -39,37 +42,53 @@ class AirHockeyEnv(Environment):
|
||||
if env_mode == "tournament" and type(interpolation_order) != tuple:
|
||||
interpolation_order = (interpolation_order, interpolation_order)
|
||||
|
||||
self.render_mode = render_mode
|
||||
self.render_human_active = False
|
||||
|
||||
# Determine headless mode based on render_mode
|
||||
headless = self.render_mode == 'rgb_array'
|
||||
|
||||
# Prepare viewer_params
|
||||
viewer_params = kwargs.get('viewer_params', {})
|
||||
viewer_params.update({'headless': headless, 'width': width, 'height': height})
|
||||
kwargs['viewer_params'] = viewer_params
|
||||
|
||||
self.base_env = env_dict[env_mode](interpolation_order=interpolation_order, **kwargs)
|
||||
self.env_name = env_mode
|
||||
self.env_info = self.base_env.env_info
|
||||
single_robot_obs_size = len(self.base_env.info.observation_space.low)
|
||||
if env_mode == "tournament":
|
||||
self.observation_space = spaces.Box(low=-np.inf, high=np.inf, shape=(2,single_robot_obs_size), dtype=np.float64)
|
||||
else:
|
||||
self.observation_space = spaces.Box(low=-np.inf, high=np.inf, shape=(single_robot_obs_size,), dtype=np.float64)
|
||||
robot_info = self.env_info["robot"]
|
||||
|
||||
if env_mode != "tournament":
|
||||
if interpolation_order in [1, 2]:
|
||||
self.action_space = spaces.Box(low=robot_info["joint_pos_limit"][0], high=robot_info["joint_pos_limit"][1])
|
||||
if interpolation_order in [3, 4, -1]:
|
||||
self.action_space = spaces.Box(low=np.vstack([robot_info["joint_pos_limit"][0], robot_info["joint_vel_limit"][0]]),
|
||||
high=np.vstack([robot_info["joint_pos_limit"][1], robot_info["joint_vel_limit"][1]]))
|
||||
if interpolation_order in [5]:
|
||||
self.action_space = spaces.Box(low=np.vstack([robot_info["joint_pos_limit"][0], robot_info["joint_vel_limit"][0], robot_info["joint_acc_limit"][0]]),
|
||||
high=np.vstack([robot_info["joint_pos_limit"][1], robot_info["joint_vel_limit"][1], robot_info["joint_acc_limit"][1]]))
|
||||
if hasattr(self.base_env, "wrapper_obs_space") and hasattr(self.base_env, "wrapper_act_space"):
|
||||
self.observation_space = self.base_env.wrapper_obs_space
|
||||
self.action_space = self.base_env.wrapper_act_space
|
||||
else:
|
||||
acts = [None, None]
|
||||
for i in range(2):
|
||||
if interpolation_order[i] in [1, 2]:
|
||||
acts[i] = spaces.Box(low=robot_info["joint_pos_limit"][0], high=robot_info["joint_pos_limit"][1])
|
||||
if interpolation_order[i] in [3, 4, -1]:
|
||||
acts[i] = spaces.Box(low=np.vstack([robot_info["joint_pos_limit"][0], robot_info["joint_vel_limit"][0]]),
|
||||
high=np.vstack([robot_info["joint_pos_limit"][1], robot_info["joint_vel_limit"][1]]))
|
||||
if interpolation_order[i] in [5]:
|
||||
acts[i] = spaces.Box(low=np.vstack([robot_info["joint_pos_limit"][0], robot_info["joint_vel_limit"][0], robot_info["joint_acc_limit"][0]]),
|
||||
high=np.vstack([robot_info["joint_pos_limit"][1], robot_info["joint_vel_limit"][1], robot_info["joint_acc_limit"][1]]))
|
||||
self.action_space = spaces.Tuple((acts[0], acts[1]))
|
||||
single_robot_obs_size = len(self.base_env.info.observation_space.low)
|
||||
if env_mode == "tournament":
|
||||
self.observation_space = spaces.Box(low=-np.inf, high=np.inf, shape=(2,single_robot_obs_size), dtype=np.float64)
|
||||
else:
|
||||
self.observation_space = spaces.Box(low=-np.inf, high=np.inf, shape=(single_robot_obs_size,), dtype=np.float64)
|
||||
robot_info = self.env_info["robot"]
|
||||
|
||||
if env_mode != "tournament":
|
||||
if interpolation_order in [1, 2]:
|
||||
self.action_space = spaces.Box(low=robot_info["joint_pos_limit"][0], high=robot_info["joint_pos_limit"][1])
|
||||
if interpolation_order in [3, 4, -1]:
|
||||
self.action_space = spaces.Box(low=np.vstack([robot_info["joint_pos_limit"][0], robot_info["joint_vel_limit"][0]]),
|
||||
high=np.vstack([robot_info["joint_pos_limit"][1], robot_info["joint_vel_limit"][1]]))
|
||||
if interpolation_order in [5]:
|
||||
self.action_space = spaces.Box(low=np.vstack([robot_info["joint_pos_limit"][0], robot_info["joint_vel_limit"][0], robot_info["joint_acc_limit"][0]]),
|
||||
high=np.vstack([robot_info["joint_pos_limit"][1], robot_info["joint_vel_limit"][1], robot_info["joint_acc_limit"][1]]))
|
||||
else:
|
||||
acts = [None, None]
|
||||
for i in range(2):
|
||||
if interpolation_order[i] in [1, 2]:
|
||||
acts[i] = spaces.Box(low=robot_info["joint_pos_limit"][0], high=robot_info["joint_pos_limit"][1])
|
||||
if interpolation_order[i] in [3, 4, -1]:
|
||||
acts[i] = spaces.Box(low=np.vstack([robot_info["joint_pos_limit"][0], robot_info["joint_vel_limit"][0]]),
|
||||
high=np.vstack([robot_info["joint_pos_limit"][1], robot_info["joint_vel_limit"][1]]))
|
||||
if interpolation_order[i] in [5]:
|
||||
acts[i] = spaces.Box(low=np.vstack([robot_info["joint_pos_limit"][0], robot_info["joint_vel_limit"][0], robot_info["joint_acc_limit"][0]]),
|
||||
high=np.vstack([robot_info["joint_pos_limit"][1], robot_info["joint_vel_limit"][1], robot_info["joint_acc_limit"][1]]))
|
||||
self.action_space = spaces.Tuple((acts[0], acts[1]))
|
||||
|
||||
constraint_list = constraints.ConstraintList()
|
||||
constraint_list.add(constraints.JointPositionConstraint(self.env_info))
|
||||
@@ -81,9 +100,6 @@ class AirHockeyEnv(Environment):
|
||||
self.env_info['constraints'] = constraint_list
|
||||
self.env_info['env_name'] = self.env_name
|
||||
|
||||
self.render_mode = render_mode
|
||||
self.render_human_active = False
|
||||
|
||||
super().__init__(self.base_env.info)
|
||||
|
||||
def step(self, action):
|
||||
@@ -111,15 +127,21 @@ class AirHockeyEnv(Environment):
|
||||
|
||||
if self.env_info['env_name'] == "tournament":
|
||||
obs = np.array(np.split(obs, 2))
|
||||
|
||||
|
||||
if self.render_human_active:
|
||||
self.base_env.render()
|
||||
|
||||
return obs, reward, done, False, info
|
||||
|
||||
def render(self):
|
||||
self.render_human_active = True
|
||||
|
||||
if self.render_mode == 'rgb_array':
|
||||
return self.base_env.render(record = True)
|
||||
elif self.render_mode == 'human':
|
||||
self.render_human_active = True
|
||||
self.base_env.render()
|
||||
else:
|
||||
raise ValueError(f"Unsupported render mode: '{self.render_mode}'")
|
||||
|
||||
def reset(self, seed=None, options={}):
|
||||
self.base_env.seed(seed)
|
||||
obs = self.base_env.reset()
|
||||
@@ -177,4 +199,4 @@ if __name__ == "__main__":
|
||||
J = 0.
|
||||
gamma = 1.
|
||||
steps = 0
|
||||
env.reset()
|
||||
env.reset()
|
||||
|
||||
@@ -261,10 +261,14 @@ class PlanarPositionDefend(PositionControlPlanar, three_dof.AirHockeyDefend):
|
||||
class IiwaPositionHit(PositionControlIIWA, seven_dof.AirHockeyHit):
|
||||
pass
|
||||
|
||||
class IiwaPositionHitAirhocKIT2023(PositionControlIIWA, seven_dof.AirHockeyHitAirhocKIT2023):
|
||||
pass
|
||||
|
||||
class IiwaPositionDefend(PositionControlIIWA, seven_dof.AirHockeyDefend):
|
||||
pass
|
||||
|
||||
class IiwaPositionDefendAirhocKIT2023(PositionControlIIWA, seven_dof.AirHockeyDefendAirhocKIT2023):
|
||||
pass
|
||||
|
||||
class IiwaPositionTournament(PositionControlIIWA, seven_dof.AirHockeyTournament):
|
||||
pass
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from .env_base import AirHockeyBase
|
||||
from .tournament import AirHockeyTournament
|
||||
from .hit import AirHockeyHit
|
||||
from .defend import AirHockeyDefend
|
||||
from .hit import AirHockeyHit, AirHockeyHitAirhocKIT2023
|
||||
from .defend import AirHockeyDefend, AirHockeyDefendAirhocKIT2023
|
||||
@@ -0,0 +1,114 @@
|
||||
import numpy as np
|
||||
from gymnasium import spaces
|
||||
|
||||
from fancy_gym.envs.mujoco.air_hockey.seven_dof.env_single import AirHockeySingle
|
||||
from fancy_gym.envs.mujoco.air_hockey.utils import inverse_kinematics, forward_kinematics, jacobian
|
||||
|
||||
class AirhocKIT2023BaseEnv(AirHockeySingle):
|
||||
def __init__(self, noise=False, **kwargs):
|
||||
super().__init__(**kwargs)
|
||||
obs_low = np.hstack([[-np.inf] * 37])
|
||||
obs_high = np.hstack([[np.inf] * 37])
|
||||
self.wrapper_obs_space = spaces.Box(low=obs_low, high=obs_high, dtype=np.float64)
|
||||
self.wrapper_act_space = spaces.Box(low=np.repeat(-100., 6), high=np.repeat(100., 6))
|
||||
self.noise = noise
|
||||
|
||||
# We don't need puck yaw observations
|
||||
def filter_obs(self, obs):
|
||||
obs = np.hstack([obs[0:2], obs[3:5], obs[6:12], obs[13:19], obs[20:]])
|
||||
return obs
|
||||
|
||||
def add_noise(self, obs):
|
||||
if not self.noise:
|
||||
return
|
||||
obs[self.env_info["puck_pos_ids"]] += np.random.normal(0, 0.001, 3)
|
||||
obs[self.env_info["puck_vel_ids"]] += np.random.normal(0, 0.1, 3)
|
||||
|
||||
def reset(self):
|
||||
self.last_acceleration = np.repeat(0., 6)
|
||||
obs = super().reset()
|
||||
self.add_noise(obs)
|
||||
self.interp_pos = obs[self.env_info["joint_pos_ids"]][:-1]
|
||||
self.interp_vel = obs[self.env_info["joint_vel_ids"]][:-1]
|
||||
|
||||
self.last_planned_world_pos = self._fk(self.interp_pos)
|
||||
obs = np.hstack([
|
||||
obs, self.interp_pos, self.interp_vel, self.last_acceleration, self.last_planned_world_pos
|
||||
])
|
||||
return self.filter_obs(obs)
|
||||
|
||||
def step(self, action):
|
||||
action /= 10
|
||||
|
||||
new_vel = self.interp_vel + action
|
||||
|
||||
jerk = 2 * (new_vel - self.interp_vel - self.last_acceleration * 0.02) / (0.02 ** 2)
|
||||
new_pos = self.interp_pos + self.interp_vel * 0.02 + (1/2) * self.last_acceleration * (0.02 ** 2) + (1/6) * jerk * (0.02 ** 3)
|
||||
abs_action = np.vstack([np.hstack([new_pos, 0]), np.hstack([new_vel, 0])])
|
||||
|
||||
self.interp_pos = new_pos
|
||||
self.interp_vel = new_vel
|
||||
self.last_acceleration += jerk * 0.02
|
||||
|
||||
obs, rew, done, info = super().step(abs_action)
|
||||
self.add_noise(obs)
|
||||
self.last_planned_world_pos = self._fk(self.interp_pos)
|
||||
obs = np.hstack([
|
||||
obs, self.interp_pos, self.interp_vel, self.last_acceleration, self.last_planned_world_pos
|
||||
])
|
||||
|
||||
fatal_rew = self.check_fatal(obs)
|
||||
if fatal_rew != 0:
|
||||
return self.filter_obs(obs), fatal_rew, True, info
|
||||
|
||||
return self.filter_obs(obs), rew, done, info
|
||||
|
||||
def check_constraints(self, constraint_values):
|
||||
fatal_rew = 0
|
||||
|
||||
j_pos_constr = constraint_values["joint_pos_constr"]
|
||||
if j_pos_constr.max() > 0:
|
||||
fatal_rew += j_pos_constr.max()
|
||||
|
||||
j_vel_constr = constraint_values["joint_vel_constr"]
|
||||
if j_vel_constr.max() > 0:
|
||||
fatal_rew += j_vel_constr.max()
|
||||
|
||||
ee_constr = constraint_values["ee_constr"]
|
||||
if ee_constr.max() > 0:
|
||||
fatal_rew += ee_constr.max()
|
||||
|
||||
link_constr = constraint_values["link_constr"]
|
||||
if link_constr.max() > 0:
|
||||
fatal_rew += link_constr.max()
|
||||
|
||||
return -fatal_rew
|
||||
|
||||
def check_fatal(self, obs):
|
||||
fatal_rew = 0
|
||||
|
||||
q = obs[self.env_info["joint_pos_ids"]]
|
||||
qd = obs[self.env_info["joint_vel_ids"]]
|
||||
constraint_values_obs = self.env_info["constraints"].fun(q, qd)
|
||||
fatal_rew += self.check_constraints(constraint_values_obs)
|
||||
|
||||
return -fatal_rew
|
||||
|
||||
def _fk(self, pos):
|
||||
res, _ = forward_kinematics(self.env_info["robot"]["robot_model"],
|
||||
self.env_info["robot"]["robot_data"], pos)
|
||||
return res.astype(np.float32)
|
||||
|
||||
def _ik(self, world_pos, init_q=None):
|
||||
success, pos = inverse_kinematics(self.env_info["robot"]["robot_model"],
|
||||
self.env_info["robot"]["robot_data"],
|
||||
world_pos,
|
||||
initial_q=init_q)
|
||||
pos = pos.astype(np.float32)
|
||||
assert success
|
||||
return pos
|
||||
|
||||
def _jacobian(self, pos):
|
||||
return jacobian(self.env_info["robot"]["robot_model"],
|
||||
self.env_info["robot"]["robot_data"],
|
||||
pos).astype(np.float32)
|
||||
@@ -1,6 +1,7 @@
|
||||
import numpy as np
|
||||
|
||||
from fancy_gym.envs.mujoco.air_hockey.seven_dof.env_single import AirHockeySingle
|
||||
from fancy_gym.envs.mujoco.air_hockey.seven_dof.airhockit_base_env import AirhocKIT2023BaseEnv
|
||||
|
||||
|
||||
class AirHockeyDefend(AirHockeySingle):
|
||||
@@ -10,9 +11,7 @@ class AirHockeyDefend(AirHockeySingle):
|
||||
"""
|
||||
def __init__(self, gamma=0.99, horizon=500, viewer_params={}):
|
||||
self.init_velocity_range = (1, 3)
|
||||
|
||||
self.start_range = np.array([[0.29, 0.65], [-0.4, 0.4]]) # Table Frame
|
||||
self.init_ee_range = np.array([[0.60, 1.25], [-0.4, 0.4]]) # Robot Frame
|
||||
super().__init__(gamma=gamma, horizon=horizon, viewer_params=viewer_params)
|
||||
|
||||
def setup(self, obs):
|
||||
@@ -32,7 +31,7 @@ class AirHockeyDefend(AirHockeySingle):
|
||||
self._write_data("puck_y_vel", puck_vel[1])
|
||||
self._write_data("puck_yaw_vel", puck_vel[2])
|
||||
|
||||
super(AirHockeyDefend, self).setup(obs)
|
||||
super().setup(obs)
|
||||
|
||||
def reward(self, state, action, next_state, absorbing):
|
||||
return 0
|
||||
@@ -46,6 +45,98 @@ class AirHockeyDefend(AirHockeySingle):
|
||||
return True
|
||||
return super().is_absorbing(state)
|
||||
|
||||
class AirHockeyDefendAirhocKIT2023(AirhocKIT2023BaseEnv):
|
||||
def __init__(self, gamma=0.99, horizon=200, viewer_params={}, **kwargs):
|
||||
super().__init__(gamma=gamma, horizon=horizon, viewer_params=viewer_params, **kwargs)
|
||||
self.init_velocity_range = (1, 3)
|
||||
self.start_range = np.array([[0.4, 0.75], [-0.4, 0.4]]) # Table Frame
|
||||
self._setup_metrics()
|
||||
|
||||
def setup(self, obs):
|
||||
self._setup_metrics()
|
||||
puck_pos = np.random.rand(2) * (self.start_range[:, 1] - self.start_range[:, 0]) + self.start_range[:, 0]
|
||||
|
||||
lin_vel = np.random.uniform(self.init_velocity_range[0], self.init_velocity_range[1])
|
||||
angle = np.random.uniform(-0.5, 0.5)
|
||||
|
||||
puck_vel = np.zeros(3)
|
||||
puck_vel[0] = -np.cos(angle) * lin_vel
|
||||
puck_vel[1] = np.sin(angle) * lin_vel
|
||||
puck_vel[2] = np.random.uniform(-10, 10)
|
||||
|
||||
self._write_data("puck_x_pos", puck_pos[0])
|
||||
self._write_data("puck_y_pos", puck_pos[1])
|
||||
self._write_data("puck_x_vel", puck_vel[0])
|
||||
self._write_data("puck_y_vel", puck_vel[1])
|
||||
self._write_data("puck_yaw_vel", puck_vel[2])
|
||||
|
||||
super().setup(obs)
|
||||
|
||||
def reset(self, *args):
|
||||
obs = super().reset()
|
||||
self.hit_step_flag = False
|
||||
self.hit_step = False
|
||||
self.received_hit_reward = False
|
||||
self.give_reward_next = False
|
||||
return obs
|
||||
|
||||
def _setup_metrics(self):
|
||||
self.episode_steps = 0
|
||||
self.has_hit = False
|
||||
|
||||
def _simulation_post_step(self):
|
||||
if not self.has_hit:
|
||||
self.has_hit = self._check_collision("puck", "robot_1/ee")
|
||||
|
||||
super()._simulation_post_step()
|
||||
|
||||
def _step_finalize(self):
|
||||
self.episode_steps += 1
|
||||
return super()._step_finalize()
|
||||
|
||||
def reward(self, state, action, next_state, absorbing):
|
||||
puck_pos, puck_vel = self.get_puck(next_state)
|
||||
ee_pos, _ = self.get_ee()
|
||||
rew = 0.01
|
||||
if -0.7 < puck_pos[0] <= -0.2 and np.linalg.norm(puck_vel[:2]) < 0.1:
|
||||
assert absorbing
|
||||
rew += 70
|
||||
|
||||
if self.has_hit and not self.hit_step_flag:
|
||||
self.hit_step_flag = True
|
||||
self.hit_step = True
|
||||
else:
|
||||
self.hit_step = False
|
||||
|
||||
f = lambda puck_vel: 30 + 100 * (100 ** (-0.25 * np.linalg.norm(puck_vel[:2])))
|
||||
if not self.give_reward_next and not self.received_hit_reward and self.hit_step and ee_pos[0] < puck_pos[0]:
|
||||
self.hit_this_step = True
|
||||
if np.linalg.norm(puck_vel[:2]) < 0.1:
|
||||
return rew + f(puck_vel)
|
||||
self.give_reward_next = True
|
||||
return rew
|
||||
|
||||
if not self.received_hit_reward and self.give_reward_next:
|
||||
self.received_hit_reward = True
|
||||
if puck_vel[0] >= -0.2:
|
||||
return rew + f(puck_vel)
|
||||
return rew
|
||||
else:
|
||||
return rew
|
||||
|
||||
def is_absorbing(self, obs):
|
||||
puck_pos, puck_vel = self.get_puck(obs)
|
||||
# If puck is over the middle line and moving towards opponent
|
||||
if puck_pos[0] > 0 and puck_vel[0] > 0:
|
||||
return True
|
||||
|
||||
if self.episode_steps == self._mdp_info.horizon:
|
||||
return True
|
||||
|
||||
if np.linalg.norm(puck_vel[:2]) < 0.1:
|
||||
return True
|
||||
return super().is_absorbing(obs)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
env = AirHockeyDefend()
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import numpy as np
|
||||
|
||||
from fancy_gym.envs.mujoco.air_hockey.seven_dof.env_single import AirHockeySingle
|
||||
from fancy_gym.envs.mujoco.air_hockey.seven_dof.airhockit_base_env import AirhocKIT2023BaseEnv
|
||||
|
||||
|
||||
class AirHockeyHit(AirHockeySingle):
|
||||
@@ -14,9 +15,6 @@ class AirHockeyHit(AirHockeySingle):
|
||||
opponent_agent(Agent, None): Agent which controls the opponent
|
||||
moving_init(bool, False): If true, initialize the puck with inital velocity.
|
||||
"""
|
||||
self.hit_range = np.array([[-0.65, -0.25], [-0.4, 0.4]]) # Table Frame
|
||||
self.init_velocity_range = (0, 0.5) # Table Frame
|
||||
|
||||
super().__init__(gamma=gamma, horizon=horizon, viewer_params=viewer_params)
|
||||
|
||||
self.moving_init = moving_init
|
||||
@@ -58,6 +56,93 @@ class AirHockeyHit(AirHockeySingle):
|
||||
return True
|
||||
return super(AirHockeyHit, self).is_absorbing(obs)
|
||||
|
||||
class AirHockeyHitAirhocKIT2023(AirhocKIT2023BaseEnv):
|
||||
def __init__(self, gamma=0.99, horizon=500, moving_init=True, viewer_params={}, **kwargs):
|
||||
super().__init__(gamma=gamma, horizon=horizon, viewer_params=viewer_params, **kwargs)
|
||||
|
||||
self.moving_init = moving_init
|
||||
hit_width = self.env_info['table']['width'] / 2 - self.env_info['puck']['radius'] - \
|
||||
self.env_info['mallet']['radius'] * 2
|
||||
self.hit_range = np.array([[-0.7, -0.2], [-hit_width, hit_width]]) # Table Frame
|
||||
self.init_velocity_range = (0, 0.5) # Table Frame
|
||||
self.init_ee_range = np.array([[0.60, 1.25], [-0.4, 0.4]]) # Robot Frame
|
||||
self._setup_metrics()
|
||||
|
||||
def reset(self, *args):
|
||||
obs = super().reset()
|
||||
self.last_ee_pos = self.last_planned_world_pos.copy()
|
||||
self.last_ee_pos[0] -= 1.51
|
||||
return obs
|
||||
|
||||
def setup(self, obs):
|
||||
self._setup_metrics()
|
||||
puck_pos = np.random.rand(2) * (self.hit_range[:, 1] - self.hit_range[:, 0]) + self.hit_range[:, 0]
|
||||
|
||||
self._write_data("puck_x_pos", puck_pos[0])
|
||||
self._write_data("puck_y_pos", puck_pos[1])
|
||||
|
||||
if self.moving_init:
|
||||
lin_vel = np.random.uniform(self.init_velocity_range[0], self.init_velocity_range[1])
|
||||
angle = np.random.uniform(-np.pi / 2 - 0.1, np.pi / 2 + 0.1)
|
||||
puck_vel = np.zeros(3)
|
||||
puck_vel[0] = -np.cos(angle) * lin_vel
|
||||
puck_vel[1] = np.sin(angle) * lin_vel
|
||||
puck_vel[2] = np.random.uniform(-2, 2)
|
||||
|
||||
self._write_data("puck_x_vel", puck_vel[0])
|
||||
self._write_data("puck_y_vel", puck_vel[1])
|
||||
self._write_data("puck_yaw_vel", puck_vel[2])
|
||||
|
||||
super().setup(obs)
|
||||
|
||||
def _setup_metrics(self):
|
||||
self.episode_steps = 0
|
||||
self.has_scored = False
|
||||
|
||||
def _step_finalize(self):
|
||||
cur_obs = self._create_observation(self.obs_helper._build_obs(self._data))
|
||||
puck_pos, _ = self.get_puck(cur_obs) # world frame [x, y, z] and [x', y', z']
|
||||
|
||||
if not self.has_scored:
|
||||
boundary = np.array([self.env_info['table']['length'], self.env_info['table']['width']]) / 2
|
||||
self.has_scored = np.any(np.abs(puck_pos[:2]) > boundary) and puck_pos[0] > 0
|
||||
|
||||
self.episode_steps += 1
|
||||
return super()._step_finalize()
|
||||
|
||||
def reward(self, state, action, next_state, absorbing):
|
||||
rew = 0
|
||||
puck_pos, puck_vel = self.get_puck(next_state)
|
||||
ee_pos, _ = self.get_ee()
|
||||
ee_vel = (ee_pos - self.last_ee_pos) / 0.02
|
||||
self.last_ee_pos = ee_pos
|
||||
|
||||
if puck_vel[0] < 0.25 and puck_pos[0] < 0:
|
||||
ee_puck_dir = (puck_pos - ee_pos)[:2]
|
||||
ee_puck_dir = ee_puck_dir / np.linalg.norm(ee_puck_dir)
|
||||
rew += 1 * max(0, np.dot(ee_puck_dir, ee_vel[:2]))
|
||||
else:
|
||||
rew += 10 * np.linalg.norm(puck_vel[:2])
|
||||
|
||||
if self.has_scored:
|
||||
rew += 2000 + 5000 * np.linalg.norm(puck_vel[:2])
|
||||
|
||||
return rew
|
||||
|
||||
def is_absorbing(self, obs):
|
||||
puck_pos, puck_vel = self.get_puck(obs)
|
||||
# Stop if the puck bounces back on the opponents wall
|
||||
if puck_pos[0] > 0 and puck_vel[0] < 0:
|
||||
return True
|
||||
|
||||
if self.has_scored:
|
||||
return True
|
||||
|
||||
if self.episode_steps == self._mdp_info.horizon:
|
||||
return True
|
||||
|
||||
return super().is_absorbing(obs)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
env = AirHockeyHit(moving_init=True)
|
||||
|
||||
@@ -51,28 +51,43 @@ class FixMetaworldIgnoresSeedOnResetWrapper(gym.Wrapper, gym.utils.RecordConstru
|
||||
gym.Wrapper.__init__(self, env)
|
||||
|
||||
def reset(self, **kwargs):
|
||||
print('[!] You just called .reset on a Metaworld env and supplied a seed. Metaworld curretly does not correctly implement seeding. Do not rely on deterministic behavior.')
|
||||
if 'seed' in kwargs:
|
||||
print('[!] You just called .reset on a Metaworld env and supplied a seed. Metaworld curretly does not correctly implement seeding. Do not rely on deterministic behavior.')
|
||||
self.env.seed(kwargs['seed'])
|
||||
return self.env.reset(**kwargs)
|
||||
|
||||
|
||||
class FixMetaworldRenderOnStep(gym.Wrapper, gym.utils.RecordConstructorArgs):
|
||||
def __init__(self, env: gym.Env):
|
||||
gym.utils.RecordConstructorArgs.__init__(self)
|
||||
gym.Wrapper.__init__(self, env)
|
||||
self.render_active = False
|
||||
|
||||
def render(self, *args, **kwargs):
|
||||
self.render_active = True
|
||||
return self.env.render(*args, **kwargs)
|
||||
|
||||
def step(self, *args, **kwargs):
|
||||
ret = self.env.step(*args, **kwargs)
|
||||
if self.render_active:
|
||||
self.env.render()
|
||||
return ret
|
||||
|
||||
|
||||
def make_metaworld(underlying_id: str, seed: int = 1, render_mode: Optional[str] = None, **kwargs):
|
||||
if underlying_id not in metaworld.ML1.ENV_NAMES:
|
||||
raise ValueError(f'Specified environment "{underlying_id}" not present in metaworld ML1.')
|
||||
|
||||
env = metaworld.envs.ALL_V2_ENVIRONMENTS_GOAL_OBSERVABLE[underlying_id + "-goal-observable"](seed=seed, **kwargs)
|
||||
env = metaworld.envs.ALL_V2_ENVIRONMENTS_GOAL_OBSERVABLE[underlying_id + "-goal-observable"](seed=seed, render_mode=render_mode, **kwargs)
|
||||
|
||||
# setting this avoids generating the same initialization after each reset
|
||||
env._freeze_rand_vec = False
|
||||
# New argument to use global seeding
|
||||
env.seeded_rand_vec = True
|
||||
|
||||
# TODO remove, when this has been fixed upstream
|
||||
env = FixMetaworldHasIncorrectObsSpaceWrapper(env)
|
||||
# TODO remove, when this has been fixed upstream
|
||||
# env = FixMetaworldIncorrectResetPathLengthWrapper(env)
|
||||
# TODO remove, when this has been fixed upstream
|
||||
env = FixMetaworldRenderOnStep(env)
|
||||
env = FixMetaworldIgnoresSeedOnResetWrapper(env)
|
||||
return env
|
||||
|
||||
|
||||
@@ -50,6 +50,8 @@ dmc = ["shimmy[dm-control]", "Shimmy==1.0.0"]
|
||||
box2d = ["gymnasium[box2d]>=0.26.0"]
|
||||
mujoco-legacy = ["mujoco-py>=2.1,<2.2", "cython<3"]
|
||||
jax = ["jax>=0.4.0", "jaxlib>=0.4.0"]
|
||||
mushroom-rl = ["mushroom-rl"]
|
||||
docs = ['sphinx==7.1.2', 'sphinx-rtd-theme==1.3.0rc1', 'myst-parser']
|
||||
|
||||
all = [
|
||||
# include all the optional dependencies
|
||||
@@ -61,7 +63,8 @@ all = [
|
||||
"mujoco-py>=2.1,<2.2",
|
||||
"cython<3",
|
||||
"jax>=0.4.0",
|
||||
"jaxlib>=0.4.0"
|
||||
"jaxlib>=0.4.0",
|
||||
"mushroom-rl",
|
||||
]
|
||||
|
||||
testing = [
|
||||
@@ -75,5 +78,6 @@ testing = [
|
||||
"mujoco-py>=2.1,<2.2",
|
||||
"cython<3",
|
||||
"jax>=0.4.0",
|
||||
"jaxlib>=0.4.0"
|
||||
"jaxlib>=0.4.0",
|
||||
"mushroom-rl",
|
||||
]
|
||||
|
||||