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 | ||
|
|
374d72ddde | ||
|
|
d6f42cf755 | ||
|
|
db842db2b7 | ||
|
|
d367ac0c4b | ||
|
|
e5bb6f1a88 | ||
|
|
14b7d1d6c3 | ||
|
|
deaca46d87 | ||
|
|
dbd3caebb3 | ||
|
|
f6b56d5b0f | ||
|
|
c0e55b3f48 | ||
|
|
beaf5df2fc | ||
|
|
13e6a3b53a | ||
|
|
be320b2d43 | ||
|
|
216a6f215d | ||
|
|
052abcbf1c | ||
|
|
cee8d59107 | ||
|
|
01d2bf44ba | ||
|
|
99ab2344ad | ||
|
|
2f4b6fcea4 | ||
|
|
ef104cfc2a | ||
|
|
879b823d02 | ||
|
|
8b585d7ea8 | ||
|
|
b95cf85e3d | ||
|
|
bedb4297f2 | ||
|
|
62fecda9d6 | ||
|
|
079225cd1b | ||
|
|
f102e49581 | ||
|
|
7a05c063b7 | ||
|
|
7e537447e1 | ||
|
|
9aa572271f | ||
|
|
d0cb6316a5 | ||
|
|
edd1e83813 | ||
|
|
74bede4ba3 | ||
|
|
fae7c887ce | ||
|
|
0d3336b8d9 | ||
|
|
06e6c64e49 | ||
|
|
9d1d925179 | ||
|
|
da5592124e | ||
|
|
e32f836a3c | ||
|
|
bbd964ed80 | ||
|
|
f024613800 | ||
|
|
4a9ea368b8 | ||
|
|
3c7df90810 | ||
|
|
707ec08808 | ||
|
|
11a46889d9 | ||
|
|
be250bee5e | ||
|
|
da042eebd9 | ||
|
|
f1d3b5333f | ||
|
|
668765b145 | ||
|
|
e5a9aaff0b | ||
|
|
dc773c6c10 | ||
|
|
049e45cb09 | ||
|
|
af636164a8 | ||
|
|
d138c3c1f1 | ||
|
|
b277ed6477 | ||
|
|
b183c002ef | ||
|
|
d7ea1f80a0 | ||
|
|
f7a493d8e5 | ||
|
|
b681129a46 | ||
|
|
5db73f90c4 | ||
|
|
8ba3d4ec6b | ||
|
|
5e63a72882 | ||
|
|
0b240b9eb4 | ||
|
|
a7031ce3b9 | ||
|
|
4051a13324 | ||
|
|
ebb0e00675 | ||
|
|
6fea48f6c1 | ||
|
|
4107704d9a | ||
|
|
a50d1788b1 | ||
|
|
9538c999a0 | ||
|
|
b0b58675b2 | ||
|
|
9565f7972f | ||
|
|
3f0c7b7302 | ||
|
|
0c93280796 | ||
|
|
a5b10e11a3 | ||
|
|
894982f77f | ||
|
|
95a6b9cf2c | ||
|
|
6528c5d5b9 | ||
|
|
ce779bc6fb | ||
|
|
b6c67b1adc | ||
|
|
ee573788fc | ||
|
|
a5a29176cb | ||
|
|
d10ea23b4c | ||
|
|
180b86771d | ||
|
|
10038f5d73 | ||
|
|
7a0f446406 | ||
|
|
c985f2c415 | ||
|
|
8f34cfe5ed | ||
|
|
5e60aabef5 | ||
|
|
faa537596a | ||
|
|
b1fd1e5b5c | ||
|
|
cfda88d98c | ||
|
|
7976abae5e | ||
|
|
c420a96d4f | ||
|
|
a04a4b6e67 | ||
|
|
f8dcf5b2df | ||
|
|
614d2a42db | ||
|
|
4f534779ff | ||
|
|
fc7382443d | ||
|
|
600575cbac | ||
|
|
877a7ea6ba | ||
|
|
980bb0de6b | ||
|
|
db5e032987 | ||
|
|
3317ffb06d | ||
|
|
757072c762 | ||
|
|
bc150f5a4d | ||
|
|
5f3c28e8f0 | ||
|
|
fcc79cdde0 | ||
|
|
3180154fa6 | ||
|
|
9fee527dbe | ||
|
|
0ae87088d9 | ||
|
|
1eeccff35f | ||
|
|
27f3a824c6 | ||
|
|
b3de71e0d6 | ||
|
|
e633b1eeeb | ||
|
|
a803d92dd2 | ||
|
|
e3055568e8 | ||
|
|
e55905a824 | ||
|
|
8bba78b813 | ||
|
|
56c1c65d09 | ||
|
|
d6ecc0dc67 | ||
|
|
6d0e96c6f2 | ||
|
|
740d1d7896 | ||
|
|
310719e471 | ||
|
|
79c2eda4fe | ||
|
|
49658515b0 | ||
|
|
d8315c8d97 | ||
|
|
e077a8f13d | ||
|
|
842ab3fbc9 | ||
|
|
59ee559f8d | ||
|
|
57c4a940b8 | ||
|
|
c5b051da20 | ||
|
|
cf886b2b87 | ||
|
|
659a717fbd | ||
|
|
725e6c8fe1 | ||
|
|
5488ca6dda | ||
|
|
60a820456c | ||
|
|
54e8ec4015 | ||
|
|
ddd11c1783 | ||
|
|
9ce040d110 | ||
|
|
20510d8f68 | ||
|
|
592f09789d | ||
|
|
513bf2361e | ||
|
|
4c8dda3b60 | ||
|
|
c933a75880 | ||
|
|
38358c183e | ||
|
|
89bd6781c7 | ||
|
|
a76967a498 | ||
|
|
7f58093c5e | ||
|
|
8749fc52cb | ||
|
|
da34db22c8 | ||
|
|
0629d1260c | ||
|
|
7f95923cf4 | ||
|
|
315e135ff0 | ||
|
|
155807207f | ||
|
|
820e781a0c | ||
|
|
07aeb779a7 | ||
|
|
5921e0008b | ||
|
|
22a72fed2f | ||
|
|
2c0c4e5508 | ||
|
|
20b1b0ccac | ||
|
|
8b3d05aaaf | ||
|
|
a4e28837bb | ||
|
|
15e1bdc218 | ||
|
|
6d80201a03 | ||
|
|
94c4397fac | ||
|
|
78823d95b6 | ||
|
|
5b99227fac | ||
|
|
f3ffa714cb | ||
|
|
1fb5368cc2 | ||
|
|
14d545acee | ||
|
|
eefcbcb0f0 | ||
|
|
fb1282fe1e | ||
|
|
14223c56ba | ||
|
|
221e3fee5a | ||
|
|
caf483a23b | ||
|
|
fb8f81afea | ||
|
|
9020eb92ea | ||
|
|
9c6d7956ce | ||
|
|
e30b6c0e04 | ||
|
|
5519fd5a34 | ||
|
|
b4793c89bc | ||
|
|
20d0be3c8d | ||
|
|
bc3f540daf | ||
|
|
e63a0a50df | ||
|
|
e743663018 | ||
|
|
d48836368c | ||
|
|
6b07705a88 | ||
|
|
ae1033a18c | ||
|
|
2fc44667c6 | ||
|
|
bb20bb53ec | ||
|
|
edd8c75ed3 | ||
|
|
3a9143fd93 | ||
|
|
58bb8c0395 | ||
|
|
127d355ccc | ||
|
|
95b2c255e9 | ||
|
|
fc4b98ea7d | ||
|
|
e2ff915a71 | ||
|
|
0fb0506e49 | ||
|
|
6787b02bbd | ||
|
|
99a02b8347 | ||
|
|
3e586a1407 | ||
|
|
eb9b6e1e22 | ||
|
|
b0f7dc6c7c | ||
|
|
21a9c0f8a3 | ||
|
|
ce34df1814 | ||
|
|
a069aaac65 | ||
|
|
9ba3fa9dbc | ||
|
|
64e6ac5323 | ||
|
|
83d5d39b42 | ||
|
|
dbf2be1006 | ||
|
|
1b061b2a37 | ||
|
|
8d26cccc35 | ||
|
|
17d370e2ba | ||
|
|
9d03542282 | ||
|
|
f6e1718c1a | ||
|
|
9fa932d2bb | ||
|
|
30bafd7a4f | ||
|
|
f375a6e4df | ||
|
|
6c90f8ade2 | ||
|
|
ffbada2311 | ||
|
|
67a5d197d9 | ||
|
|
27f8335a0d | ||
|
|
14a95eb5ca | ||
|
|
cdabd3f478 | ||
|
|
bf1eb496f6 | ||
|
|
eb1d145dbd | ||
|
|
de118a3113 | ||
|
|
1601a87cb1 | ||
|
|
55f84da5e1 | ||
|
|
ad7ddd3b28 | ||
|
|
e8119798c3 | ||
|
|
bc0dcb7642 | ||
|
|
55c6cff690 | ||
|
|
0fe56c4c0e | ||
|
|
9af42112b6 | ||
|
|
7354257f8e | ||
|
|
b6089c4b83 | ||
|
|
f8ad65b790 | ||
|
|
9ade0dcdc4 | ||
|
|
b032dec5fe | ||
|
|
60a4cf11d6 | ||
|
|
49ac9c3785 | ||
|
|
f44f01b478 | ||
|
|
fbba129034 | ||
|
|
9605f2e56c | ||
|
|
c9467c0e06 | ||
|
|
a23b44752e | ||
|
|
abeb963b4e | ||
|
|
2ad42f4132 | ||
|
|
e44b0ed9ed | ||
|
|
4921cc4b0b | ||
|
|
80de15fd14 | ||
|
|
6f1a36d18c | ||
|
|
ef64b0c21c | ||
|
|
f07b8a26ac | ||
|
|
40d2409c26 | ||
|
|
42003a3f9a | ||
|
|
ddf6fd73b2 | ||
|
|
5e7f027ea0 | ||
|
|
ff382a2922 | ||
|
|
c06fbee728 | ||
|
|
38cb5e1750 | ||
|
|
1fddeb838b | ||
|
|
110a8a9c0c | ||
|
|
dbd7c37da5 | ||
|
|
29b458c7df | ||
|
|
a8a67601ca | ||
|
|
35680ab9a2 | ||
|
|
d6df6779a1 | ||
|
|
dabfc7cafe | ||
|
|
1c002a235b | ||
|
|
bc9d4cf19d | ||
|
|
3bbf101e86 | ||
|
|
e70a56a7e3 | ||
|
|
e75ab89a37 | ||
|
|
bf3ed8a06c | ||
|
|
07de655025 | ||
|
|
21d5ebb442 | ||
|
|
0dfd8e18e4 | ||
|
|
d4a8306b9d | ||
|
|
1e62da0833 | ||
|
|
a559f92562 | ||
|
|
228e343a1b | ||
|
|
826f22b18e | ||
|
|
1c092d01bd | ||
|
|
2cbfff7919 | ||
|
|
9de1257e1c | ||
|
|
b695239318 | ||
|
|
c53924d9fc | ||
|
|
ec2063aa0b | ||
|
|
9ebc021ae0 | ||
|
|
ed724046f3 | ||
|
|
fbe3ef4a4b | ||
|
|
0c7ac838bf |
@@ -0,0 +1,32 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
1. Go to '...'
|
||||
2. Select variables '....'
|
||||
3. Execute '....'
|
||||
4. See error
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Desktop (please complete the following information):**
|
||||
- OS: [e.g. Ubunutu]
|
||||
- Python version [e.g. 3.8]
|
||||
- Version [e.g. 1.0]
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
@@ -0,0 +1,20 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
||||
@@ -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
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
name: Publish Python package to PyPI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- release
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
name: Publish to PyPI
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0 # This fetches all history for all branches and tags
|
||||
|
||||
- name: Check if commit is tagged
|
||||
run: |
|
||||
TAG=$(git tag --contains HEAD)
|
||||
if [ -z "$TAG" ]; then
|
||||
echo "Commit is not tagged. Failing the workflow."
|
||||
exit 1
|
||||
fi
|
||||
echo "Commit is tagged. 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 PyPI
|
||||
env:
|
||||
TWINE_USERNAME: __token__
|
||||
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
|
||||
run: twine upload dist/*
|
||||
|
||||
@@ -0,0 +1,128 @@
|
||||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
We as members, contributors, and leaders pledge to make participation in our
|
||||
community a harassment-free experience for everyone, regardless of age, body
|
||||
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
||||
identity and expression, level of experience, education, socio-economic status,
|
||||
nationality, personal appearance, race, religion, or sexual identity
|
||||
and orientation.
|
||||
|
||||
We pledge to act and interact in ways that contribute to an open, welcoming,
|
||||
diverse, inclusive, and healthy community.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to a positive environment for our
|
||||
community include:
|
||||
|
||||
* Demonstrating empathy and kindness toward other people
|
||||
* Being respectful of differing opinions, viewpoints, and experiences
|
||||
* Giving and gracefully accepting constructive feedback
|
||||
* Accepting responsibility and apologizing to those affected by our mistakes,
|
||||
and learning from the experience
|
||||
* Focusing on what is best not just for us as individuals, but for the
|
||||
overall community
|
||||
|
||||
Examples of unacceptable behavior include:
|
||||
|
||||
* The use of sexualized language or imagery, and sexual attention or
|
||||
advances of any kind
|
||||
* Trolling, insulting or derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or email
|
||||
address, without their explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Enforcement Responsibilities
|
||||
|
||||
Community leaders are responsible for clarifying and enforcing our standards of
|
||||
acceptable behavior and will take appropriate and fair corrective action in
|
||||
response to any behavior that they deem inappropriate, threatening, offensive,
|
||||
or harmful.
|
||||
|
||||
Community leaders have the right and responsibility to remove, edit, or reject
|
||||
comments, commits, code, wiki edits, issues, and other contributions that are
|
||||
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
||||
decisions when appropriate.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies within all community spaces, and also applies when
|
||||
an individual is officially representing the community in public spaces.
|
||||
Examples of representing our community include using an official e-mail address,
|
||||
posting via an official social media account, or acting as an appointed
|
||||
representative at an online or offline event.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported to the community leaders responsible for enforcement at
|
||||
their respective email addresses.
|
||||
All complaints will be reviewed and investigated promptly and fairly.
|
||||
|
||||
All community leaders are obligated to respect the privacy and security of the
|
||||
reporter of any incident.
|
||||
|
||||
## Enforcement Guidelines
|
||||
|
||||
Community leaders will follow these Community Impact Guidelines in determining
|
||||
the consequences for any action they deem in violation of this Code of Conduct:
|
||||
|
||||
### 1. Correction
|
||||
|
||||
**Community Impact**: Use of inappropriate language or other behavior deemed
|
||||
unprofessional or unwelcome in the community.
|
||||
|
||||
**Consequence**: A private, written warning from community leaders, providing
|
||||
clarity around the nature of the violation and an explanation of why the
|
||||
behavior was inappropriate. A public apology may be requested.
|
||||
|
||||
### 2. Warning
|
||||
|
||||
**Community Impact**: A violation through a single incident or series
|
||||
of actions.
|
||||
|
||||
**Consequence**: A warning with consequences for continued behavior. No
|
||||
interaction with the people involved, including unsolicited interaction with
|
||||
those enforcing the Code of Conduct, for a specified period of time. This
|
||||
includes avoiding interactions in community spaces as well as external channels
|
||||
like social media. Violating these terms may lead to a temporary or
|
||||
permanent ban.
|
||||
|
||||
### 3. Temporary Ban
|
||||
|
||||
**Community Impact**: A serious violation of community standards, including
|
||||
sustained inappropriate behavior.
|
||||
|
||||
**Consequence**: A temporary ban from any sort of interaction or public
|
||||
communication with the community for a specified period of time. No public or
|
||||
private interaction with the people involved, including unsolicited interaction
|
||||
with those enforcing the Code of Conduct, is allowed during this period.
|
||||
Violating these terms may lead to a permanent ban.
|
||||
|
||||
### 4. Permanent Ban
|
||||
|
||||
**Community Impact**: Demonstrating a pattern of violation of community
|
||||
standards, including sustained inappropriate behavior, harassment of an
|
||||
individual, or aggression toward or disparagement of classes of individuals.
|
||||
|
||||
**Consequence**: A permanent ban from any sort of public interaction within
|
||||
the community.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
||||
version 2.0, available at
|
||||
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
||||
|
||||
Community Impact Guidelines were inspired by [Mozilla's code of conduct
|
||||
enforcement ladder](https://github.com/mozilla/diversity).
|
||||
|
||||
[homepage]: https://www.contributor-covenant.org
|
||||
|
||||
For answers to common questions about this code of conduct, see the FAQ at
|
||||
https://www.contributor-covenant.org/faq. Translations are available at
|
||||
https://www.contributor-covenant.org/translations.
|
||||
@@ -0,0 +1,28 @@
|
||||
# Contribution Guidelines
|
||||
|
||||
We welcome and appreciate contributions to this repository from the community. To ensure a positive and productive collaboration, we have established the following guidelines for contributing to this project:
|
||||
|
||||
**Code of Conduct**: Please abide by our Code of Conduct, which sets the standards for respectful and inclusive behavior within the community.
|
||||
|
||||
**Issues and Feature Requests**: Feel free to open new issues to report bugs or suggest new features. Before submitting, please check if a similar issue or request already exists.
|
||||
|
||||
**Pull Requests**: We encourage pull requests for bug fixes, new features, and improvements. Please follow these steps when submitting a pull request:
|
||||
- Fork this repository and create a new branch for your changes.
|
||||
- Ensure your code aligns with our coding standards.
|
||||
- Provide a clear and concise description of your changes.
|
||||
- Test your changes thoroughly.
|
||||
- Make sure your code is well-documented.
|
||||
- Code Style: Follow our coding style guidelines, which include formatting, naming conventions, and other coding standards. Adhering to these guidelines will help streamline the review process.
|
||||
|
||||
**Collaboration**: Be prepared for constructive feedback during the review process. We aim to maintain the quality and consistency of the codebase.
|
||||
|
||||
**License**: Ensure your contributions comply with the project's existing open-source license. By contributing, you grant us the right to distribute your code under the project's license.
|
||||
|
||||
**Ownership**: When you submit a contribution, you confirm that you have the right to license your code to us and that your work does not violate any existing patents, trademarks, or intellectual property rights.
|
||||
|
||||
**Maintainers**: The repository maintainers have the final authority on merging or rejecting contributions. They will work collaboratively with contributors to ensure a smooth process.
|
||||
|
||||
**Community Support**: As part of our community, please consider helping others, answering questions, and providing support to fellow contributors.
|
||||
|
||||
We appreciate your interest in contributing to our project. Your involvement helps make this community vibrant and successful.
|
||||
Thank you for being part of this project!
|
||||
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2023 Autonomous Learning Robots Lab @ KIT
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -0,0 +1,14 @@
|
||||
# Include the README
|
||||
include README.md
|
||||
|
||||
# Include the license, Code of Conduct and Contributing guidelines
|
||||
include LICENSE
|
||||
include CODE_OF_CONDUCT.md
|
||||
include CONTRIBUTING.md
|
||||
|
||||
# Include stl and xml files from the fancy_gym/envs/mujoco directory
|
||||
recursive-include fancy_gym/envs/mujoco *.stl
|
||||
recursive-include fancy_gym/envs/mujoco *.xml
|
||||
|
||||
# Also shipping the most important part of fancy gym
|
||||
include icon.svg
|
||||
@@ -1,230 +1,87 @@
|
||||
# Fancy Gym
|
||||
<h1 align="center">
|
||||
<br>
|
||||
<img src='https://raw.githubusercontent.com/ALRhub/fancy_gym/master/icon.svg' width="250px">
|
||||
<br><br>
|
||||
<b>Fancy Gym</b>
|
||||
<br><br>
|
||||
</h1>
|
||||
|
||||
`fancy_gym` offers a large variety of reinforcement learning environments under the unifying interface
|
||||
of [OpenAI gym](https://gymlibrary.dev/). We provide support (under the OpenAI gym interface) for the benchmark suites
|
||||
[DeepMind Control](https://deepmind.com/research/publications/2020/dm-control-Software-and-Tasks-for-Continuous-Control)
|
||||
(DMC) and [Metaworld](https://meta-world.github.io/). If those are not sufficient and you want to create your own custom
|
||||
gym environments, use [this guide](https://www.gymlibrary.dev/content/environment_creation/). We highly appreciate it, if
|
||||
you would then submit a PR for this environment to become part of `fancy_gym`.
|
||||
In comparison to existing libraries, we additionally support to control agents with movement primitives, such as Dynamic
|
||||
Movement Primitives (DMPs) and Probabilistic Movement Primitives (ProMP).
|
||||
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.
|
||||
|
||||
## Movement Primitive Environments (Episode-Based/Black-Box Environments)
|
||||
**Key Features**:
|
||||
|
||||
Unlike step-based environments, movement primitive (MP) environments are closer related to stochastic search, black-box
|
||||
optimization, and methods that are often used in traditional robotics and control. MP environments are typically
|
||||
episode-based and execute a full trajectory, which is generated by a trajectory generator, such as a Dynamic Movement
|
||||
Primitive (DMP) or a Probabilistic Movement Primitive (ProMP). The generated trajectory is translated into individual
|
||||
step-wise actions by a trajectory tracking controller. The exact choice of controller is, however, dependent on the type
|
||||
of environment. We currently support position, velocity, and PD-Controllers for position, velocity, and torque control,
|
||||
respectively as well as a special controller for the MetaWorld control suite.
|
||||
The goal of all MP environments is still to learn an optimal policy. Yet, an action represents the parametrization of
|
||||
the motion primitives to generate a suitable trajectory. Additionally, in this framework we support all of this also for
|
||||
the contextual setting, i.e. we expose the context space - a subset of the observation space - in the beginning of the
|
||||
episode. This requires to predict a new action/MP parametrization for each context.
|
||||
- **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](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`.
|
||||
|
||||
## Installation
|
||||
## Quickstart Guide
|
||||
|
||||
1. Clone the repository
|
||||
| ⚠ 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/). |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
|
||||
Install via pip [or use an alternative installation method](https://dominik-roth.eu/fancy/guide/installation.html)
|
||||
|
||||
```bash
|
||||
git clone git@github.com:ALRhub/fancy_gym.git
|
||||
pip install 'fancy_gym[all]'
|
||||
```
|
||||
|
||||
2. Go to the folder
|
||||
|
||||
```bash
|
||||
cd fancy_gym
|
||||
```
|
||||
|
||||
3. Install with
|
||||
|
||||
```bash
|
||||
pip install -e .
|
||||
```
|
||||
|
||||
In case you want to use dm_control oder metaworld, you can install them by specifying extras
|
||||
|
||||
```bash
|
||||
pip install -e .[dmc,metaworld]
|
||||
```
|
||||
|
||||
> **Note:**
|
||||
> While our library already fully supports the new mujoco bindings, metaworld still relies on
|
||||
> [mujoco_py](https://github.com/openai/mujoco-py), hence make sure to have mujoco 2.1 installed beforehand.
|
||||
|
||||
## How to use Fancy Gym
|
||||
|
||||
We will only show the basics here and prepared [multiple examples](fancy_gym/examples/) for a more detailed look.
|
||||
|
||||
### Step-wise Environments
|
||||
Try out one of our step-based environments [or explore our other envs](https://dominik-roth.eu/fancy/envs/fancy/index.html)
|
||||
|
||||
```python
|
||||
import fancy_gym
|
||||
import gymnasium as gym
|
||||
import fancy_gym
|
||||
import time
|
||||
|
||||
env = fancy_gym.make('Reacher5d-v0', seed=1)
|
||||
obs = env.reset()
|
||||
|
||||
for i in range(1000):
|
||||
action = env.action_space.sample()
|
||||
obs, reward, done, info = env.step(action)
|
||||
if i % 5 == 0:
|
||||
env = gym.make('fancy/BoxPushingDense-v0', render_mode='human')
|
||||
observation = env.reset()
|
||||
env.render()
|
||||
|
||||
if done:
|
||||
obs = env.reset()
|
||||
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()
|
||||
```
|
||||
|
||||
When using `dm_control` tasks we expect the `env_id` to be specified as `dmc:domain_name-task_name` or for manipulation
|
||||
tasks as `dmc:manipulation-environment_name`. For `metaworld` tasks, we require the structure `metaworld:env_id-v2`, our
|
||||
custom tasks and standard gym environments can be created without prefixes.
|
||||
|
||||
### 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. 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 fancy_gym
|
||||
import gymnasium as gym
|
||||
import fancy_gym
|
||||
|
||||
env = fancy_gym.make('Reacher5dProMP-v0', seed=1)
|
||||
# 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')
|
||||
env = gym.make('fancy_ProMP/BoxPushingDense-v0', render_mode='human')
|
||||
env.reset()
|
||||
env.render()
|
||||
|
||||
# This returns the context information, not the full state observation
|
||||
obs = env.reset()
|
||||
|
||||
for i in range(5):
|
||||
action = env.action_space.sample()
|
||||
obs, reward, done, info = env.step(action)
|
||||
|
||||
# Done is always True as we are working on the episode level, hence we always reset()
|
||||
obs = 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 two keys `DMP` and `ProMP` that store a list of available environment ids.
|
||||
## Documentation
|
||||
|
||||
```python
|
||||
import fancy_gym
|
||||
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).
|
||||
|
||||
print("Fancy Black-box tasks:")
|
||||
print(fancy_gym.ALL_FANCY_MOVEMENT_PRIMITIVE_ENVIRONMENTS)
|
||||
## Citing the Project
|
||||
|
||||
print("OpenAI Gym Black-box tasks:")
|
||||
print(fancy_gym.ALL_GYM_MOVEMENT_PRIMITIVE_ENVIRONMENTS)
|
||||
To cite this repository in publications:
|
||||
|
||||
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)
|
||||
```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},
|
||||
}
|
||||
```
|
||||
|
||||
### How to create a new MP task
|
||||
## Icon Attribution
|
||||
|
||||
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](fancy_gym/black_box/raw_interface_wrapper.py) needs to be implemented.
|
||||
|
||||
```python
|
||||
from abc import abstractmethod
|
||||
from typing import Union, Tuple
|
||||
|
||||
import gym
|
||||
import numpy as np
|
||||
|
||||
|
||||
class RawInterfaceWrapper(gym.Wrapper):
|
||||
|
||||
@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()
|
||||
|
||||
```
|
||||
|
||||
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](fancy_gym/examples/).
|
||||
|
||||
```python
|
||||
import fancy_gym
|
||||
|
||||
# Base environment name, according to structure of above example
|
||||
base_env_id = "dmc:ball_in_cup-catch"
|
||||
|
||||
# Replace this wrapper with the custom wrapper for your environment by inheriting from the RawInferfaceWrapper.
|
||||
# You can also add other gym.Wrappers in case they are needed,
|
||||
# e.g. gym.wrappers.FlattenObservation for dict observations
|
||||
wrappers = [fancy_gym.dmc.suite.ball_in_cup.MPWrapper]
|
||||
kwargs = {...}
|
||||
env = fancy_gym.make_bb(base_env_id, wrappers=wrappers, seed=0, **kwargs)
|
||||
|
||||
rewards = 0
|
||||
obs = env.reset()
|
||||
|
||||
# number of samples/full trajectories (multiple environment steps)
|
||||
for i in range(5):
|
||||
ac = env.action_space.sample()
|
||||
obs, reward, done, info = env.step(ac)
|
||||
rewards += reward
|
||||
|
||||
if done:
|
||||
print(base_env_id, rewards)
|
||||
rewards = 0
|
||||
obs = env.reset()
|
||||
```
|
||||
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).
|
||||
|
||||
@@ -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
|
||||
@@ -0,0 +1,22 @@
|
||||
# Classic Control
|
||||
|
||||
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 |
|
||||
|
||||
## MP Environments
|
||||
|
||||
| Name | Description | Horizon | Action Dimension | Context Dimension |
|
||||
| ----------------------------------- | -------------------------------------------------------------------------------------------------------- | ------- | ---------------- | ----------------- |
|
||||
| `fancy_DMP/ViaPointReacher-v0` | A DMP provides a trajectory for the `fancy/ViaPointReacher-v0` task. | 200 | 25 |
|
||||
| `fancy_DMP/HoleReacherFixedGoal-v0` | A DMP provides a trajectory for the `fancy/HoleReacher-v0` task with a fixed goal attractor. | 200 | 25 |
|
||||
| `fancy_DMP/HoleReacher-v0` | A DMP provides a trajectory for the `fancy/HoleReacher-v0` task. The goal attractor needs to be learned. | 200 | 30 |
|
||||
|
||||
[//]: |`fancy/HoleReacherProMPP-v0`|
|
||||
@@ -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>`.
|
||||
@@ -0,0 +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 Environments
|
||||
|
||||
`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. | 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 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).
|
||||
@@ -0,0 +1,24 @@
|
||||
# Gymnasium
|
||||
|
||||
<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 Gymnasium counterparts.
|
||||
|
||||
| Name | Description | Trajectory Horizon | Action Dimension |
|
||||
| ------------------------------------ | -------------------------------------------------------------------- | ------------------ | ---------------- |
|
||||
| `gym_ProMP/ContinuousMountainCar-v0` | A ProMP wrapped version of the ContinuousMountainCar-v0 environment. | 100 | 1 |
|
||||
| `gym_ProMP/Reacher-v2` | A ProMP wrapped version of the Reacher-v2 environment. | 50 | 2 |
|
||||
| `gym_ProMP/FetchSlideDense-v1` | A ProMP wrapped version of the FetchSlideDense-v1 environment. | 50 | 4 |
|
||||
| `gym_ProMP/FetchReachDense-v1` | A ProMP wrapped version of the FetchReachDense-v1 environment. | 50 | 4 |
|
||||
@@ -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,13 +1,20 @@
|
||||
from fancy_gym import dmc, meta, open_ai
|
||||
from fancy_gym.utils.make_env_helpers import make, make_bb, make_rank
|
||||
from .dmc import ALL_DMC_MOVEMENT_PRIMITIVE_ENVIRONMENTS
|
||||
# Convenience function for all MP environments
|
||||
from .envs import ALL_FANCY_MOVEMENT_PRIMITIVE_ENVIRONMENTS
|
||||
from .meta import ALL_METAWORLD_MOVEMENT_PRIMITIVE_ENVIRONMENTS
|
||||
from .open_ai import ALL_GYM_MOVEMENT_PRIMITIVE_ENVIRONMENTS
|
||||
from fancy_gym import envs as fancy
|
||||
from fancy_gym.utils.make_env_helpers import make_bb
|
||||
from .envs.registry import register, upgrade
|
||||
from .envs.registry import ALL_MOVEMENT_PRIMITIVE_ENVIRONMENTS, MOVEMENT_PRIMITIVE_ENVIRONMENTS_FOR_NS
|
||||
|
||||
ALL_MOVEMENT_PRIMITIVE_ENVIRONMENTS = {
|
||||
key: value + ALL_DMC_MOVEMENT_PRIMITIVE_ENVIRONMENTS[key] +
|
||||
ALL_GYM_MOVEMENT_PRIMITIVE_ENVIRONMENTS[key] +
|
||||
ALL_METAWORLD_MOVEMENT_PRIMITIVE_ENVIRONMENTS[key]
|
||||
for key, value in ALL_FANCY_MOVEMENT_PRIMITIVE_ENVIRONMENTS.items()}
|
||||
ALL_DMC_MOVEMENT_PRIMITIVE_ENVIRONMENTS = MOVEMENT_PRIMITIVE_ENVIRONMENTS_FOR_NS['dm_control']
|
||||
ALL_FANCY_MOVEMENT_PRIMITIVE_ENVIRONMENTS = MOVEMENT_PRIMITIVE_ENVIRONMENTS_FOR_NS['fancy']
|
||||
if 'metaworld' in MOVEMENT_PRIMITIVE_ENVIRONMENTS_FOR_NS:
|
||||
ALL_METAWORLD_MOVEMENT_PRIMITIVE_ENVIRONMENTS = MOVEMENT_PRIMITIVE_ENVIRONMENTS_FOR_NS['metaworld']
|
||||
else:
|
||||
ALL_METAWORLD_MOVEMENT_PRIMITIVE_ENVIRONMENTS = 'Metaworld is not installed.'
|
||||
ALL_GYM_MOVEMENT_PRIMITIVE_ENVIRONMENTS = MOVEMENT_PRIMITIVE_ENVIRONMENTS_FOR_NS['gym']
|
||||
|
||||
|
||||
def make(*args, **kwargs):
|
||||
"""
|
||||
As part of the refactor of Fancy Gym and upgrade to gymnasium the use of fancy_gym.make has been discontinued. Regular gym.make should be used instead. For more details check out the github README. If your codebase was build for older versions of Fancy Gym and relies on the old behavior and dependency versions, please check out the legacy branch.
|
||||
"""
|
||||
raise Exception('As part of the refactor of Fancy Gym and upgrade to gymnasium the use of fancy_gym.make has been discontinued. Regular gym.make should be used instead. For more details check out the github README. If your codebase was build for older versions of Fancy Gym and relies on the old behavior and dependency versions, please check out the legacy branch.')
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
from typing import Tuple, Optional, Callable
|
||||
from typing import Tuple, Optional, Callable, Dict, Any
|
||||
|
||||
import gym
|
||||
import gymnasium as gym
|
||||
import numpy as np
|
||||
from gym import spaces
|
||||
from gymnasium import spaces
|
||||
from gymnasium.core import ObsType
|
||||
from mp_pytorch.mp.mp_interfaces import MPInterface
|
||||
|
||||
from fancy_gym.black_box.controller.base_controller import BaseController
|
||||
@@ -67,13 +68,14 @@ class BlackBoxWrapper(gym.ObservationWrapper):
|
||||
self.reward_aggregation = reward_aggregation
|
||||
|
||||
# spaces
|
||||
self.return_context_observation = not (learn_sub_trajectories or self.do_replanning)
|
||||
self.return_context_observation = not (
|
||||
learn_sub_trajectories or self.do_replanning)
|
||||
self.traj_gen_action_space = self._get_traj_gen_action_space()
|
||||
self.action_space = self._get_action_space()
|
||||
self.observation_space = self._get_observation_space()
|
||||
|
||||
# rendering
|
||||
self.render_kwargs = {}
|
||||
self.do_render = False
|
||||
self.verbose = verbose
|
||||
|
||||
# condition value
|
||||
@@ -99,14 +101,17 @@ class BlackBoxWrapper(gym.ObservationWrapper):
|
||||
# If we do not do this, the traj_gen assumes we are continuing the trajectory.
|
||||
self.traj_gen.reset()
|
||||
|
||||
clipped_params = np.clip(action, self.traj_gen_action_space.low, self.traj_gen_action_space.high)
|
||||
clipped_params = np.clip(
|
||||
action, self.traj_gen_action_space.low, self.traj_gen_action_space.high)
|
||||
self.traj_gen.set_params(clipped_params)
|
||||
init_time = np.array(0 if not self.do_replanning else self.current_traj_steps * self.dt)
|
||||
init_time = np.array(
|
||||
0 if not self.do_replanning else self.current_traj_steps * self.dt)
|
||||
|
||||
condition_pos = self.condition_pos if self.condition_pos is not None else self.current_pos
|
||||
condition_vel = self.condition_vel if self.condition_vel is not None else self.current_vel
|
||||
condition_pos = self.condition_pos if self.condition_pos is not None else self.env.get_wrapper_attr('current_pos')
|
||||
condition_vel = self.condition_vel if self.condition_vel is not None else self.env.get_wrapper_attr('current_vel')
|
||||
|
||||
self.traj_gen.set_initial_conditions(init_time, condition_pos, condition_vel)
|
||||
self.traj_gen.set_initial_conditions(
|
||||
init_time, condition_pos, condition_vel)
|
||||
self.traj_gen.set_duration(duration, self.dt)
|
||||
|
||||
position = get_numpy(self.traj_gen.get_traj_pos())
|
||||
@@ -153,24 +158,27 @@ class BlackBoxWrapper(gym.ObservationWrapper):
|
||||
trajectory_length = len(position)
|
||||
rewards = np.zeros(shape=(trajectory_length,))
|
||||
if self.verbose >= 2:
|
||||
actions = np.zeros(shape=(trajectory_length,) + self.env.action_space.shape)
|
||||
actions = np.zeros(shape=(trajectory_length,) +
|
||||
self.env.action_space.shape)
|
||||
observations = np.zeros(shape=(trajectory_length,) + self.env.observation_space.shape,
|
||||
dtype=self.env.observation_space.dtype)
|
||||
|
||||
infos = dict()
|
||||
done = False
|
||||
terminated, truncated = False, False
|
||||
|
||||
if not traj_is_valid:
|
||||
obs, trajectory_return, done, infos = self.env.invalid_traj_callback(action, position, velocity,
|
||||
self.return_context_observation,
|
||||
self.tau_bound, self.delay_bound)
|
||||
return self.observation(obs), trajectory_return, done, infos
|
||||
obs, trajectory_return, terminated, truncated, infos = self.env.invalid_traj_callback(action, position, velocity,
|
||||
self.return_context_observation, self.tau_bound, self.delay_bound)
|
||||
return self.observation(obs), trajectory_return, terminated, truncated, infos
|
||||
|
||||
self.plan_steps += 1
|
||||
for t, (pos, vel) in enumerate(zip(position, velocity)):
|
||||
step_action = self.tracking_controller.get_action(pos, vel, self.current_pos, self.current_vel)
|
||||
c_action = np.clip(step_action, self.env.action_space.low, self.env.action_space.high)
|
||||
obs, c_reward, done, info = self.env.step(c_action)
|
||||
step_action = self.tracking_controller.get_action(
|
||||
pos, vel, self.env.get_wrapper_attr('current_pos'), self.env.get_wrapper_attr('current_vel'))
|
||||
c_action = np.clip(
|
||||
step_action, self.env.action_space.low, self.env.action_space.high)
|
||||
obs, c_reward, terminated, truncated, info = self.env.step(
|
||||
c_action)
|
||||
rewards[t] = c_reward
|
||||
|
||||
if self.verbose >= 2:
|
||||
@@ -182,12 +190,11 @@ class BlackBoxWrapper(gym.ObservationWrapper):
|
||||
elems[t] = v
|
||||
infos[k] = elems
|
||||
|
||||
if self.render_kwargs:
|
||||
self.env.render(**self.render_kwargs)
|
||||
if self.do_render:
|
||||
self.env.render()
|
||||
|
||||
if done or (self.replanning_schedule(self.current_pos, self.current_vel, obs, c_action,
|
||||
t + 1 + self.current_traj_steps)
|
||||
and self.plan_steps < self.max_planning_times):
|
||||
|
||||
if terminated or truncated or (self.replanning_schedule(self.env.get_wrapper_attr('current_pos'), self.env.get_wrapper_attr('current_vel'), obs, c_action, t + 1 + self.current_traj_steps) and self.plan_steps < self.max_planning_times):
|
||||
|
||||
if self.condition_on_desired:
|
||||
self.condition_pos = pos
|
||||
@@ -207,17 +214,16 @@ class BlackBoxWrapper(gym.ObservationWrapper):
|
||||
|
||||
infos['trajectory_length'] = t + 1
|
||||
trajectory_return = self.reward_aggregation(rewards[:t + 1])
|
||||
return self.observation(obs), trajectory_return, done, infos
|
||||
return self.observation(obs), trajectory_return, terminated, truncated, infos
|
||||
|
||||
def render(self, **kwargs):
|
||||
"""Only set render options here, such that they can be used during the rollout.
|
||||
This only needs to be called once"""
|
||||
self.render_kwargs = kwargs
|
||||
def render(self):
|
||||
self.do_render = True
|
||||
|
||||
def reset(self, *, seed: Optional[int] = None, return_info: bool = False, options: Optional[dict] = None):
|
||||
def reset(self, *, seed: Optional[int] = None, options: Optional[Dict[str, Any]] = None) \
|
||||
-> Tuple[ObsType, Dict[str, Any]]:
|
||||
self.current_traj_steps = 0
|
||||
self.plan_steps = 0
|
||||
self.traj_gen.reset()
|
||||
self.condition_pos = None
|
||||
self.condition_vel = None
|
||||
return super(BlackBoxWrapper, self).reset()
|
||||
return super(BlackBoxWrapper, self).reset(seed=seed, options=options)
|
||||
|
||||
@@ -11,11 +11,11 @@ def get_controller(controller_type: str, **kwargs):
|
||||
if controller_type == "motor":
|
||||
return PDController(**kwargs)
|
||||
elif controller_type == "velocity":
|
||||
return VelController()
|
||||
return VelController(**kwargs)
|
||||
elif controller_type == "position":
|
||||
return PosController()
|
||||
return PosController(**kwargs)
|
||||
elif controller_type == "metaworld":
|
||||
return MetaWorldController()
|
||||
return MetaWorldController(**kwargs)
|
||||
else:
|
||||
raise ValueError(f"Specified controller type {controller_type} not supported, "
|
||||
f"please choose one of {ALL_TYPES}.")
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from typing import Union, Tuple
|
||||
|
||||
import gym
|
||||
import gymnasium as gym
|
||||
import numpy as np
|
||||
from mp_pytorch.mp.mp_interfaces import MPInterface
|
||||
|
||||
@@ -114,7 +114,8 @@ class RawInterfaceWrapper(gym.Wrapper):
|
||||
Returns:
|
||||
obs: artificial observation if the trajectory is invalid, by default a zero vector
|
||||
reward: artificial reward if the trajectory is invalid, by default 0
|
||||
done: artificial done if the trajectory is invalid, by default True
|
||||
terminated: artificial terminated if the trajectory is invalid, by default True
|
||||
truncated: artificial truncated if the trajectory is invalid, by default False
|
||||
info: artificial info if the trajectory is invalid, by default empty dict
|
||||
"""
|
||||
return np.zeros(1), 0, True, {}
|
||||
return np.zeros(1), 0, True, False, {}
|
||||
|
||||
@@ -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
|
||||
|---|---|---|---|---|
|
||||
|`dmc_ball_in_cup-catch_promp-v0`| A ProMP wrapped version of the "catch" task for the "ball_in_cup" environment. | 1000 | 10 | 2
|
||||
|`dmc_ball_in_cup-catch_dmp-v0`| A DMP wrapped version of the "catch" task for the "ball_in_cup" environment. | 1000| 10 | 2
|
||||
|`dmc_reacher-easy_promp-v0`| A ProMP wrapped version of the "easy" task for the "reacher" environment. | 1000 | 10 | 4
|
||||
|`dmc_reacher-easy_dmp-v0`| A DMP wrapped version of the "easy" task for the "reacher" environment. | 1000| 10 | 4
|
||||
|`dmc_reacher-hard_promp-v0`| A ProMP wrapped version of the "hard" task for the "reacher" environment.| 1000 | 10 | 4
|
||||
|`dmc_reacher-hard_dmp-v0`| A DMP wrapped version of the "hard" task for the "reacher" environment. | 1000 | 10 | 4
|
||||
@@ -1,245 +1,61 @@
|
||||
from gym.envs.registration import register
|
||||
from copy import deepcopy
|
||||
|
||||
from gymnasium.wrappers import FlattenObservation
|
||||
from gymnasium.envs.registration import register
|
||||
|
||||
from ..envs.registry import register
|
||||
|
||||
from . import manipulation, suite
|
||||
|
||||
ALL_DMC_MOVEMENT_PRIMITIVE_ENVIRONMENTS = {"DMP": [], "ProMP": [], "ProDMP": []}
|
||||
|
||||
|
||||
DEFAULT_BB_DICT_ProMP = {
|
||||
"name": 'EnvName',
|
||||
"wrappers": [],
|
||||
"trajectory_generator_kwargs": {
|
||||
'trajectory_generator_type': 'promp'
|
||||
},
|
||||
"phase_generator_kwargs": {
|
||||
'phase_generator_type': 'linear'
|
||||
},
|
||||
"controller_kwargs": {
|
||||
'controller_type': 'motor',
|
||||
"p_gains": 50.,
|
||||
"d_gains": 1.,
|
||||
},
|
||||
"basis_generator_kwargs": {
|
||||
'basis_generator_type': 'zero_rbf',
|
||||
'num_basis': 5,
|
||||
'num_basis_zero_start': 1
|
||||
}
|
||||
}
|
||||
|
||||
DEFAULT_BB_DICT_DMP = {
|
||||
"name": 'EnvName',
|
||||
"wrappers": [],
|
||||
"trajectory_generator_kwargs": {
|
||||
'trajectory_generator_type': 'dmp'
|
||||
},
|
||||
"phase_generator_kwargs": {
|
||||
'phase_generator_type': 'exp'
|
||||
},
|
||||
"controller_kwargs": {
|
||||
'controller_type': 'motor',
|
||||
"p_gains": 50.,
|
||||
"d_gains": 1.,
|
||||
},
|
||||
"basis_generator_kwargs": {
|
||||
'basis_generator_type': 'rbf',
|
||||
'num_basis': 5
|
||||
}
|
||||
}
|
||||
|
||||
# DeepMind Control Suite (DMC)
|
||||
kwargs_dict_bic_dmp = deepcopy(DEFAULT_BB_DICT_DMP)
|
||||
kwargs_dict_bic_dmp['name'] = f"dmc:ball_in_cup-catch"
|
||||
kwargs_dict_bic_dmp['wrappers'].append(suite.ball_in_cup.MPWrapper)
|
||||
# bandwidth_factor=2
|
||||
kwargs_dict_bic_dmp['phase_generator_kwargs']['alpha_phase'] = 2
|
||||
kwargs_dict_bic_dmp['trajectory_generator_kwargs']['weight_scale'] = 10 # TODO: weight scale 1, but goal scale 0.1
|
||||
register(
|
||||
id=f'dmc_ball_in_cup-catch_dmp-v0',
|
||||
entry_point='fancy_gym.utils.make_env_helpers:make_bb_env_helper',
|
||||
kwargs=kwargs_dict_bic_dmp
|
||||
id=f"dm_control/ball_in_cup-catch-v0",
|
||||
register_step_based=False,
|
||||
mp_wrapper=suite.ball_in_cup.MPWrapper,
|
||||
add_mp_types=['DMP', 'ProMP'],
|
||||
)
|
||||
ALL_DMC_MOVEMENT_PRIMITIVE_ENVIRONMENTS["DMP"].append("dmc_ball_in_cup-catch_dmp-v0")
|
||||
|
||||
kwargs_dict_bic_promp = deepcopy(DEFAULT_BB_DICT_ProMP)
|
||||
kwargs_dict_bic_promp['name'] = f"dmc:ball_in_cup-catch"
|
||||
kwargs_dict_bic_promp['wrappers'].append(suite.ball_in_cup.MPWrapper)
|
||||
register(
|
||||
id=f'dmc_ball_in_cup-catch_promp-v0',
|
||||
entry_point='fancy_gym.utils.make_env_helpers:make_bb_env_helper',
|
||||
kwargs=kwargs_dict_bic_promp
|
||||
id=f"dm_control/reacher-easy-v0",
|
||||
register_step_based=False,
|
||||
mp_wrapper=suite.reacher.MPWrapper,
|
||||
add_mp_types=['DMP', 'ProMP'],
|
||||
)
|
||||
ALL_DMC_MOVEMENT_PRIMITIVE_ENVIRONMENTS["ProMP"].append("dmc_ball_in_cup-catch_promp-v0")
|
||||
|
||||
kwargs_dict_reacher_easy_dmp = deepcopy(DEFAULT_BB_DICT_DMP)
|
||||
kwargs_dict_reacher_easy_dmp['name'] = f"dmc:reacher-easy"
|
||||
kwargs_dict_reacher_easy_dmp['wrappers'].append(suite.reacher.MPWrapper)
|
||||
# bandwidth_factor=2
|
||||
kwargs_dict_reacher_easy_dmp['phase_generator_kwargs']['alpha_phase'] = 2
|
||||
# TODO: weight scale 50, but goal scale 0.1
|
||||
kwargs_dict_reacher_easy_dmp['trajectory_generator_kwargs']['weight_scale'] = 500
|
||||
register(
|
||||
id=f'dmc_reacher-easy_dmp-v0',
|
||||
entry_point='fancy_gym.utils.make_env_helpers:make_bb_env_helper',
|
||||
kwargs=kwargs_dict_bic_dmp
|
||||
id=f"dm_control/reacher-hard-v0",
|
||||
register_step_based=False,
|
||||
mp_wrapper=suite.reacher.MPWrapper,
|
||||
add_mp_types=['DMP', 'ProMP'],
|
||||
)
|
||||
ALL_DMC_MOVEMENT_PRIMITIVE_ENVIRONMENTS["DMP"].append("dmc_reacher-easy_dmp-v0")
|
||||
|
||||
kwargs_dict_reacher_easy_promp = deepcopy(DEFAULT_BB_DICT_ProMP)
|
||||
kwargs_dict_reacher_easy_promp['name'] = f"dmc:reacher-easy"
|
||||
kwargs_dict_reacher_easy_promp['wrappers'].append(suite.reacher.MPWrapper)
|
||||
kwargs_dict_reacher_easy_promp['trajectory_generator_kwargs']['weight_scale'] = 0.2
|
||||
register(
|
||||
id=f'dmc_reacher-easy_promp-v0',
|
||||
entry_point='fancy_gym.utils.make_env_helpers:make_bb_env_helper',
|
||||
kwargs=kwargs_dict_reacher_easy_promp
|
||||
)
|
||||
ALL_DMC_MOVEMENT_PRIMITIVE_ENVIRONMENTS["ProMP"].append("dmc_reacher-easy_promp-v0")
|
||||
|
||||
kwargs_dict_reacher_hard_dmp = deepcopy(DEFAULT_BB_DICT_DMP)
|
||||
kwargs_dict_reacher_hard_dmp['name'] = f"dmc:reacher-hard"
|
||||
kwargs_dict_reacher_hard_dmp['wrappers'].append(suite.reacher.MPWrapper)
|
||||
# bandwidth_factor = 2
|
||||
kwargs_dict_reacher_hard_dmp['phase_generator_kwargs']['alpha_phase'] = 2
|
||||
# TODO: weight scale 50, but goal scale 0.1
|
||||
kwargs_dict_reacher_hard_dmp['trajectory_generator_kwargs']['weight_scale'] = 500
|
||||
register(
|
||||
id=f'dmc_reacher-hard_dmp-v0',
|
||||
entry_point='fancy_gym.utils.make_env_helpers:make_bb_env_helper',
|
||||
kwargs=kwargs_dict_reacher_hard_dmp
|
||||
)
|
||||
ALL_DMC_MOVEMENT_PRIMITIVE_ENVIRONMENTS["DMP"].append("dmc_reacher-hard_dmp-v0")
|
||||
|
||||
kwargs_dict_reacher_hard_promp = deepcopy(DEFAULT_BB_DICT_ProMP)
|
||||
kwargs_dict_reacher_hard_promp['name'] = f"dmc:reacher-hard"
|
||||
kwargs_dict_reacher_hard_promp['wrappers'].append(suite.reacher.MPWrapper)
|
||||
kwargs_dict_reacher_hard_promp['trajectory_generator_kwargs']['weight_scale'] = 0.2
|
||||
register(
|
||||
id=f'dmc_reacher-hard_promp-v0',
|
||||
entry_point='fancy_gym.utils.make_env_helpers:make_bb_env_helper',
|
||||
kwargs=kwargs_dict_reacher_hard_promp
|
||||
)
|
||||
ALL_DMC_MOVEMENT_PRIMITIVE_ENVIRONMENTS["ProMP"].append("dmc_reacher-hard_promp-v0")
|
||||
|
||||
_dmc_cartpole_tasks = ["balance", "balance_sparse", "swingup", "swingup_sparse"]
|
||||
|
||||
for _task in _dmc_cartpole_tasks:
|
||||
_env_id = f'dmc_cartpole-{_task}_dmp-v0'
|
||||
kwargs_dict_cartpole_dmp = deepcopy(DEFAULT_BB_DICT_DMP)
|
||||
kwargs_dict_cartpole_dmp['name'] = f"dmc:cartpole-{_task}"
|
||||
kwargs_dict_cartpole_dmp['wrappers'].append(suite.cartpole.MPWrapper)
|
||||
# bandwidth_factor = 2
|
||||
kwargs_dict_cartpole_dmp['phase_generator_kwargs']['alpha_phase'] = 2
|
||||
# TODO: weight scale 50, but goal scale 0.1
|
||||
kwargs_dict_cartpole_dmp['trajectory_generator_kwargs']['weight_scale'] = 500
|
||||
kwargs_dict_cartpole_dmp['controller_kwargs']['p_gains'] = 10
|
||||
kwargs_dict_cartpole_dmp['controller_kwargs']['d_gains'] = 10
|
||||
register(
|
||||
id=_env_id,
|
||||
entry_point='fancy_gym.utils.make_env_helpers:make_bb_env_helper',
|
||||
kwargs=kwargs_dict_cartpole_dmp
|
||||
id=f'dm_control/cartpole-{_task}-v0',
|
||||
register_step_based=False,
|
||||
mp_wrapper=suite.cartpole.MPWrapper,
|
||||
add_mp_types=['DMP', 'ProMP'],
|
||||
)
|
||||
ALL_DMC_MOVEMENT_PRIMITIVE_ENVIRONMENTS["DMP"].append(_env_id)
|
||||
|
||||
_env_id = f'dmc_cartpole-{_task}_promp-v0'
|
||||
kwargs_dict_cartpole_promp = deepcopy(DEFAULT_BB_DICT_ProMP)
|
||||
kwargs_dict_cartpole_promp['name'] = f"dmc:cartpole-{_task}"
|
||||
kwargs_dict_cartpole_promp['wrappers'].append(suite.cartpole.MPWrapper)
|
||||
kwargs_dict_cartpole_promp['controller_kwargs']['p_gains'] = 10
|
||||
kwargs_dict_cartpole_promp['controller_kwargs']['d_gains'] = 10
|
||||
kwargs_dict_cartpole_promp['trajectory_generator_kwargs']['weight_scale'] = 0.2
|
||||
register(
|
||||
id=_env_id,
|
||||
entry_point='fancy_gym.utils.make_env_helpers:make_bb_env_helper',
|
||||
kwargs=kwargs_dict_cartpole_promp
|
||||
)
|
||||
ALL_DMC_MOVEMENT_PRIMITIVE_ENVIRONMENTS["ProMP"].append(_env_id)
|
||||
|
||||
kwargs_dict_cartpole2poles_dmp = deepcopy(DEFAULT_BB_DICT_DMP)
|
||||
kwargs_dict_cartpole2poles_dmp['name'] = f"dmc:cartpole-two_poles"
|
||||
kwargs_dict_cartpole2poles_dmp['wrappers'].append(suite.cartpole.TwoPolesMPWrapper)
|
||||
# bandwidth_factor = 2
|
||||
kwargs_dict_cartpole2poles_dmp['phase_generator_kwargs']['alpha_phase'] = 2
|
||||
# TODO: weight scale 50, but goal scale 0.1
|
||||
kwargs_dict_cartpole2poles_dmp['trajectory_generator_kwargs']['weight_scale'] = 500
|
||||
kwargs_dict_cartpole2poles_dmp['controller_kwargs']['p_gains'] = 10
|
||||
kwargs_dict_cartpole2poles_dmp['controller_kwargs']['d_gains'] = 10
|
||||
_env_id = f'dmc_cartpole-two_poles_dmp-v0'
|
||||
register(
|
||||
id=_env_id,
|
||||
entry_point='fancy_gym.utils.make_env_helpers:make_bb_env_helper',
|
||||
kwargs=kwargs_dict_cartpole2poles_dmp
|
||||
id=f"dm_control/cartpole-two_poles-v0",
|
||||
register_step_based=False,
|
||||
mp_wrapper=suite.cartpole.TwoPolesMPWrapper,
|
||||
add_mp_types=['DMP', 'ProMP'],
|
||||
)
|
||||
ALL_DMC_MOVEMENT_PRIMITIVE_ENVIRONMENTS["DMP"].append(_env_id)
|
||||
|
||||
kwargs_dict_cartpole2poles_promp = deepcopy(DEFAULT_BB_DICT_ProMP)
|
||||
kwargs_dict_cartpole2poles_promp['name'] = f"dmc:cartpole-two_poles"
|
||||
kwargs_dict_cartpole2poles_promp['wrappers'].append(suite.cartpole.TwoPolesMPWrapper)
|
||||
kwargs_dict_cartpole2poles_promp['controller_kwargs']['p_gains'] = 10
|
||||
kwargs_dict_cartpole2poles_promp['controller_kwargs']['d_gains'] = 10
|
||||
kwargs_dict_cartpole2poles_promp['trajectory_generator_kwargs']['weight_scale'] = 0.2
|
||||
_env_id = f'dmc_cartpole-two_poles_promp-v0'
|
||||
register(
|
||||
id=_env_id,
|
||||
entry_point='fancy_gym.utils.make_env_helpers:make_bb_env_helper',
|
||||
kwargs=kwargs_dict_cartpole2poles_promp
|
||||
id=f"dm_control/cartpole-three_poles-v0",
|
||||
register_step_based=False,
|
||||
mp_wrapper=suite.cartpole.ThreePolesMPWrapper,
|
||||
add_mp_types=['DMP', 'ProMP'],
|
||||
)
|
||||
ALL_DMC_MOVEMENT_PRIMITIVE_ENVIRONMENTS["ProMP"].append(_env_id)
|
||||
|
||||
kwargs_dict_cartpole3poles_dmp = deepcopy(DEFAULT_BB_DICT_DMP)
|
||||
kwargs_dict_cartpole3poles_dmp['name'] = f"dmc:cartpole-three_poles"
|
||||
kwargs_dict_cartpole3poles_dmp['wrappers'].append(suite.cartpole.ThreePolesMPWrapper)
|
||||
# bandwidth_factor = 2
|
||||
kwargs_dict_cartpole3poles_dmp['phase_generator_kwargs']['alpha_phase'] = 2
|
||||
# TODO: weight scale 50, but goal scale 0.1
|
||||
kwargs_dict_cartpole3poles_dmp['trajectory_generator_kwargs']['weight_scale'] = 500
|
||||
kwargs_dict_cartpole3poles_dmp['controller_kwargs']['p_gains'] = 10
|
||||
kwargs_dict_cartpole3poles_dmp['controller_kwargs']['d_gains'] = 10
|
||||
_env_id = f'dmc_cartpole-three_poles_dmp-v0'
|
||||
register(
|
||||
id=_env_id,
|
||||
entry_point='fancy_gym.utils.make_env_helpers:make_bb_env_helper',
|
||||
kwargs=kwargs_dict_cartpole3poles_dmp
|
||||
)
|
||||
ALL_DMC_MOVEMENT_PRIMITIVE_ENVIRONMENTS["DMP"].append(_env_id)
|
||||
|
||||
kwargs_dict_cartpole3poles_promp = deepcopy(DEFAULT_BB_DICT_ProMP)
|
||||
kwargs_dict_cartpole3poles_promp['name'] = f"dmc:cartpole-three_poles"
|
||||
kwargs_dict_cartpole3poles_promp['wrappers'].append(suite.cartpole.ThreePolesMPWrapper)
|
||||
kwargs_dict_cartpole3poles_promp['controller_kwargs']['p_gains'] = 10
|
||||
kwargs_dict_cartpole3poles_promp['controller_kwargs']['d_gains'] = 10
|
||||
kwargs_dict_cartpole3poles_promp['trajectory_generator_kwargs']['weight_scale'] = 0.2
|
||||
_env_id = f'dmc_cartpole-three_poles_promp-v0'
|
||||
register(
|
||||
id=_env_id,
|
||||
entry_point='fancy_gym.utils.make_env_helpers:make_bb_env_helper',
|
||||
kwargs=kwargs_dict_cartpole3poles_promp
|
||||
)
|
||||
ALL_DMC_MOVEMENT_PRIMITIVE_ENVIRONMENTS["ProMP"].append(_env_id)
|
||||
|
||||
# DeepMind Manipulation
|
||||
kwargs_dict_mani_reach_site_features_dmp = deepcopy(DEFAULT_BB_DICT_DMP)
|
||||
kwargs_dict_mani_reach_site_features_dmp['name'] = f"dmc:manipulation-reach_site_features"
|
||||
kwargs_dict_mani_reach_site_features_dmp['wrappers'].append(manipulation.reach_site.MPWrapper)
|
||||
kwargs_dict_mani_reach_site_features_dmp['phase_generator_kwargs']['alpha_phase'] = 2
|
||||
# TODO: weight scale 50, but goal scale 0.1
|
||||
kwargs_dict_mani_reach_site_features_dmp['trajectory_generator_kwargs']['weight_scale'] = 500
|
||||
kwargs_dict_mani_reach_site_features_dmp['controller_kwargs']['controller_type'] = 'velocity'
|
||||
register(
|
||||
id=f'dmc_manipulation-reach_site_dmp-v0',
|
||||
entry_point='fancy_gym.utils.make_env_helpers:make_bb_env_helper',
|
||||
kwargs=kwargs_dict_mani_reach_site_features_dmp
|
||||
id=f"dm_control/reach_site_features-v0",
|
||||
register_step_based=False,
|
||||
mp_wrapper=manipulation.reach_site.MPWrapper,
|
||||
add_mp_types=['DMP', 'ProMP'],
|
||||
)
|
||||
ALL_DMC_MOVEMENT_PRIMITIVE_ENVIRONMENTS["DMP"].append("dmc_manipulation-reach_site_dmp-v0")
|
||||
|
||||
kwargs_dict_mani_reach_site_features_promp = deepcopy(DEFAULT_BB_DICT_ProMP)
|
||||
kwargs_dict_mani_reach_site_features_promp['name'] = f"dmc:manipulation-reach_site_features"
|
||||
kwargs_dict_mani_reach_site_features_promp['wrappers'].append(manipulation.reach_site.MPWrapper)
|
||||
kwargs_dict_mani_reach_site_features_promp['trajectory_generator_kwargs']['weight_scale'] = 0.2
|
||||
kwargs_dict_mani_reach_site_features_promp['controller_kwargs']['controller_type'] = 'velocity'
|
||||
register(
|
||||
id=f'dmc_manipulation-reach_site_promp-v0',
|
||||
entry_point='fancy_gym.utils.make_env_helpers:make_bb_env_helper',
|
||||
kwargs=kwargs_dict_mani_reach_site_features_promp
|
||||
)
|
||||
ALL_DMC_MOVEMENT_PRIMITIVE_ENVIRONMENTS["ProMP"].append("dmc_manipulation-reach_site_promp-v0")
|
||||
|
||||
@@ -1,186 +0,0 @@
|
||||
# Adopted from: https://github.com/denisyarats/dmc2gym/blob/master/dmc2gym/wrappers.py
|
||||
# License: MIT
|
||||
# Copyright (c) 2020 Denis Yarats
|
||||
import collections
|
||||
from collections.abc import MutableMapping
|
||||
from typing import Any, Dict, Tuple, Optional, Union, Callable
|
||||
|
||||
import gym
|
||||
import numpy as np
|
||||
from dm_control import composer
|
||||
from dm_control.rl import control
|
||||
from dm_env import specs
|
||||
from gym import spaces
|
||||
from gym.core import ObsType
|
||||
|
||||
|
||||
def _spec_to_box(spec):
|
||||
def extract_min_max(s):
|
||||
assert s.dtype == np.float64 or s.dtype == np.float32, \
|
||||
f"Only float64 and float32 types are allowed, instead {s.dtype} was found"
|
||||
dim = int(np.prod(s.shape))
|
||||
if type(s) == specs.Array:
|
||||
bound = np.inf * np.ones(dim, dtype=s.dtype)
|
||||
return -bound, bound
|
||||
elif type(s) == specs.BoundedArray:
|
||||
zeros = np.zeros(dim, dtype=s.dtype)
|
||||
return s.minimum + zeros, s.maximum + zeros
|
||||
|
||||
mins, maxs = [], []
|
||||
for s in spec:
|
||||
mn, mx = extract_min_max(s)
|
||||
mins.append(mn)
|
||||
maxs.append(mx)
|
||||
low = np.concatenate(mins, axis=0)
|
||||
high = np.concatenate(maxs, axis=0)
|
||||
assert low.shape == high.shape
|
||||
return spaces.Box(low, high, dtype=s.dtype)
|
||||
|
||||
|
||||
def _flatten_obs(obs: MutableMapping):
|
||||
"""
|
||||
Flattens an observation of type MutableMapping, e.g. a dict to a 1D array.
|
||||
Args:
|
||||
obs: observation to flatten
|
||||
|
||||
Returns: 1D array of observation
|
||||
|
||||
"""
|
||||
|
||||
if not isinstance(obs, MutableMapping):
|
||||
raise ValueError(f'Requires dict-like observations structure. {type(obs)} found.')
|
||||
|
||||
# Keep key order consistent for non OrderedDicts
|
||||
keys = obs.keys() if isinstance(obs, collections.OrderedDict) else sorted(obs.keys())
|
||||
|
||||
obs_vals = [np.array([obs[key]]) if np.isscalar(obs[key]) else obs[key].ravel() for key in keys]
|
||||
return np.concatenate(obs_vals)
|
||||
|
||||
|
||||
class DMCWrapper(gym.Env):
|
||||
def __init__(self,
|
||||
env: Callable[[], Union[composer.Environment, control.Environment]],
|
||||
):
|
||||
|
||||
# TODO: Currently this is required to be a function because dmc does not allow to copy composers environments
|
||||
self._env = env()
|
||||
|
||||
# action and observation space
|
||||
self._action_space = _spec_to_box([self._env.action_spec()])
|
||||
self._observation_space = _spec_to_box(self._env.observation_spec().values())
|
||||
|
||||
self._window = None
|
||||
self.id = 'dmc'
|
||||
|
||||
def __getattr__(self, item):
|
||||
"""Propagate only non-existent properties to wrapped env."""
|
||||
if item.startswith('_'):
|
||||
raise AttributeError("attempted to get missing private attribute '{}'".format(item))
|
||||
if item in self.__dict__:
|
||||
return getattr(self, item)
|
||||
return getattr(self._env, item)
|
||||
|
||||
def _get_obs(self, time_step):
|
||||
obs = _flatten_obs(time_step.observation).astype(self.observation_space.dtype)
|
||||
return obs
|
||||
|
||||
@property
|
||||
def observation_space(self):
|
||||
return self._observation_space
|
||||
|
||||
@property
|
||||
def action_space(self):
|
||||
return self._action_space
|
||||
|
||||
@property
|
||||
def dt(self):
|
||||
return self._env.control_timestep()
|
||||
|
||||
def seed(self, seed=None):
|
||||
self._action_space.seed(seed)
|
||||
self._observation_space.seed(seed)
|
||||
|
||||
def step(self, action) -> Tuple[np.ndarray, float, bool, Dict[str, Any]]:
|
||||
assert self._action_space.contains(action)
|
||||
extra = {'internal_state': self._env.physics.get_state().copy()}
|
||||
|
||||
time_step = self._env.step(action)
|
||||
reward = time_step.reward or 0.
|
||||
done = time_step.last()
|
||||
obs = self._get_obs(time_step)
|
||||
extra['discount'] = time_step.discount
|
||||
|
||||
return obs, reward, done, extra
|
||||
|
||||
def reset(self, *, seed: Optional[int] = None, return_info: bool = False,
|
||||
options: Optional[dict] = None, ) -> Union[ObsType, Tuple[ObsType, dict]]:
|
||||
time_step = self._env.reset()
|
||||
obs = self._get_obs(time_step)
|
||||
return obs
|
||||
|
||||
def render(self, mode='rgb_array', height=240, width=320, camera_id=-1, overlays=(), depth=False,
|
||||
segmentation=False, scene_option=None, render_flag_overrides=None):
|
||||
|
||||
# assert mode == 'rgb_array', 'only support rgb_array mode, given %s' % mode
|
||||
if mode == "rgb_array":
|
||||
return self._env.physics.render(height=height, width=width, camera_id=camera_id, overlays=overlays,
|
||||
depth=depth, segmentation=segmentation, scene_option=scene_option,
|
||||
render_flag_overrides=render_flag_overrides)
|
||||
|
||||
# Render max available buffer size. Larger is only possible by altering the XML.
|
||||
img = self._env.physics.render(height=self._env.physics.model.vis.global_.offheight,
|
||||
width=self._env.physics.model.vis.global_.offwidth,
|
||||
camera_id=camera_id, overlays=overlays, depth=depth, segmentation=segmentation,
|
||||
scene_option=scene_option, render_flag_overrides=render_flag_overrides)
|
||||
|
||||
if depth:
|
||||
img = np.dstack([img.astype(np.uint8)] * 3)
|
||||
|
||||
if mode == 'human':
|
||||
try:
|
||||
import cv2
|
||||
if self._window is None:
|
||||
self._window = cv2.namedWindow(self.id, cv2.WINDOW_AUTOSIZE)
|
||||
cv2.imshow(self.id, img[..., ::-1]) # Image in BGR
|
||||
cv2.waitKey(1)
|
||||
except ImportError:
|
||||
raise gym.error.DependencyNotInstalled("Rendering requires opencv. Run `pip install opencv-python`")
|
||||
# PYGAME seems to destroy some global rendering configs from the physics render
|
||||
# except ImportError:
|
||||
# import pygame
|
||||
# img_copy = img.copy().transpose((1, 0, 2))
|
||||
# if self._window is None:
|
||||
# pygame.init()
|
||||
# pygame.display.init()
|
||||
# self._window = pygame.display.set_mode(img_copy.shape[:2])
|
||||
# self.clock = pygame.time.Clock()
|
||||
#
|
||||
# surf = pygame.surfarray.make_surface(img_copy)
|
||||
# self._window.blit(surf, (0, 0))
|
||||
# pygame.event.pump()
|
||||
# self.clock.tick(30)
|
||||
# pygame.display.flip()
|
||||
|
||||
def close(self):
|
||||
super().close()
|
||||
if self._window is not None:
|
||||
try:
|
||||
import cv2
|
||||
cv2.destroyWindow(self.id)
|
||||
except ImportError:
|
||||
import pygame
|
||||
|
||||
pygame.display.quit()
|
||||
pygame.quit()
|
||||
|
||||
@property
|
||||
def reward_range(self) -> Tuple[float, float]:
|
||||
reward_spec = self._env.reward_spec()
|
||||
if isinstance(reward_spec, specs.BoundedArray):
|
||||
return reward_spec.minimum, reward_spec.maximum
|
||||
return -float('inf'), float('inf')
|
||||
|
||||
@property
|
||||
def metadata(self):
|
||||
return {'render.modes': ['human', 'rgb_array'],
|
||||
'video.frames_per_second': round(1.0 / self._env.control_timestep())}
|
||||
@@ -6,6 +6,28 @@ from fancy_gym.black_box.raw_interface_wrapper import RawInterfaceWrapper
|
||||
|
||||
|
||||
class MPWrapper(RawInterfaceWrapper):
|
||||
mp_config = {
|
||||
'ProMP': {
|
||||
'controller_kwargs': {
|
||||
'p_gains': 50.0,
|
||||
},
|
||||
'trajectory_generator_kwargs': {
|
||||
'weights_scale': 0.2,
|
||||
},
|
||||
},
|
||||
'DMP': {
|
||||
'controller_kwargs': {
|
||||
'p_gains': 50.0,
|
||||
},
|
||||
'phase_generator': {
|
||||
'alpha_phase': 2,
|
||||
},
|
||||
'trajectory_generator_kwargs': {
|
||||
'weights_scale': 500,
|
||||
},
|
||||
},
|
||||
'ProDMP': {},
|
||||
}
|
||||
|
||||
@property
|
||||
def context_mask(self) -> np.ndarray:
|
||||
@@ -35,4 +57,4 @@ class MPWrapper(RawInterfaceWrapper):
|
||||
|
||||
@property
|
||||
def dt(self) -> Union[float, int]:
|
||||
return self.env.dt
|
||||
return self.env.control_timestep()
|
||||
|
||||
@@ -6,6 +6,25 @@ from fancy_gym.black_box.raw_interface_wrapper import RawInterfaceWrapper
|
||||
|
||||
|
||||
class MPWrapper(RawInterfaceWrapper):
|
||||
mp_config = {
|
||||
'ProMP': {
|
||||
'controller_kwargs': {
|
||||
'p_gains': 50.0,
|
||||
},
|
||||
},
|
||||
'DMP': {
|
||||
'controller_kwargs': {
|
||||
'p_gains': 50.0,
|
||||
},
|
||||
'phase_generator': {
|
||||
'alpha_phase': 2,
|
||||
},
|
||||
'trajectory_generator_kwargs': {
|
||||
'weights_scale': 10
|
||||
},
|
||||
},
|
||||
'ProDMP': {},
|
||||
}
|
||||
|
||||
@property
|
||||
def context_mask(self) -> np.ndarray:
|
||||
@@ -31,4 +50,4 @@ class MPWrapper(RawInterfaceWrapper):
|
||||
|
||||
@property
|
||||
def dt(self) -> Union[float, int]:
|
||||
return self.env.dt
|
||||
return self.env.control_timestep()
|
||||
|
||||
@@ -6,6 +6,30 @@ from fancy_gym.black_box.raw_interface_wrapper import RawInterfaceWrapper
|
||||
|
||||
|
||||
class MPWrapper(RawInterfaceWrapper):
|
||||
mp_config = {
|
||||
'ProMP': {
|
||||
'controller_kwargs': {
|
||||
'p_gains': 10,
|
||||
'd_gains': 10,
|
||||
},
|
||||
'trajectory_generator_kwargs': {
|
||||
'weights_scale': 0.2,
|
||||
},
|
||||
},
|
||||
'DMP': {
|
||||
'controller_kwargs': {
|
||||
'p_gains': 10,
|
||||
'd_gains': 10,
|
||||
},
|
||||
'phase_generator': {
|
||||
'alpha_phase': 2,
|
||||
},
|
||||
'trajectory_generator_kwargs': {
|
||||
'weights_scale': 500,
|
||||
},
|
||||
},
|
||||
'ProDMP': {},
|
||||
}
|
||||
|
||||
def __init__(self, env, n_poles: int = 1):
|
||||
self.n_poles = n_poles
|
||||
@@ -35,7 +59,7 @@ class MPWrapper(RawInterfaceWrapper):
|
||||
|
||||
@property
|
||||
def dt(self) -> Union[float, int]:
|
||||
return self.env.dt
|
||||
return self.env.control_timestep()
|
||||
|
||||
|
||||
class TwoPolesMPWrapper(MPWrapper):
|
||||
|
||||
@@ -6,6 +6,30 @@ from fancy_gym.black_box.raw_interface_wrapper import RawInterfaceWrapper
|
||||
|
||||
|
||||
class MPWrapper(RawInterfaceWrapper):
|
||||
mp_config = {
|
||||
'ProMP': {
|
||||
'controller_kwargs': {
|
||||
'p_gains': 50.0,
|
||||
'd_gains': 1.0,
|
||||
},
|
||||
'trajectory_generator_kwargs': {
|
||||
'weights_scale': 0.2,
|
||||
},
|
||||
},
|
||||
'DMP': {
|
||||
'controller_kwargs': {
|
||||
'p_gains': 50.0,
|
||||
'd_gains': 1.0,
|
||||
},
|
||||
'phase_generator': {
|
||||
'alpha_phase': 2,
|
||||
},
|
||||
'trajectory_generator_kwargs': {
|
||||
'weights_scale': 500,
|
||||
},
|
||||
},
|
||||
'ProDMP': {},
|
||||
}
|
||||
|
||||
@property
|
||||
def context_mask(self) -> np.ndarray:
|
||||
@@ -30,4 +54,4 @@ class MPWrapper(RawInterfaceWrapper):
|
||||
|
||||
@property
|
||||
def dt(self) -> Union[float, int]:
|
||||
return self.env.dt
|
||||
return self.env.control_timestep()
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
### Classic Control
|
||||
|
||||
## Step-based Environments
|
||||
|Name| Description|Horizon|Action Dimension|Observation Dimension
|
||||
|---|---|---|---|---|
|
||||
|`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
|
||||
|`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
|
||||
|`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
|
||||
|`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
|
||||
|Name| Description|Horizon|Action Dimension|Context Dimension
|
||||
|---|---|---|---|---|
|
||||
|`ViaPointReacherDMP-v0`| A DMP provides a trajectory for the `ViaPointReacher-v0` task. | 200 | 25
|
||||
|`HoleReacherFixedGoalDMP-v0`| A DMP provides a trajectory for the `HoleReacher-v0` task with a fixed goal attractor. | 200 | 25
|
||||
|`HoleReacherDMP-v0`| A DMP provides a trajectory for the `HoleReacher-v0` task. The goal attractor needs to be learned. | 200 | 30
|
||||
|
||||
[//]: |`HoleReacherProMPP-v0`|
|
||||
@@ -1,10 +1,10 @@
|
||||
from typing import Union, Tuple, Optional
|
||||
from typing import Union, Tuple, Optional, Any, Dict
|
||||
|
||||
import gym
|
||||
import gymnasium as gym
|
||||
import numpy as np
|
||||
from gym import spaces
|
||||
from gym.core import ObsType
|
||||
from gym.utils import seeding
|
||||
from gymnasium import spaces
|
||||
from gymnasium.core import ObsType
|
||||
from gymnasium.utils import seeding
|
||||
|
||||
from fancy_gym.envs.classic_control.utils import intersect
|
||||
|
||||
@@ -14,12 +14,14 @@ class BaseReacherEnv(gym.Env):
|
||||
Base class for all reaching environments.
|
||||
"""
|
||||
|
||||
def __init__(self, n_links: int, random_start: bool = True, allow_self_collision: bool = False):
|
||||
def __init__(self, n_links: int, random_start: bool = True, allow_self_collision: bool = False, render_mode: str = None):
|
||||
super().__init__()
|
||||
self.link_lengths = np.ones(n_links)
|
||||
self.n_links = n_links
|
||||
self._dt = 0.01
|
||||
|
||||
self.render_mode = render_mode
|
||||
|
||||
self.random_start = random_start
|
||||
|
||||
self.allow_self_collision = allow_self_collision
|
||||
@@ -55,7 +57,6 @@ class BaseReacherEnv(gym.Env):
|
||||
self.fig = None
|
||||
|
||||
self._steps = 0
|
||||
self.seed()
|
||||
|
||||
@property
|
||||
def dt(self) -> Union[float, int]:
|
||||
@@ -69,10 +70,15 @@ class BaseReacherEnv(gym.Env):
|
||||
def current_vel(self):
|
||||
return self._angle_velocity.copy()
|
||||
|
||||
def reset(self, *, seed: Optional[int] = None, return_info: bool = False,
|
||||
options: Optional[dict] = None, ) -> Union[ObsType, Tuple[ObsType, dict]]:
|
||||
def reset(self, *, seed: Optional[int] = None, options: Optional[Dict[str, Any]] = None) \
|
||||
-> Tuple[ObsType, Dict[str, Any]]:
|
||||
# Sample only orientation of first link, i.e. the arm is always straight.
|
||||
if self.random_start:
|
||||
super(BaseReacherEnv, self).reset(seed=seed, options=options)
|
||||
try:
|
||||
random_start = options.get('random_start', self.random_start)
|
||||
except AttributeError:
|
||||
random_start = self.random_start
|
||||
if random_start:
|
||||
first_joint = self.np_random.uniform(np.pi / 4, 3 * np.pi / 4)
|
||||
self._joint_angles = np.hstack([[first_joint], np.zeros(self.n_links - 1)])
|
||||
self._start_pos = self._joint_angles.copy()
|
||||
@@ -84,7 +90,7 @@ class BaseReacherEnv(gym.Env):
|
||||
self._update_joints()
|
||||
self._steps = 0
|
||||
|
||||
return self._get_obs().copy()
|
||||
return self._get_obs().copy(), {}
|
||||
|
||||
def _update_joints(self):
|
||||
"""
|
||||
@@ -124,10 +130,6 @@ class BaseReacherEnv(gym.Env):
|
||||
def _terminate(self, info) -> bool:
|
||||
raise NotImplementedError
|
||||
|
||||
def seed(self, seed=None):
|
||||
self.np_random, seed = seeding.np_random(seed)
|
||||
return [seed]
|
||||
|
||||
def close(self):
|
||||
super(BaseReacherEnv, self).close()
|
||||
del self.fig
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import numpy as np
|
||||
from gym import spaces
|
||||
from gymnasium import spaces
|
||||
|
||||
from fancy_gym.envs.classic_control.base_reacher.base_reacher import BaseReacherEnv
|
||||
|
||||
@@ -10,8 +10,8 @@ class BaseReacherDirectEnv(BaseReacherEnv):
|
||||
"""
|
||||
|
||||
def __init__(self, n_links: int, random_start: bool = True,
|
||||
allow_self_collision: bool = False):
|
||||
super().__init__(n_links, random_start, allow_self_collision)
|
||||
allow_self_collision: bool = False, **kwargs):
|
||||
super().__init__(n_links, random_start, allow_self_collision, **kwargs)
|
||||
|
||||
self.max_vel = 2 * np.pi
|
||||
action_bound = np.ones((self.n_links,)) * self.max_vel
|
||||
@@ -32,6 +32,7 @@ class BaseReacherDirectEnv(BaseReacherEnv):
|
||||
reward, info = self._get_reward(action)
|
||||
|
||||
self._steps += 1
|
||||
done = self._terminate(info)
|
||||
terminated = self._terminate(info)
|
||||
truncated = False
|
||||
|
||||
return self._get_obs().copy(), reward, done, info
|
||||
return self._get_obs().copy(), reward, terminated, truncated, info
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import numpy as np
|
||||
from gym import spaces
|
||||
from gymnasium import spaces
|
||||
|
||||
from fancy_gym.envs.classic_control.base_reacher.base_reacher import BaseReacherEnv
|
||||
|
||||
@@ -10,8 +10,8 @@ class BaseReacherTorqueEnv(BaseReacherEnv):
|
||||
"""
|
||||
|
||||
def __init__(self, n_links: int, random_start: bool = True,
|
||||
allow_self_collision: bool = False):
|
||||
super().__init__(n_links, random_start, allow_self_collision)
|
||||
allow_self_collision: bool = False, **kwargs):
|
||||
super().__init__(n_links, random_start, allow_self_collision, **kwargs)
|
||||
|
||||
self.max_torque = 1000
|
||||
action_bound = np.ones((self.n_links,)) * self.max_torque
|
||||
@@ -31,6 +31,7 @@ class BaseReacherTorqueEnv(BaseReacherEnv):
|
||||
reward, info = self._get_reward(action)
|
||||
|
||||
self._steps += 1
|
||||
done = False
|
||||
terminated = False
|
||||
truncated = False
|
||||
|
||||
return self._get_obs().copy(), reward, done, info
|
||||
return self._get_obs().copy(), reward, terminated, truncated, info
|
||||
|
||||
@@ -1,22 +1,25 @@
|
||||
from typing import Union, Optional, Tuple
|
||||
from typing import Union, Optional, Tuple, Any, Dict
|
||||
|
||||
import gym
|
||||
import gymnasium as gym
|
||||
import matplotlib.pyplot as plt
|
||||
import numpy as np
|
||||
from gym.core import ObsType
|
||||
from gymnasium import spaces
|
||||
from gymnasium.core import ObsType
|
||||
from matplotlib import patches
|
||||
|
||||
from fancy_gym.envs.classic_control.base_reacher.base_reacher_direct import BaseReacherDirectEnv
|
||||
from . import MPWrapper
|
||||
|
||||
MAX_EPISODE_STEPS_HOLEREACHER = 200
|
||||
|
||||
|
||||
class HoleReacherEnv(BaseReacherDirectEnv):
|
||||
|
||||
def __init__(self, n_links: int, hole_x: Union[None, float] = None, hole_depth: Union[None, float] = None,
|
||||
hole_width: float = 1., random_start: bool = False, allow_self_collision: bool = False,
|
||||
allow_wall_collision: bool = False, collision_penalty: float = 1000, rew_fct: str = "simple"):
|
||||
allow_wall_collision: bool = False, collision_penalty: float = 1000, rew_fct: str = "simple", **kwargs):
|
||||
|
||||
super().__init__(n_links, random_start, allow_self_collision)
|
||||
super().__init__(n_links, random_start, allow_self_collision, **kwargs)
|
||||
|
||||
# provided initial parameters
|
||||
self.initial_x = hole_x # x-position of center of hole
|
||||
@@ -40,7 +43,7 @@ class HoleReacherEnv(BaseReacherDirectEnv):
|
||||
[np.inf] # env steps, because reward start after n steps TODO: Maybe
|
||||
])
|
||||
# self.action_space = gym.spaces.Box(low=-action_bound, high=action_bound, shape=action_bound.shape)
|
||||
self.observation_space = gym.spaces.Box(low=-state_bound, high=state_bound, shape=state_bound.shape)
|
||||
self.observation_space = spaces.Box(low=-state_bound, high=state_bound, shape=state_bound.shape)
|
||||
|
||||
if rew_fct == "simple":
|
||||
from fancy_gym.envs.classic_control.hole_reacher.hr_simple_reward import HolereacherReward
|
||||
@@ -54,13 +57,18 @@ class HoleReacherEnv(BaseReacherDirectEnv):
|
||||
else:
|
||||
raise ValueError("Unknown reward function {}".format(rew_fct))
|
||||
|
||||
def reset(self, *, seed: Optional[int] = None, return_info: bool = False,
|
||||
options: Optional[dict] = None, ) -> Union[ObsType, Tuple[ObsType, dict]]:
|
||||
def reset(self, *, seed: Optional[int] = None, options: Optional[Dict[str, Any]] = None) \
|
||||
-> Tuple[ObsType, Dict[str, Any]]:
|
||||
|
||||
# initialize seed here as the random goal needs to be generated before the super reset()
|
||||
gym.Env.reset(self, seed=seed, options=options)
|
||||
|
||||
self._generate_hole()
|
||||
self._set_patches()
|
||||
self.reward_function.reset()
|
||||
|
||||
return super().reset()
|
||||
# do not provide seed to avoid setting it twice
|
||||
return super(HoleReacherEnv, self).reset(options=options)
|
||||
|
||||
def _get_reward(self, action: np.ndarray) -> (float, dict):
|
||||
return self.reward_function.get_reward(self)
|
||||
@@ -170,7 +178,7 @@ class HoleReacherEnv(BaseReacherDirectEnv):
|
||||
|
||||
return False
|
||||
|
||||
def render(self, mode='human'):
|
||||
def render(self):
|
||||
if self.fig is None:
|
||||
# Create base figure once on the beginning. Afterwards only update
|
||||
plt.ion()
|
||||
@@ -189,7 +197,7 @@ class HoleReacherEnv(BaseReacherDirectEnv):
|
||||
self.fig.gca().set_title(
|
||||
f"Iteration: {self._steps}, distance: {np.linalg.norm(self.end_effector - self._goal) ** 2}")
|
||||
|
||||
if mode == "human":
|
||||
if self.render_mode == "human":
|
||||
|
||||
# arm
|
||||
self.line.set_data(self._joints[:, 0], self._joints[:, 1])
|
||||
@@ -197,7 +205,7 @@ class HoleReacherEnv(BaseReacherDirectEnv):
|
||||
self.fig.canvas.draw()
|
||||
self.fig.canvas.flush_events()
|
||||
|
||||
elif mode == "partial":
|
||||
elif self.render_mode == "partial":
|
||||
if self._steps % 20 == 0 or self._steps in [1, 199] or self._is_collided:
|
||||
# Arm
|
||||
plt.plot(self._joints[:, 0], self._joints[:, 1], 'ro-', markerfacecolor='k',
|
||||
@@ -223,16 +231,3 @@ class HoleReacherEnv(BaseReacherDirectEnv):
|
||||
self.fig.gca().add_patch(left_block)
|
||||
self.fig.gca().add_patch(right_block)
|
||||
self.fig.gca().add_patch(hole_floor)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
env = HoleReacherEnv(5)
|
||||
env.reset()
|
||||
|
||||
for i in range(10000):
|
||||
ac = env.action_space.sample()
|
||||
obs, rew, done, info = env.step(ac)
|
||||
env.render()
|
||||
if done:
|
||||
env.reset()
|
||||
|
||||
@@ -7,6 +7,30 @@ from fancy_gym.black_box.raw_interface_wrapper import RawInterfaceWrapper
|
||||
|
||||
class MPWrapper(RawInterfaceWrapper):
|
||||
|
||||
mp_config = {
|
||||
'ProMP': {
|
||||
'controller_kwargs': {
|
||||
'controller_type': 'velocity',
|
||||
},
|
||||
'trajectory_generator_kwargs': {
|
||||
'weights_scale': 2,
|
||||
},
|
||||
},
|
||||
'DMP': {
|
||||
'controller_kwargs': {
|
||||
'controller_type': 'velocity',
|
||||
},
|
||||
'trajectory_generator_kwargs': {
|
||||
# TODO: Before it was weight scale 50 and goal scale 0.1. We now only have weight scale and thus set it to 500. Check
|
||||
'weights_scale': 500,
|
||||
},
|
||||
'phase_generator_kwargs': {
|
||||
'alpha_phase': 2.5,
|
||||
},
|
||||
},
|
||||
'ProDMP': {},
|
||||
}
|
||||
|
||||
@property
|
||||
def context_mask(self):
|
||||
return np.hstack([
|
||||
|
||||
@@ -7,6 +7,28 @@ from fancy_gym.black_box.raw_interface_wrapper import RawInterfaceWrapper
|
||||
|
||||
class MPWrapper(RawInterfaceWrapper):
|
||||
|
||||
mp_config = {
|
||||
'ProMP': {
|
||||
'controller_kwargs': {
|
||||
'p_gains': 0.6,
|
||||
'd_gains': 0.075,
|
||||
},
|
||||
},
|
||||
'DMP': {
|
||||
'controller_kwargs': {
|
||||
'p_gains': 0.6,
|
||||
'd_gains': 0.075,
|
||||
},
|
||||
'trajectory_generator_kwargs': {
|
||||
'weights_scale': 50,
|
||||
},
|
||||
'phase_generator_kwargs': {
|
||||
'alpha_phase': 2,
|
||||
},
|
||||
},
|
||||
'ProDMP': {},
|
||||
}
|
||||
|
||||
@property
|
||||
def context_mask(self):
|
||||
return np.hstack([
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
from typing import Iterable, Union, Optional, Tuple
|
||||
from typing import Iterable, Union, Optional, Tuple, Any, Dict
|
||||
|
||||
import matplotlib.pyplot as plt
|
||||
import numpy as np
|
||||
from gym import spaces
|
||||
from gym.core import ObsType
|
||||
from gymnasium import spaces
|
||||
from gymnasium.core import ObsType
|
||||
|
||||
from fancy_gym.envs.classic_control.base_reacher.base_reacher_torque import BaseReacherTorqueEnv
|
||||
from . import MPWrapper
|
||||
|
||||
|
||||
class SimpleReacherEnv(BaseReacherTorqueEnv):
|
||||
@@ -16,8 +17,8 @@ class SimpleReacherEnv(BaseReacherTorqueEnv):
|
||||
"""
|
||||
|
||||
def __init__(self, n_links: int, target: Union[None, Iterable] = None, random_start: bool = True,
|
||||
allow_self_collision: bool = False, ):
|
||||
super().__init__(n_links, random_start, allow_self_collision)
|
||||
allow_self_collision: bool = False, **kwargs):
|
||||
super().__init__(n_links, random_start, allow_self_collision, **kwargs)
|
||||
|
||||
# provided initial parameters
|
||||
self.inital_target = target
|
||||
@@ -42,11 +43,15 @@ class SimpleReacherEnv(BaseReacherTorqueEnv):
|
||||
# def start_pos(self):
|
||||
# return self._start_pos
|
||||
|
||||
def reset(self, *, seed: Optional[int] = None, return_info: bool = False,
|
||||
options: Optional[dict] = None, ) -> Union[ObsType, Tuple[ObsType, dict]]:
|
||||
def reset(self, *, seed: Optional[int] = None, options: Optional[Dict[str, Any]] = None) \
|
||||
-> Tuple[ObsType, Dict[str, Any]]:
|
||||
# Reset twice to ensure we return obs after generating goal and generating goal after executing seeded reset.
|
||||
# (Env will not behave deterministic otherwise)
|
||||
# Yes, there is probably a more elegant solution to this problem...
|
||||
self._generate_goal()
|
||||
|
||||
return super().reset()
|
||||
super().reset(seed=seed, options=options)
|
||||
self._generate_goal()
|
||||
return super().reset(seed=seed, options=options)
|
||||
|
||||
def _get_reward(self, action: np.ndarray):
|
||||
diff = self.end_effector - self._goal
|
||||
@@ -93,7 +98,7 @@ class SimpleReacherEnv(BaseReacherTorqueEnv):
|
||||
def _check_collisions(self) -> bool:
|
||||
return self._check_self_collision()
|
||||
|
||||
def render(self, mode='human'): # pragma: no cover
|
||||
def render(self): # pragma: no cover
|
||||
if self.fig is None:
|
||||
# Create base figure once on the beginning. Afterwards only update
|
||||
plt.ion()
|
||||
@@ -127,15 +132,3 @@ class SimpleReacherEnv(BaseReacherTorqueEnv):
|
||||
|
||||
self.fig.canvas.draw()
|
||||
self.fig.canvas.flush_events()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
env = SimpleReacherEnv(5)
|
||||
env.reset()
|
||||
for i in range(200):
|
||||
ac = env.action_space.sample()
|
||||
obs, rew, done, info = env.step(ac)
|
||||
|
||||
env.render()
|
||||
if done:
|
||||
break
|
||||
|
||||
@@ -7,6 +7,26 @@ from fancy_gym.black_box.raw_interface_wrapper import RawInterfaceWrapper
|
||||
|
||||
class MPWrapper(RawInterfaceWrapper):
|
||||
|
||||
mp_config = {
|
||||
'ProMP': {
|
||||
'controller_kwargs': {
|
||||
'controller_type': 'velocity',
|
||||
},
|
||||
},
|
||||
'DMP': {
|
||||
'controller_kwargs': {
|
||||
'controller_type': 'velocity',
|
||||
},
|
||||
'trajectory_generator_kwargs': {
|
||||
'weights_scale': 50,
|
||||
},
|
||||
'phase_generator_kwargs': {
|
||||
'alpha_phase': 2,
|
||||
},
|
||||
},
|
||||
'ProDMP': {},
|
||||
}
|
||||
|
||||
@property
|
||||
def context_mask(self):
|
||||
return np.hstack([
|
||||
|
||||
@@ -1,19 +1,21 @@
|
||||
from typing import Iterable, Union, Tuple, Optional
|
||||
from typing import Iterable, Union, Tuple, Optional, Any, Dict
|
||||
|
||||
import gym
|
||||
import gymnasium as gym
|
||||
import matplotlib.pyplot as plt
|
||||
import numpy as np
|
||||
from gym.core import ObsType
|
||||
from gymnasium import spaces
|
||||
from gymnasium.core import ObsType
|
||||
|
||||
from fancy_gym.envs.classic_control.base_reacher.base_reacher_direct import BaseReacherDirectEnv
|
||||
from . import MPWrapper
|
||||
|
||||
|
||||
class ViaPointReacherEnv(BaseReacherDirectEnv):
|
||||
|
||||
def __init__(self, n_links, random_start: bool = False, via_target: Union[None, Iterable] = None,
|
||||
target: Union[None, Iterable] = None, allow_self_collision=False, collision_penalty=1000):
|
||||
target: Union[None, Iterable] = None, allow_self_collision=False, collision_penalty=1000, **kwargs):
|
||||
|
||||
super().__init__(n_links, random_start, allow_self_collision)
|
||||
super().__init__(n_links, random_start, allow_self_collision, **kwargs)
|
||||
|
||||
# provided initial parameters
|
||||
self.intitial_target = target # provided target value
|
||||
@@ -34,16 +36,21 @@ class ViaPointReacherEnv(BaseReacherDirectEnv):
|
||||
[np.inf] * 2, # x-y coordinates of target distance
|
||||
[np.inf] # env steps, because reward start after n steps
|
||||
])
|
||||
self.observation_space = gym.spaces.Box(low=-state_bound, high=state_bound, shape=state_bound.shape)
|
||||
self.observation_space = spaces.Box(low=-state_bound, high=state_bound, shape=state_bound.shape)
|
||||
|
||||
# @property
|
||||
# def start_pos(self):
|
||||
# return self._start_pos
|
||||
|
||||
def reset(self, *, seed: Optional[int] = None, return_info: bool = False,
|
||||
options: Optional[dict] = None, ) -> Union[ObsType, Tuple[ObsType, dict]]:
|
||||
def reset(self, *, seed: Optional[int] = None, options: Optional[Dict[str, Any]] = None) \
|
||||
-> Tuple[ObsType, Dict[str, Any]]:
|
||||
# Reset twice to ensure we return obs after generating goal and generating goal after executing seeded reset.
|
||||
# (Env will not behave deterministic otherwise)
|
||||
# Yes, there is probably a more elegant solution to this problem...
|
||||
self._generate_goal()
|
||||
return super().reset()
|
||||
super().reset(seed=seed, options=options)
|
||||
self._generate_goal()
|
||||
return super().reset(seed=seed, options=options)
|
||||
|
||||
def _generate_goal(self):
|
||||
# TODO: Maybe improve this later, this can yield quite a lot of invalid settings
|
||||
@@ -116,7 +123,7 @@ class ViaPointReacherEnv(BaseReacherDirectEnv):
|
||||
def _check_collisions(self) -> bool:
|
||||
return self._check_self_collision()
|
||||
|
||||
def render(self, mode='human'):
|
||||
def render(self):
|
||||
goal_pos = self._goal.T
|
||||
via_pos = self._via_point.T
|
||||
|
||||
@@ -139,7 +146,7 @@ class ViaPointReacherEnv(BaseReacherDirectEnv):
|
||||
|
||||
self.fig.gca().set_title(f"Iteration: {self._steps}, distance: {self.end_effector - self._goal}")
|
||||
|
||||
if mode == "human":
|
||||
if self.render_mode == "human":
|
||||
# goal
|
||||
if self._steps == 1:
|
||||
self.goal_point_plot.set_data(goal_pos[0], goal_pos[1])
|
||||
@@ -151,7 +158,7 @@ class ViaPointReacherEnv(BaseReacherDirectEnv):
|
||||
self.fig.canvas.draw()
|
||||
self.fig.canvas.flush_events()
|
||||
|
||||
elif mode == "partial":
|
||||
elif self.render_mode == "partial":
|
||||
if self._steps == 1:
|
||||
# fig, ax = plt.subplots()
|
||||
# Add the patch to the Axes
|
||||
@@ -171,7 +178,7 @@ class ViaPointReacherEnv(BaseReacherDirectEnv):
|
||||
plt.ylim([-1.1, lim])
|
||||
plt.pause(0.01)
|
||||
|
||||
elif mode == "final":
|
||||
elif self.render_mode == "final":
|
||||
if self._steps == 199 or self._is_collided:
|
||||
# fig, ax = plt.subplots()
|
||||
|
||||
@@ -183,16 +190,3 @@ class ViaPointReacherEnv(BaseReacherDirectEnv):
|
||||
plt.plot(self._joints[:, 0], self._joints[:, 1], 'ro-', markerfacecolor='k')
|
||||
|
||||
plt.pause(0.01)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
env = ViaPointReacherEnv(5)
|
||||
env.reset()
|
||||
|
||||
for i in range(10000):
|
||||
ac = env.action_space.sample()
|
||||
obs, rew, done, info = env.step(ac)
|
||||
env.render()
|
||||
if done:
|
||||
env.reset()
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
# Custom Mujoco tasks
|
||||
|
||||
## Step-based Environments
|
||||
|Name| Description|Horizon|Action Dimension|Observation Dimension
|
||||
|---|---|---|---|---|
|
||||
|`ALRReacher-v0`|Modified (5 links) Mujoco gym's `Reacher-v2` (2 links)| 200 | 5 | 21
|
||||
|`ALRReacherSparse-v0`|Same as `ALRReacher-v0`, but the distance penalty is only provided in the last time step.| 200 | 5 | 21
|
||||
|`ALRReacherSparseBalanced-v0`|Same as `ALRReacherSparse-v0`, but the end-effector has to remain upright.| 200 | 5 | 21
|
||||
|`ALRLongReacher-v0`|Modified (7 links) Mujoco gym's `Reacher-v2` (2 links)| 200 | 7 | 27
|
||||
|`ALRLongReacherSparse-v0`|Same as `ALRLongReacher-v0`, but the distance penalty is only provided in the last time step.| 200 | 7 | 27
|
||||
|`ALRLongReacherSparseBalanced-v0`|Same as `ALRLongReacherSparse-v0`, but the end-effector has to remain upright.| 200 | 7 | 27
|
||||
|`ALRBallInACupSimple-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
|
||||
|`ALRBallInACup-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
|
||||
|`ALRBallInACupGoal-v0`| Similar to `ALRBallInACupSimple-v0` but the ball needs to be caught at a specified goal position | 4000 | 7 | wip
|
||||
|
||||
@@ -9,3 +9,8 @@ from .reacher.reacher import ReacherEnv
|
||||
from .walker_2d_jump.walker_2d_jump import Walker2dJumpEnv
|
||||
from .box_pushing.box_pushing_env import BoxPushingDense, BoxPushingTemporalSparse, BoxPushingTemporalSpatialSparse
|
||||
from .table_tennis.table_tennis_env import TableTennisEnv, TableTennisWind, TableTennisGoalSwitching
|
||||
|
||||
try:
|
||||
from .air_hockey.air_hockey_env_wrapper import AirHockeyEnv
|
||||
except ModuleNotFoundError:
|
||||
print("[FANCY GYM] Air Hockey not available (depends on mushroom-rl, dmc, mujoco)")
|
||||
@@ -0,0 +1,26 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2022 Puze Liu, Jonas Guenster, Davide Tateo.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS," WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
---
|
||||
|
||||
This project is a derivative of [AirHockeyChallenge](https://github.com/AirHockeyChallenge/air_hockey_challenge).
|
||||
The changes are mostly focused on adapting the provided environments to fancy_gym.
|
||||
@@ -0,0 +1,202 @@
|
||||
from copy import deepcopy
|
||||
import numpy as np
|
||||
from gymnasium import spaces
|
||||
|
||||
import fancy_gym.envs.mujoco.air_hockey.constraints as constraints
|
||||
from fancy_gym.envs.mujoco.air_hockey import position_control_wrapper as position
|
||||
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", "rgb_array"], "render_fps": 50}
|
||||
|
||||
def __init__(self, env_mode=None, interpolation_order=3, render_mode=None, width=1920, height=1080, **kwargs):
|
||||
"""
|
||||
Environment Constructor
|
||||
|
||||
Args:
|
||||
env [string]:
|
||||
The string to specify the running environments. Available environments: [3dof-hit, 3dof-defend, 7dof-hit, 7dof-defend, tournament].
|
||||
interpolation_order (int, 3): Type of interpolation used, has to correspond to action shape. Order 1-5 are
|
||||
polynomial interpolation of the degree. Order -1 is linear interpolation of position and velocity.
|
||||
Set Order to None in order to turn off interpolation. In this case the action has to be a trajectory
|
||||
of position, velocity and acceleration of the shape (20, 3, n_joints)
|
||||
"""
|
||||
|
||||
env_dict = {
|
||||
"tournament": position.IiwaPositionTournament,
|
||||
|
||||
"7dof-hit": position.IiwaPositionHit,
|
||||
"7dof-defend": position.IiwaPositionDefend,
|
||||
|
||||
"3dof-hit": position.PlanarPositionHit,
|
||||
"3dof-defend": position.PlanarPositionDefend,
|
||||
|
||||
"7dof-hit-airhockit2023": position.IiwaPositionHitAirhocKIT2023,
|
||||
"7dof-defend-airhockit2023": position.IiwaPositionDefendAirhocKIT2023,
|
||||
}
|
||||
|
||||
if env_mode not in env_dict:
|
||||
raise Exception(f"Please specify one of the environments in {list(env_dict.keys())} for env_mode parameter!")
|
||||
|
||||
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
|
||||
|
||||
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:
|
||||
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))
|
||||
constraint_list.add(constraints.JointVelocityConstraint(self.env_info))
|
||||
constraint_list.add(constraints.EndEffectorConstraint(self.env_info))
|
||||
if "7dof" in self.env_name or self.env_name == "tournament":
|
||||
constraint_list.add(constraints.LinkConstraint(self.env_info))
|
||||
|
||||
self.env_info['constraints'] = constraint_list
|
||||
self.env_info['env_name'] = self.env_name
|
||||
|
||||
super().__init__(self.base_env.info)
|
||||
|
||||
def step(self, action):
|
||||
obs, reward, done, info = self.base_env.step(action)
|
||||
|
||||
if "tournament" in self.env_name:
|
||||
info["constraints_value"] = list()
|
||||
info["jerk"] = list()
|
||||
for i in range(2):
|
||||
obs_agent = obs[i * int(len(obs) / 2): (i + 1) * int(len(obs) / 2)]
|
||||
info["constraints_value"].append(deepcopy(self.env_info['constraints'].fun(
|
||||
obs_agent[self.env_info['joint_pos_ids']], obs_agent[self.env_info['joint_vel_ids']])))
|
||||
info["jerk"].append(
|
||||
self.base_env.jerk[i * self.env_info['robot']['n_joints']:(i + 1) * self.env_info['robot'][
|
||||
'n_joints']])
|
||||
|
||||
info["score"] = self.base_env.score
|
||||
info["faults"] = self.base_env.faults
|
||||
|
||||
else:
|
||||
info["constraints_value"] = deepcopy(self.env_info['constraints'].fun(obs[self.env_info['joint_pos_ids']],
|
||||
obs[self.env_info['joint_vel_ids']]))
|
||||
info["jerk"] = self.base_env.jerk
|
||||
info["success"] = self.check_success(obs)
|
||||
|
||||
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):
|
||||
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()
|
||||
if self.env_info['env_name'] == "tournament":
|
||||
obs = np.array(np.split(obs, 2))
|
||||
return obs, {}
|
||||
|
||||
def check_success(self, obs):
|
||||
puck_pos, puck_vel = self.base_env.get_puck(obs)
|
||||
|
||||
puck_pos, _ = robot_to_world(self.base_env.env_info["robot"]["base_frame"][0], translation=puck_pos)
|
||||
success = 0
|
||||
|
||||
if "hit" in self.env_name:
|
||||
if puck_pos[0] - self.base_env.env_info['table']['length'] / 2 > 0 and \
|
||||
np.abs(puck_pos[1]) - self.base_env.env_info['table']['goal_width'] / 2 < 0:
|
||||
success = 1
|
||||
|
||||
elif "defend" in self.env_name:
|
||||
if -0.8 < puck_pos[0] <= -0.2 and puck_vel[0] < 0.1:
|
||||
success = 1
|
||||
|
||||
elif "prepare" in self.env_name:
|
||||
if -0.8 < puck_pos[0] <= -0.2 and np.abs(puck_pos[1]) < 0.39105 and puck_vel[0] < 0.1:
|
||||
success = 1
|
||||
return success
|
||||
|
||||
@property
|
||||
def unwrapped(self):
|
||||
return self
|
||||
|
||||
def close(self):
|
||||
self.base_env.stop()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
env = AirHockeyEnv(env_mode="7dof-hit")
|
||||
env.reset()
|
||||
|
||||
R = 0.
|
||||
J = 0.
|
||||
gamma = 1.
|
||||
steps = 0
|
||||
while True:
|
||||
action = np.random.uniform(-1, 1, (2, env.env_info['robot']['n_joints'])) * 3
|
||||
observation, reward, done, info = env.step(action)
|
||||
env.render()
|
||||
gamma *= env.info.gamma
|
||||
J += gamma * reward
|
||||
R += reward
|
||||
steps += 1
|
||||
if done or steps > env.info.horizon:
|
||||
print("J: ", J, " R: ", R)
|
||||
R = 0.
|
||||
J = 0.
|
||||
gamma = 1.
|
||||
steps = 0
|
||||
env.reset()
|
||||
@@ -0,0 +1 @@
|
||||
from .constraints import *
|
||||
@@ -0,0 +1,212 @@
|
||||
import copy
|
||||
|
||||
import numpy as np
|
||||
|
||||
from fancy_gym.envs.mujoco.air_hockey.utils.kinematics import forward_kinematics, jacobian
|
||||
|
||||
|
||||
class Constraint:
|
||||
def __init__(self, env_info, output_dim, **kwargs):
|
||||
"""
|
||||
Constructor
|
||||
|
||||
Args
|
||||
----
|
||||
env_info: dict
|
||||
A dictionary contains information about the environment;
|
||||
output_dim: int
|
||||
The output dimension of the constraints.
|
||||
**kwargs: dict
|
||||
A dictionary contains agent related information.
|
||||
"""
|
||||
self._env_info = env_info
|
||||
self._name = None
|
||||
|
||||
self.output_dim = output_dim
|
||||
|
||||
self._fun_value = np.zeros(self.output_dim)
|
||||
self._jac_value = np.zeros((self.output_dim, 2 * env_info["robot"]["n_joints"]))
|
||||
self._q_prev = None
|
||||
self._dq_prev = None
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
"""
|
||||
The name of the constraints
|
||||
|
||||
"""
|
||||
return self._name
|
||||
|
||||
def fun(self, q, dq):
|
||||
"""
|
||||
The function of the constraint.
|
||||
|
||||
Args
|
||||
----
|
||||
q: numpy.ndarray, (num_joints,)
|
||||
The joint position of the robot
|
||||
dq: numpy.ndarray, (num_joints,)
|
||||
The joint velocity of the robot
|
||||
|
||||
Returns
|
||||
-------
|
||||
numpy.ndarray, (out_dim,):
|
||||
The value computed by the constraints function.
|
||||
"""
|
||||
if np.equal(q, self._q_prev).all() and np.equal(dq, self._dq_prev):
|
||||
return self._fun_value
|
||||
else:
|
||||
self._jacobian(q, dq)
|
||||
return self._fun(q, dq)
|
||||
|
||||
def jacobian(self, q, dq):
|
||||
"""
|
||||
Jacobian is the derivative of the constraint function w.r.t the robot joint position and velocity.
|
||||
|
||||
Args
|
||||
----
|
||||
q: ndarray, (num_joints,)
|
||||
The joint position of the robot
|
||||
dq: ndarray, (num_joints,)
|
||||
The joint velocity of the robot
|
||||
|
||||
Returns
|
||||
-------
|
||||
numpy.ndarray, (dim_output, num_joints * 2):
|
||||
The flattened jacobian of the constraint function J = [dc / dq, dc / dq_dot]
|
||||
|
||||
"""
|
||||
if np.equal(q, self._q_prev).all() and np.equal(dq, self._dq_prev):
|
||||
return self._fun_value
|
||||
else:
|
||||
self._fun(q, dq)
|
||||
return self._jacobian(q, dq)
|
||||
|
||||
def _fun(self, q, dq):
|
||||
raise NotImplementedError
|
||||
|
||||
def _jacobian(self, q, dq):
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
class ConstraintList:
|
||||
def __init__(self):
|
||||
self.constraints = dict()
|
||||
|
||||
def keys(self):
|
||||
return self.constraints.keys()
|
||||
|
||||
def get(self, key):
|
||||
return self.constraints.get(key)
|
||||
|
||||
def add(self, c):
|
||||
self.constraints.update({c.name: c})
|
||||
|
||||
def delete(self, name):
|
||||
del self.constraints[name]
|
||||
|
||||
def fun(self, q, dq):
|
||||
return {key: self.constraints[key].fun(q, dq) for key in self.constraints}
|
||||
|
||||
def jacobian(self, q, dq):
|
||||
return {key: self.constraints[key].jacobian(q, dq) for key in self.constraints}
|
||||
|
||||
|
||||
class JointPositionConstraint(Constraint):
|
||||
def __init__(self, env_info, **kwargs):
|
||||
super().__init__(env_info, output_dim=2 * env_info["robot"]["n_joints"], **kwargs)
|
||||
self.joint_limits = self._env_info['robot']['joint_pos_limit'] * 0.95
|
||||
self._name = 'joint_pos_constr'
|
||||
|
||||
def _fun(self, q, dq):
|
||||
self._fun_value[:int(self.output_dim / 2)] = q - self.joint_limits[1]
|
||||
self._fun_value[int(self.output_dim / 2):] = self.joint_limits[0] - q
|
||||
return self._fun_value
|
||||
|
||||
def _jacobian(self, q, dq):
|
||||
self._jac_value[:int(self.output_dim / 2), :int(self.output_dim / 2)] = np.eye(
|
||||
self._env_info['robot']['n_joints'])
|
||||
self._jac_value[int(self.output_dim / 2):, :int(self.output_dim / 2)] = -np.eye(
|
||||
self._env_info['robot']['n_joints'])
|
||||
return self._jac_value
|
||||
|
||||
|
||||
class JointVelocityConstraint(Constraint):
|
||||
def __init__(self, env_info, **kwargs):
|
||||
super().__init__(env_info, output_dim=2 * env_info["robot"]["n_joints"], **kwargs)
|
||||
self.joint_limits = self._env_info['robot']['joint_vel_limit'] * 0.95
|
||||
self._name = 'joint_vel_constr'
|
||||
|
||||
def _fun(self, q, dq):
|
||||
self._fun_value[:int(self.output_dim / 2)] = dq - self.joint_limits[1]
|
||||
self._fun_value[int(self.output_dim / 2):] = self.joint_limits[0] - dq
|
||||
return self._fun_value
|
||||
|
||||
def _jacobian(self, q, dq):
|
||||
self._jac_value[:int(self.output_dim / 2), int(self.output_dim / 2):] = np.eye(
|
||||
self._env_info['robot']['n_joints'])
|
||||
self._jac_value[int(self.output_dim / 2):, int(self.output_dim / 2):] = -np.eye(
|
||||
self._env_info['robot']['n_joints'])
|
||||
return self._jac_value
|
||||
|
||||
|
||||
class EndEffectorConstraint(Constraint):
|
||||
def __init__(self, env_info, **kwargs):
|
||||
# 1 Dimension on x direction: x > x_lb
|
||||
# 2 Dimension on y direction: y > y_lb, y < y_ub
|
||||
# 2 Dimension on z direction: z > z_lb, z < z_ub
|
||||
super().__init__(env_info, output_dim=5, **kwargs)
|
||||
self._name = "ee_constr"
|
||||
tolerance = 0.02
|
||||
|
||||
self.robot_model = copy.deepcopy(self._env_info['robot']['robot_model'])
|
||||
self.robot_data = copy.deepcopy(self._env_info['robot']['robot_data'])
|
||||
|
||||
self.x_lb = - self._env_info['robot']['base_frame'][0][0, 3] - (
|
||||
self._env_info['table']['length'] / 2 - self._env_info['mallet']['radius'])
|
||||
self.y_lb = - (self._env_info['table']['width'] / 2 - self._env_info['mallet']['radius'])
|
||||
self.y_ub = (self._env_info['table']['width'] / 2 - self._env_info['mallet']['radius'])
|
||||
self.z_lb = self._env_info['robot']['ee_desired_height'] - tolerance
|
||||
self.z_ub = self._env_info['robot']['ee_desired_height'] + tolerance
|
||||
|
||||
def _fun(self, q, dq):
|
||||
ee_pos, _ = forward_kinematics(self.robot_model, self.robot_data, q)
|
||||
self._fun_value = np.array([-ee_pos[0] + self.x_lb,
|
||||
-ee_pos[1] + self.y_lb, ee_pos[1] - self.y_ub,
|
||||
-ee_pos[2] + self.z_lb, ee_pos[2] - self.z_ub])
|
||||
return self._fun_value
|
||||
|
||||
def _jacobian(self, q, dq):
|
||||
jac = jacobian(self.robot_model, self.robot_data, q)
|
||||
dc_dx = np.array([[-1, 0., 0.], [0., -1., 0.], [0., 1., 0.], [0., 0., -1.], [0., 0., 1.]])
|
||||
self._jac_value[:, :self._env_info['robot']['n_joints']] = dc_dx @ jac[:3, :self._env_info['robot']['n_joints']]
|
||||
return self._jac_value
|
||||
|
||||
|
||||
class LinkConstraint(Constraint):
|
||||
def __init__(self, env_info, **kwargs):
|
||||
# 1 Dimension: wrist_z > minimum_height
|
||||
# 2 Dimension: elbow_z > minimum_height
|
||||
super().__init__(env_info, output_dim=2, **kwargs)
|
||||
self._name = "link_constr"
|
||||
|
||||
self.robot_model = copy.deepcopy(self._env_info['robot']['robot_model'])
|
||||
self.robot_data = copy.deepcopy(self._env_info['robot']['robot_data'])
|
||||
|
||||
self.z_lb = 0.25
|
||||
|
||||
def _fun(self, q, dq):
|
||||
wrist_pos, _ = forward_kinematics(self.robot_model, self.robot_data, q, link="7")
|
||||
elbow_pos, _ = forward_kinematics(self.robot_model, self.robot_data, q, link="4")
|
||||
self._fun_value = np.array([-wrist_pos[2] + self.z_lb,
|
||||
-elbow_pos[2] + self.z_lb])
|
||||
return self._fun_value
|
||||
|
||||
def _jacobian(self, q, dq):
|
||||
jac_wrist = jacobian(self.robot_model, self.robot_data, q, link="7")
|
||||
jac_elbow = jacobian(self.robot_model, self.robot_data, q, link="4")
|
||||
self._jac_value[:, :self._env_info['robot']['n_joints']] = np.vstack([
|
||||
-jac_wrist[2, :self._env_info['robot']['n_joints']],
|
||||
-jac_elbow[2, :self._env_info['robot']['n_joints']],
|
||||
])
|
||||
return self._jac_value
|
||||
@@ -0,0 +1,58 @@
|
||||
<mujoco model="AirHockeySingle">
|
||||
<include file="iiwa1.xml"/>
|
||||
|
||||
<include file="iiwa2.xml"/>
|
||||
|
||||
<include file="../table.xml"/>
|
||||
|
||||
<contact>
|
||||
<exclude body1="table_surface" body2="iiwa_1/base"/>
|
||||
<exclude body1="table_surface" body2="iiwa_1/link_1"/>
|
||||
<exclude body1="table_surface" body2="iiwa_1/link_2"/>
|
||||
<exclude body1="table_surface" body2="iiwa_1/link_3"/>
|
||||
<exclude body1="table_surface" body2="iiwa_1/link_4"/>
|
||||
<exclude body1="table_surface" body2="iiwa_1/link_5"/>
|
||||
<exclude body1="table_surface" body2="iiwa_1/link_6"/>
|
||||
<exclude body1="table_surface" body2="iiwa_1/link_7"/>
|
||||
<exclude body1="table_surface" body2="iiwa_1/striker_joint_link"/>
|
||||
<exclude body1="table_surface" body2="iiwa_1/striker_mallet"/>
|
||||
|
||||
<exclude body1="rim" body2="iiwa_1/base"/>
|
||||
<exclude body1="rim" body2="iiwa_1/link_1"/>
|
||||
<exclude body1="rim" body2="iiwa_1/link_2"/>
|
||||
<exclude body1="rim" body2="iiwa_1/link_3"/>
|
||||
<exclude body1="rim" body2="iiwa_1/link_4"/>
|
||||
<exclude body1="rim" body2="iiwa_1/link_5"/>
|
||||
<exclude body1="rim" body2="iiwa_1/link_6"/>
|
||||
<exclude body1="rim" body2="iiwa_1/link_7"/>
|
||||
<exclude body1="rim" body2="iiwa_1/striker_joint_link"/>
|
||||
<exclude body1="rim" body2="iiwa_1/striker_mallet"/>
|
||||
|
||||
<exclude body1="world" body2="iiwa_1/striker_mallet"/>
|
||||
|
||||
<exclude body1="table_surface" body2="iiwa_2/base"/>
|
||||
<exclude body1="table_surface" body2="iiwa_2/link_1"/>
|
||||
<exclude body1="table_surface" body2="iiwa_2/link_2"/>
|
||||
<exclude body1="table_surface" body2="iiwa_2/link_3"/>
|
||||
<exclude body1="table_surface" body2="iiwa_2/link_4"/>
|
||||
<exclude body1="table_surface" body2="iiwa_2/link_5"/>
|
||||
<exclude body1="table_surface" body2="iiwa_2/link_6"/>
|
||||
<exclude body1="table_surface" body2="iiwa_2/link_7"/>
|
||||
<exclude body1="table_surface" body2="iiwa_2/striker_joint_link"/>
|
||||
<exclude body1="table_surface" body2="iiwa_2/striker_mallet"/>
|
||||
|
||||
<exclude body1="rim" body2="iiwa_2/base"/>
|
||||
<exclude body1="rim" body2="iiwa_2/link_1"/>
|
||||
<exclude body1="rim" body2="iiwa_2/link_2"/>
|
||||
<exclude body1="rim" body2="iiwa_2/link_3"/>
|
||||
<exclude body1="rim" body2="iiwa_2/link_4"/>
|
||||
<exclude body1="rim" body2="iiwa_2/link_5"/>
|
||||
<exclude body1="rim" body2="iiwa_2/link_6"/>
|
||||
<exclude body1="rim" body2="iiwa_2/link_7"/>
|
||||
<exclude body1="rim" body2="iiwa_2/striker_joint_link"/>
|
||||
<exclude body1="rim" body2="iiwa_2/striker_mallet"/>
|
||||
|
||||
<exclude body1="world" body2="iiwa_2/striker_mallet"/>
|
||||
</contact>
|
||||
|
||||
</mujoco>
|
||||
@@ -0,0 +1,108 @@
|
||||
<mujoco model="iiwa_1">
|
||||
<compiler angle="radian" autolimits="true" meshdir="assets"/>
|
||||
|
||||
<default>
|
||||
<default class="vis">
|
||||
<geom contype="0" conaffinity="0"/>
|
||||
</default>
|
||||
<default class="robot">
|
||||
<geom condim="4" solref="0.02 0.3" priority="2"/>
|
||||
</default>
|
||||
</default>
|
||||
<asset>
|
||||
<mesh name="link_0" file="link_0.stl"/>
|
||||
<mesh name="link_1" file="link_1.stl"/>
|
||||
<mesh name="link_2" file="link_2.stl"/>
|
||||
<mesh name="link_3" file="link_3.stl"/>
|
||||
<mesh name="link_4" file="link_4.stl"/>
|
||||
<mesh name="link_5" file="link_5.stl"/>
|
||||
<mesh name="link_6" file="link_6.stl"/>
|
||||
<mesh name="link_7" file="link_7.stl"/>
|
||||
<mesh name="EE_arm" file="EE_arm.stl"/>
|
||||
<mesh name="EE_mallet_foam" file="EE_mallet_foam.stl"/>
|
||||
</asset>
|
||||
<worldbody>
|
||||
<body name="iiwa_1/base" pos="-1.51 0 -0.1">
|
||||
<geom type="mesh" rgba="0.4 0.4 0.4 1" mesh="link_0" class="vis"/>
|
||||
<body name="iiwa_1/link_1" pos="0 0 0.1575">
|
||||
<inertial pos="4.007709e-06 -0.033936 0.122467" mass="8.240527"
|
||||
fullinertia="0.021981 0.022182 0.008234 -2.897243e-07 6.3165236e-07 0.003285"/>
|
||||
<joint name="iiwa_1/joint_1" pos="0 0 0" axis="0 0 1" range="-2.96706 2.96706" damping="0.33032"
|
||||
frictionloss="0.384477"/>
|
||||
<geom type="mesh" rgba="1 0.423529 0.0392157 1" mesh="link_1" class="vis"/>
|
||||
<body name="iiwa_1/link_2" pos="0 0 0.2025" quat="0 0 0.707107 0.707107">
|
||||
<inertial pos="0.003402 0.034792 0.046725" mass="6.357896"
|
||||
fullinertia="0.015565 0.005180 0.015484 -4.147301e-06 1.192255e-05 0.002538"/>
|
||||
<joint name="iiwa_1/joint_2" pos="0 0 0" axis="0 0 1" range="-2.0944 2.0944" damping="0.21216"
|
||||
frictionloss="0.496333"/>
|
||||
<geom type="mesh" rgba="1 0.423529 0.0392157 1" mesh="link_2" class="vis"/>
|
||||
<body name="iiwa_1/link_3" pos="0 0.2045 0" quat="0 0 0.707107 0.707107">
|
||||
<inertial pos="-0.001452 0.031526 0.133584" mass="4.042756"
|
||||
fullinertia="0.010914 0.010381 0.003139 -3.540575e-06 -9.059062e-06 -0.002128"/>
|
||||
<joint name="iiwa_1/joint_3" pos="0 0 0" axis="0 0 1" range="-2.96706 2.96706" damping="0.1"
|
||||
frictionloss="0.173951"/>
|
||||
<geom type="mesh" rgba="1 0.423529 0.0392157 1" mesh="link_3" class="vis"/>
|
||||
<body name="iiwa_1/link_4" pos="0 0 0.2155" quat="0.707107 0.707107 0 0">
|
||||
<inertial pos="-0.002527 0.053508 0.037205" mass="3.642249"
|
||||
fullinertia="0.007536 0.002538 0.007206 -5.707028e-06 2.781894e-06 0.001256"/>
|
||||
<joint name="iiwa_1/joint_4" pos="0 0 0" axis="0 0 1" range="-2.0944 2.0944"
|
||||
damping="0.219041" frictionloss="0.3751"/>
|
||||
<geom type="mesh" rgba="1 0.423529 0.0392157 1" mesh="link_4" class="vis"/>
|
||||
<body name="iiwa_1/link_5" pos="0 0.1845 0" quat="0 0 0.707107 0.707107">
|
||||
<inertial pos="0.001855 0.024573 0.080131" mass="2.580896"
|
||||
fullinertia="0.005201 0.004488 0.002242 1.089316e-07 9.035623e-07 -0.001613"/>
|
||||
<joint name="iiwa_1/joint_5" pos="0 0 0" axis="0 0 1" range="-2.96706 2.96706"
|
||||
damping="0.185923" frictionloss="0.481099"/>
|
||||
<geom type="mesh" rgba="1 0.423529 0.0392157 1" mesh="link_5" class="vis"/>
|
||||
<body name="iiwa_1/link_6" pos="0 0 0.2155" quat="0.707107 0.707107 0 0">
|
||||
<inertial pos="-0.001739 -0.001973 -0.002502" mass="2.760564"
|
||||
fullinertia="0.002534 0.001821 0.002393 -1.311766e-06 9.508242e-07 0.000134"/>
|
||||
<joint name="iiwa_1/joint_6" pos="0 0 0" axis="0 0 1" range="-2.0944 2.0944"
|
||||
damping="0.1" frictionloss="0.196149"/>
|
||||
<geom type="mesh" rgba="1 0.423529 0.0392157 1" mesh="link_6" class="vis"/>
|
||||
<body name="iiwa_1/link_7" pos="0 0.081 0" quat="0 0 0.707107 0.707107">
|
||||
<inertial pos="0.000735 0.000387 0.026460" mass="1.285417"
|
||||
fullinertia="0.000151 0.000150 0.000187 -7.223100e-08 2.038333e-06 -3.396830e-07"/>
|
||||
<joint name="iiwa_1/joint_7" pos="0 0 0" axis="0 0 1" range="-3.05433 3.05433"
|
||||
damping="0.1" frictionloss="0.299238" armature="0.01"/>
|
||||
<geom type="mesh" rgba="0.4 0.4 0.4 1" mesh="link_7" class="vis"/>
|
||||
<geom pos="0 0 0.07" type="mesh" rgba="0.3 0.3 0.3 1" mesh="EE_arm"
|
||||
class="vis"/>
|
||||
<body name="iiwa_1/striker_joint_link" pos="0 0 0.585">
|
||||
<inertial pos="0 0 0" mass="0.1" diaginertia="0.001 0.001 0.001"/>
|
||||
<body name="iiwa_1/striker_mallet" pos="0 0 0">
|
||||
<inertial pos="0 0 0.0682827" mass="0.283"
|
||||
diaginertia="0.005 0.005 0.005"/>
|
||||
<joint name="iiwa_1/striker_joint_1" pos="0 0 0" axis="0 1 0"
|
||||
range="-1.5708 1.5708" damping="0.0"/>
|
||||
<joint name="iiwa_1/striker_joint_2" pos="0 0 0" axis="1 0 0"
|
||||
range="-1.5708 1.5708" damping="0.0"/>
|
||||
<geom type="mesh" rgba="0.3 0.3 0.3 1" mesh="EE_mallet_foam"
|
||||
class="vis"/>
|
||||
<geom name="iiwa_1/ee" type="cylinder" rgba="0.3 0.3 0.3 0.1"
|
||||
size="0.04815 0.03" pos="0 0 0.0505" friction="0 0 0"/>
|
||||
</body>
|
||||
</body>
|
||||
</body>
|
||||
</body>
|
||||
</body>
|
||||
</body>
|
||||
</body>
|
||||
</body>
|
||||
</body>
|
||||
</body>
|
||||
</worldbody>
|
||||
|
||||
|
||||
<actuator>
|
||||
<motor name="iiwa_1/joint_1" joint="iiwa_1/joint_1" ctrlrange="-320 320"/>
|
||||
<motor name="iiwa_1/joint_2" joint="iiwa_1/joint_2" ctrlrange="-320 320"/>
|
||||
<motor name="iiwa_1/joint_3" joint="iiwa_1/joint_3" ctrlrange="-176 176"/>
|
||||
<motor name="iiwa_1/joint_4" joint="iiwa_1/joint_4" ctrlrange="-176 176"/>
|
||||
<motor name="iiwa_1/joint_5" joint="iiwa_1/joint_5" ctrlrange="-110 110"/>
|
||||
<motor name="iiwa_1/joint_6" joint="iiwa_1/joint_6" ctrlrange="-40 40"/>
|
||||
<motor name="iiwa_1/joint_7" joint="iiwa_1/joint_7" ctrlrange="-40 40"/>
|
||||
<motor name="iiwa_1/striker_joint_1" joint="iiwa_1/striker_joint_1" ctrlrange="-10 10"/>
|
||||
<motor name="iiwa_1/striker_joint_2" joint="iiwa_1/striker_joint_2" ctrlrange="-10 10"/>
|
||||
</actuator>
|
||||
</mujoco>
|
||||
@@ -0,0 +1,89 @@
|
||||
<mujoco model="iiwa_2">
|
||||
<compiler angle="radian" autolimits="true" meshdir="assets"/>
|
||||
|
||||
<worldbody>
|
||||
<body name="iiwa_2/base" pos="1.51 0 -0.1" quat="0 0 0 1">
|
||||
<geom type="mesh" rgba="0.4 0.4 0.4 1" mesh="link_0" class="vis"/>
|
||||
<body name="iiwa_2/link_1" pos="0 0 0.1575">
|
||||
<inertial pos="4.007709e-06 -0.033936 0.122467" mass="8.240527"
|
||||
fullinertia="0.021981 0.022182 0.008234 -2.897243e-07 6.3165236e-07 0.003285"/>
|
||||
<joint name="iiwa_2/joint_1" pos="0 0 0" axis="0 0 1" range="-2.96706 2.96706" damping="0.33032"
|
||||
frictionloss="0.384477"/>
|
||||
<geom type="mesh" rgba="1 0.423529 0.0392157 1" mesh="link_1" class="vis"/>
|
||||
<body name="iiwa_2/link_2" pos="0 0 0.2025" quat="0 0 0.707107 0.707107">
|
||||
<inertial pos="0.003402 0.034792 0.046725" mass="6.357896"
|
||||
fullinertia="0.015565 0.005180 0.015484 -4.147301e-06 1.192255e-05 0.002538"/>
|
||||
<joint name="iiwa_2/joint_2" pos="0 0 0" axis="0 0 1" range="-2.0944 2.0944" damping="0.21216"
|
||||
frictionloss="0.496333"/>
|
||||
<geom type="mesh" rgba="1 0.423529 0.0392157 1" mesh="link_2" class="vis"/>
|
||||
<body name="iiwa_2/link_3" pos="0 0.2045 0" quat="0 0 0.707107 0.707107">
|
||||
<inertial pos="-0.001452 0.031526 0.133584" mass="4.042756"
|
||||
fullinertia="0.010914 0.010381 0.003139 -3.540575e-06 -9.059062e-06 -0.002128"/>
|
||||
<joint name="iiwa_2/joint_3" pos="0 0 0" axis="0 0 1" range="-2.96706 2.96706" damping="0.1"
|
||||
frictionloss="0.173951"/>
|
||||
<geom type="mesh" rgba="1 0.423529 0.0392157 1" mesh="link_3" class="vis"/>
|
||||
<body name="iiwa_2/link_4" pos="0 0 0.2155" quat="0.707107 0.707107 0 0">
|
||||
<inertial pos="-0.002527 0.053508 0.037205" mass="3.642249"
|
||||
fullinertia="0.007536 0.002538 0.007206 -5.707028e-06 2.781894e-06 0.001256"/>
|
||||
<joint name="iiwa_2/joint_4" pos="0 0 0" axis="0 0 1" range="-2.0944 2.0944"
|
||||
damping="0.219041" frictionloss="0.3751"/>
|
||||
<geom type="mesh" rgba="1 0.423529 0.0392157 1" mesh="link_4" class="vis"/>
|
||||
<body name="iiwa_2/link_5" pos="0 0.1845 0" quat="0 0 0.707107 0.707107">
|
||||
<inertial pos="0.001855 0.024573 0.080131" mass="2.580896"
|
||||
fullinertia="0.005201 0.004488 0.002242 1.089316e-07 9.035623e-07 -0.001613"/>
|
||||
<joint name="iiwa_2/joint_5" pos="0 0 0" axis="0 0 1" range="-2.96706 2.96706"
|
||||
damping="0.185923" frictionloss="0.481099"/>
|
||||
<geom type="mesh" rgba="1 0.423529 0.0392157 1" mesh="link_5" class="vis"/>
|
||||
<body name="iiwa_2/link_6" pos="0 0 0.2155" quat="0.707107 0.707107 0 0">
|
||||
<inertial pos="-0.001739 -0.001973 -0.002502" mass="2.760564"
|
||||
fullinertia="0.002534 0.001821 0.002393 -1.311766e-06 9.508242e-07 0.000134"/>
|
||||
<joint name="iiwa_2/joint_6" pos="0 0 0" axis="0 0 1" range="-2.0944 2.0944"
|
||||
damping="0.1" frictionloss="0.196149"/>
|
||||
<geom type="mesh" rgba="1 0.423529 0.0392157 1" mesh="link_6" class="vis"/>
|
||||
<body name="iiwa_2/link_7" pos="0 0.081 0" quat="0 0 0.707107 0.707107">
|
||||
<inertial pos="0.000735 0.000387 0.026460" mass="1.285417"
|
||||
fullinertia="0.000151 0.000150 0.000187 -7.223100e-08 2.038333e-06 -3.396830e-07"/>
|
||||
<joint name="iiwa_2/joint_7" pos="0 0 0" axis="0 0 1" range="-3.05433 3.05433"
|
||||
damping="0.1" frictionloss="0.299238" armature="0.01"/>
|
||||
<geom type="mesh" rgba="0.4 0.4 0.4 1" mesh="link_7" class="vis"/>
|
||||
<geom pos="0 0 0.07" type="mesh" rgba="0.3 0.3 0.3 1" mesh="EE_arm"
|
||||
class="vis"/>
|
||||
<body name="iiwa_2/striker_joint_link" pos="0 0 0.585">
|
||||
<inertial pos="0 0 0" mass="0.1" diaginertia="0.001 0.001 0.001"/>
|
||||
<body name="iiwa_2/striker_mallet" pos="0 0 0">
|
||||
<inertial pos="0 0 0.0682827" mass="0.283"
|
||||
diaginertia="0.005 0.005 0.005"/>
|
||||
<joint name="iiwa_2/striker_joint_1" pos="0 0 0" axis="0 1 0"
|
||||
range="-1.5708 1.5708" damping="0.0"/>
|
||||
<joint name="iiwa_2/striker_joint_2" pos="0 0 0" axis="1 0 0"
|
||||
range="-1.5708 1.5708" damping="0.0"/>
|
||||
<geom type="mesh" rgba="0.3 0.3 0.3 1" mesh="EE_mallet_foam"
|
||||
class="vis"/>
|
||||
<geom name="iiwa_2/ee" type="cylinder" rgba="0.3 0.3 0.3 0.1"
|
||||
size="0.04815 0.03" pos="0 0 0.0505" friction="0 0 0"/>
|
||||
</body>
|
||||
</body>
|
||||
</body>
|
||||
</body>
|
||||
</body>
|
||||
</body>
|
||||
</body>
|
||||
</body>
|
||||
</body>
|
||||
</body>
|
||||
</worldbody>
|
||||
|
||||
|
||||
<actuator>
|
||||
<motor name="iiwa_2/joint_1" joint="iiwa_2/joint_1" ctrlrange="-320 320"/>
|
||||
<motor name="iiwa_2/joint_2" joint="iiwa_2/joint_2" ctrlrange="-320 320"/>
|
||||
<motor name="iiwa_2/joint_3" joint="iiwa_2/joint_3" ctrlrange="-176 176"/>
|
||||
<motor name="iiwa_2/joint_4" joint="iiwa_2/joint_4" ctrlrange="-176 176"/>
|
||||
<motor name="iiwa_2/joint_5" joint="iiwa_2/joint_5" ctrlrange="-110 110"/>
|
||||
<motor name="iiwa_2/joint_6" joint="iiwa_2/joint_6" ctrlrange="-40 40"/>
|
||||
<motor name="iiwa_2/joint_7" joint="iiwa_2/joint_7" ctrlrange="-40 40"/>
|
||||
<motor name="iiwa_2/striker_joint_1" joint="iiwa_2/striker_joint_1" ctrlrange="-10 10"/>
|
||||
<motor name="iiwa_2/striker_joint_2" joint="iiwa_2/striker_joint_2" ctrlrange="-10 10"/>
|
||||
</actuator>
|
||||
|
||||
</mujoco>
|
||||
@@ -0,0 +1,94 @@
|
||||
<mujoco model="iiwa_1">
|
||||
<compiler angle="radian" autolimits="true" meshdir="assets"/>
|
||||
|
||||
<default>
|
||||
<default class="vis">
|
||||
<geom contype="0" conaffinity="0"/>
|
||||
</default>
|
||||
<default class="robot">
|
||||
<geom condim="4" solref="0.02 0.3" priority="2"/>
|
||||
</default>
|
||||
</default>
|
||||
<asset>
|
||||
<mesh name="link_0" file="link_0.stl"/>
|
||||
<mesh name="link_1" file="link_1.stl"/>
|
||||
<mesh name="link_2" file="link_2.stl"/>
|
||||
<mesh name="link_3" file="link_3.stl"/>
|
||||
<mesh name="link_4" file="link_4.stl"/>
|
||||
<mesh name="link_5" file="link_5.stl"/>
|
||||
<mesh name="link_6" file="link_6.stl"/>
|
||||
<mesh name="link_7" file="link_7.stl"/>
|
||||
<mesh name="EE_arm" file="EE_arm.stl"/>
|
||||
<mesh name="EE_mallet_foam" file="EE_mallet_foam.stl"/>
|
||||
</asset>
|
||||
<worldbody>
|
||||
<body name="iiwa_1/base" pos="0.0 0 0.0">
|
||||
<geom type="mesh" rgba="0.4 0.4 0.4 1" mesh="link_0" class="vis"/>
|
||||
<body name="iiwa_1/link_1" pos="0 0 0.1575">
|
||||
<inertial pos="4.007709e-06 -0.033936 0.122467" mass="8.240527"
|
||||
fullinertia="0.021981 0.022182 0.008234 -2.897243e-07 6.3165236e-07 0.003285"/>
|
||||
<joint name="iiwa_1/joint_1" pos="0 0 0" axis="0 0 1" range="-2.96706 2.96706" damping="0.33032"
|
||||
frictionloss="0.384477"/>
|
||||
<geom type="mesh" rgba="1 0.423529 0.0392157 1" mesh="link_1" class="vis"/>
|
||||
<body name="iiwa_1/link_2" pos="0 0 0.2025" quat="0 0 0.707107 0.707107">
|
||||
<inertial pos="0.003402 0.034792 0.046725" mass="6.357896"
|
||||
fullinertia="0.015565 0.005180 0.015484 -4.147301e-06 1.192255e-05 0.002538"/>
|
||||
<joint name="iiwa_1/joint_2" pos="0 0 0" axis="0 0 1" range="-2.0944 2.0944" damping="0.21216"
|
||||
frictionloss="0.496333"/>
|
||||
<geom type="mesh" rgba="1 0.423529 0.0392157 1" mesh="link_2" class="vis"/>
|
||||
<body name="iiwa_1/link_3" pos="0 0.2045 0" quat="0 0 0.707107 0.707107">
|
||||
<inertial pos="-0.001452 0.031526 0.133584" mass="4.042756"
|
||||
fullinertia="0.010914 0.010381 0.003139 -3.540575e-06 -9.059062e-06 -0.002128"/>
|
||||
<joint name="iiwa_1/joint_3" pos="0 0 0" axis="0 0 1" range="-2.96706 2.96706" damping="0.1"
|
||||
frictionloss="0.173951"/>
|
||||
<geom type="mesh" rgba="1 0.423529 0.0392157 1" mesh="link_3" class="vis"/>
|
||||
<body name="iiwa_1/link_4" pos="0 0 0.2155" quat="0.707107 0.707107 0 0">
|
||||
<inertial pos="-0.002527 0.053508 0.037205" mass="3.642249"
|
||||
fullinertia="0.007536 0.002538 0.007206 -5.707028e-06 2.781894e-06 0.001256"/>
|
||||
<joint name="iiwa_1/joint_4" pos="0 0 0" axis="0 0 1" range="-2.0944 2.0944"
|
||||
damping="0.219041" frictionloss="0.3751"/>
|
||||
<geom type="mesh" rgba="1 0.423529 0.0392157 1" mesh="link_4" class="vis"/>
|
||||
<body name="iiwa_1/link_5" pos="0 0.1845 0" quat="0 0 0.707107 0.707107">
|
||||
<inertial pos="0.001855 0.024573 0.080131" mass="2.580896"
|
||||
fullinertia="0.005201 0.004488 0.002242 1.089316e-07 9.035623e-07 -0.001613"/>
|
||||
<joint name="iiwa_1/joint_5" pos="0 0 0" axis="0 0 1" range="-2.96706 2.96706"
|
||||
damping="0.185923" frictionloss="0.481099"/>
|
||||
<geom type="mesh" rgba="1 0.423529 0.0392157 1" mesh="link_5" class="vis"/>
|
||||
<body name="iiwa_1/link_6" pos="0 0 0.2155" quat="0.707107 0.707107 0 0">
|
||||
<inertial pos="-0.001739 -0.001973 -0.002502" mass="2.760564"
|
||||
fullinertia="0.002534 0.001821 0.002393 -1.311766e-06 9.508242e-07 0.000134"/>
|
||||
<joint name="iiwa_1/joint_6" pos="0 0 0" axis="0 0 1" range="-2.0944 2.0944"
|
||||
damping="0.1" frictionloss="0.196149"/>
|
||||
<geom type="mesh" rgba="1 0.423529 0.0392157 1" mesh="link_6" class="vis"/>
|
||||
<body name="iiwa_1/link_7" pos="0 0.081 0" quat="0 0 0.707107 0.707107">
|
||||
<inertial pos="0.000735 0.000387 0.026460" mass="1.285417"
|
||||
fullinertia="0.000151 0.000150 0.000187 -7.223100e-08 2.038333e-06 -3.396830e-07"/>
|
||||
<joint name="iiwa_1/joint_7" pos="0 0 0" axis="0 0 1" range="-3.05433 3.05433"
|
||||
damping="0.1" frictionloss="0.299238" armature="0.01"/>
|
||||
<geom type="mesh" rgba="0.4 0.4 0.4 1" mesh="link_7" class="vis"/>
|
||||
<geom pos="0 0 0.07" type="mesh" rgba="0.3 0.3 0.3 1" mesh="EE_arm"
|
||||
class="vis"/>
|
||||
<body name="iiwa_1/striker_joint_link" pos="0 0 0.585">
|
||||
<inertial pos="0 0 0" mass="0.1" diaginertia="0.001 0.001 0.001"/>
|
||||
</body>
|
||||
</body>
|
||||
</body>
|
||||
</body>
|
||||
</body>
|
||||
</body>
|
||||
</body>
|
||||
</body>
|
||||
</body>
|
||||
</worldbody>
|
||||
|
||||
|
||||
<actuator>
|
||||
<motor name="iiwa_1/joint_1" joint="iiwa_1/joint_1" ctrlrange="-320 320"/>
|
||||
<motor name="iiwa_1/joint_2" joint="iiwa_1/joint_2" ctrlrange="-320 320"/>
|
||||
<motor name="iiwa_1/joint_3" joint="iiwa_1/joint_3" ctrlrange="-176 176"/>
|
||||
<motor name="iiwa_1/joint_4" joint="iiwa_1/joint_4" ctrlrange="-176 176"/>
|
||||
<motor name="iiwa_1/joint_5" joint="iiwa_1/joint_5" ctrlrange="-110 110"/>
|
||||
<motor name="iiwa_1/joint_6" joint="iiwa_1/joint_6" ctrlrange="-40 40"/>
|
||||
<motor name="iiwa_1/joint_7" joint="iiwa_1/joint_7" ctrlrange="-40 40"/>
|
||||
</actuator>
|
||||
</mujoco>
|
||||