Fxxkrobotics commited on
Commit
a15d286
·
verified ·
1 Parent(s): 8b828f6

Add files using upload-large-folder tool

Browse files
Files changed (50) hide show
  1. .claude/settings.json +7 -0
  2. .gitignore +128 -0
  3. .pre-commit-config.yaml +11 -0
  4. AUTHORS +36 -0
  5. CONTRIBUTING.md +47 -0
  6. LICENSE +28 -0
  7. MANIFEST.in +4 -0
  8. README.md +51 -0
  9. collect.sh +13 -0
  10. docs/.gitignore +1 -0
  11. docs/Makefile +23 -0
  12. docs/acknowledgement.md +14 -0
  13. docs/basicusage.md +39 -0
  14. docs/changelog.md +74 -0
  15. docs/conf.py +205 -0
  16. docs/demos.md +230 -0
  17. docs/index.rst +84 -0
  18. docs/installation.md +92 -0
  19. docs/overview.md +35 -0
  20. docs/references.md +4 -0
  21. docs/simulation/controller.rst +210 -0
  22. docs/simulation/device.rst +55 -0
  23. docs/simulation/environment.rst +50 -0
  24. docs/simulation/robot.rst +137 -0
  25. docs/source/robosuite.controllers.composite.rst +29 -0
  26. docs/source/robosuite.controllers.parts.arm.rst +29 -0
  27. docs/source/robosuite.controllers.parts.generic.rst +37 -0
  28. docs/source/robosuite.controllers.parts.mobile_base.rst +29 -0
  29. docs/source/robosuite.devices.rst +53 -0
  30. docs/source/robosuite.environments.manipulation.rst +117 -0
  31. docs/source/robosuite.models.grippers.rst +125 -0
  32. docs/source/robosuite.models.mounts.rst +53 -0
  33. docs/source/robosuite.models.objects.composite.rst +77 -0
  34. docs/source/robosuite.models.objects.group.rst +21 -0
  35. docs/source/robosuite.models.robots.manipulators.rst +125 -0
  36. docs/source/robosuite.models.robots.rst +37 -0
  37. docs/source/robosuite.models.tasks.rst +29 -0
  38. docs/source/robosuite.renderers.context.rst +37 -0
  39. docs/source/robosuite.renderers.mjviewer.rst +21 -0
  40. docs/source/robosuite.renderers.mujoco.rst +21 -0
  41. docs/source/robosuite.renderers.rst +38 -0
  42. docs/source/robosuite.robots.rst +53 -0
  43. docs/source/robosuite.rst +44 -0
  44. docs/source/robosuite.utils.rst +165 -0
  45. generate_urdf.py +428 -0
  46. pyproject.toml +15 -0
  47. requirements-extra.txt +14 -0
  48. requirements.txt +27 -0
  49. setup.py +45 -0
  50. train_all.sh +34 -0
.claude/settings.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Bash(python -c \":*)"
5
+ ]
6
+ }
7
+ }
.gitignore ADDED
@@ -0,0 +1,128 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ env/
12
+ build/
13
+ develop-eggs/
14
+ dist/
15
+ downloads/
16
+ eggs/
17
+ .eggs/
18
+ lib/
19
+ lib64/
20
+ parts/
21
+ !robosuite/controllers/config/default/parts
22
+ !robosuite/controllers/parts
23
+ sdist/
24
+ var/
25
+ wheels/
26
+ !robosuite/models/assets/robots/**/wheels/
27
+ *.egg-info/
28
+ .installed.cfg
29
+ *.egg
30
+
31
+ # PyInstaller
32
+ # Usually these files are written by a python script from a template
33
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
34
+ *.manifest
35
+ *.spec
36
+
37
+ # Installer logs
38
+ pip-log.txt
39
+ pip-delete-this-directory.txt
40
+
41
+ # Unit test / coverage reports
42
+ htmlcov/
43
+ .tox/
44
+ .coverage
45
+ .coverage.*
46
+ .cache
47
+ nosetests.xml
48
+ coverage.xml
49
+ *.cover
50
+ .hypothesis/
51
+
52
+ # Translations
53
+ *.mo
54
+ *.pot
55
+
56
+ # Django stuff:
57
+ *.log
58
+ local_settings.py
59
+
60
+ # Flask stuff:
61
+ instance/
62
+ .webassets-cache
63
+
64
+ # Scrapy stuff:
65
+ .scrapy
66
+
67
+ # Sphinx documentation
68
+ docs/_build/
69
+
70
+ # PyBuilder
71
+ target/
72
+
73
+ # Jupyter Notebook
74
+ .ipynb_checkpoints
75
+
76
+ # pyenv
77
+ .python-version
78
+
79
+ # celery beat schedule file
80
+ celerybeat-schedule
81
+
82
+ # SageMath parsed files
83
+ *.sage.py
84
+
85
+ # dotenv
86
+ .env
87
+
88
+ # virtualenv
89
+ .venv
90
+ venv/
91
+ ENV/
92
+
93
+ # Spyder project settings
94
+ .spyderproject
95
+ .spyproject
96
+
97
+ # Rope project settings
98
+ .ropeproject
99
+
100
+ # mkdocs documentation
101
+ /site
102
+
103
+ # mypy
104
+ .mypy_cache/
105
+
106
+ # mac
107
+ .DS_Store
108
+
109
+ # mujoco files
110
+ mjkey.txt
111
+ MUJOCO_LOG.TXT
112
+
113
+ .mujocomanip_temp_model.xml
114
+
115
+ *.jpg
116
+ .idea
117
+
118
+ .pytest_cache/
119
+
120
+ # private macros
121
+ macros_private.py
122
+
123
+ robosuite_usd/
124
+
125
+ MUJOCO_LOG.TXT
126
+
127
+ # private demonstration files
128
+ robosuite/models/assets/demonstrations_private
.pre-commit-config.yaml ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ repos:
2
+ - repo: https://github.com/psf/black
3
+ rev: 22.10.0 # Replace by any tag/version: https://github.com/psf/black/tags
4
+ hooks:
5
+ - id: black
6
+ language_version: python3 # Should be a command that runs python3.6+
7
+ - repo: https://github.com/pycqa/isort
8
+ rev: 5.13.2
9
+ hooks:
10
+ - id: isort
11
+ name: isort (python)
AUTHORS ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # This file contains an official list of authors of this framework.
2
+
3
+ # Names should be added to this file as:
4
+ # Name or Organization <email address>
5
+ # The email address is not required for organizations.
6
+
7
+ Core Team
8
+ Yuke Zhu <yukez@cs.utexas.edu>
9
+ Josiah Wong <jdwong@stanford.edu>
10
+ Ajay Mandlekar <amandlek@cs.stanford.edu>
11
+ Roberto Martín-Martín <robertomm@cs.utexas.edu>
12
+ Abhishek Joshi <ahjoshi@utexas.edu>
13
+ Kevin Lin <thankyou@utexas.edu>
14
+ Soroush Nasiriany <soroush@cs.utexas.edu>
15
+ Yifeng Zhu <yifeng.zhu@utexas.edu>
16
+
17
+ Contributors
18
+ Zhenyu Jiang <zhenyu@cs.utexas.edu>
19
+ Yuqi Xie <xieleo@utexas.edu>
20
+ Abhiram Maddukuri <abhicm@utexas.edu>
21
+ You Liang Tan <tan_you_liang@hotmail.com>
22
+ Jiren Zhu <jirenz@stanford.edu>
23
+ Jim (Linxi) Fan <jimfan@cs.stanford.edu>
24
+ Orien Zeng <orien.f.zeng@gmail.com>
25
+ Anchit Gupta <anchitg@stanford.edu>
26
+ Zihua Liu <zliu19@stanford.edu>
27
+ Joan Creus-Costa <jcreus@stanford.edu>
28
+ Anchit Gupta <anchitg@stanford.edu>
29
+ Michelle Lee <mishlee@stanford.edu>
30
+ Andrew Kondrich <andrewk1@stanford.edu>
31
+ Rachel Gardner <rachel0@stanford.edu>
32
+ Jonathan Booher <jaustinb@stanford.edu>
33
+ Danfei Xu <danfei@stanford.edu>
34
+ Rachel Gardner <rachel0@stanford.edu>
35
+ Albert Tung <atung3@stanford.edu>
36
+ Divyansh Jha <divyanshj.16@gmail.com>
CONTRIBUTING.md ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ How to Contribute
2
+ =================
3
+
4
+ We are so happy to see you reading this page!
5
+
6
+ Our team wholeheartedly welcomes the community to contribute to robosuite. Contributions from members of the community will help ensure the long-term success of this project. Before you plan to make contributions, here are important resources to get started with:
7
+
8
+ - Read the robosuite [documentation](https://robosuite.ai/docs/overview.html) and [whitepaper](https://robosuite.ai/assets/whitepaper.pdf)
9
+ - Check our latest status from existing [issues](https://github.com/ARISE-Initiative/robosuite/issues), [pull requests](https://github.com/ARISE-Initiative/robosuite/pulls), and [branches](https://github.com/ARISE-Initiative/robosuite/branches) and avoid duplicate efforts
10
+ - Join our [ARISE Slack](https://ariseinitiative.slack.com) workspace for technical discussions. Please [email us](mailto:yukez@cs.utexas.edu) to be added to the workspace.
11
+
12
+ We encourage the community to make four major types of contributions:
13
+
14
+ - **Bug fixes**: Address open issues and fix bugs presented in the `master` branch
15
+ - **Environment designs:** Design new environments and add them to our existing set of [environments](https://github.com/ARISE-Initiative/robosuite/tree/master/robosuite/environments)
16
+ - **Additional assets:** Incorporate new [models](https://github.com/ARISE-Initiative/robosuite/tree/master/robosuite/models) and functionalities of robots, grippers, objects, and workspaces
17
+ - **New functionalities:** Implement new features, such as dynamics randomization, rendering tools, new controllers, etc.
18
+
19
+ Testing
20
+ -------
21
+ Before submitting your contributions, make sure that the changes do not break existing functionalities.
22
+ We have a handful of [tests](https://github.com/ARISE-Initiative/robosuite/tree/master/tests) for verifying the correctness of the code.
23
+ You can run all the tests with the following command in the root folder of robosuite. Make sure that it does not throw any error before you proceed to the next step.
24
+ ```sh
25
+ $ python -m pytest
26
+ ```
27
+
28
+ Submission
29
+ ----------
30
+ Please read the coding conventions below and make sure that your code is consistent with ours. We use the [black](https://github.com/psf/black) and [isort](https://github.com/pycqa/isort) as the [pre-commit](https://pre-commit.com/) hooks to format the source code before code review. To install these hooks, first `pip install pre-commit; pre-commit install` to set them up. Once set up, these hooks should be automatically triggered when committing new changes. If you want to manually check the format of the codes that have already been committed, please run `pre-commit run --all-files` in the project folder.
31
+
32
+ When making a contribution, make a [pull request](https://docs.github.com/en/free-pro-team@latest/github/collaborating-with-issues-and-pull-requests/proposing-changes-to-your-work-with-pull-requests)
33
+ to robosuite with an itemized list of what you have done. When you submit a pull request, it is immensely helpful to include example script(s) that showcase the proposed changes and highlight any new APIs.
34
+ We always love to see more test coverage. When it is appropriate, add a new test to the [tests](https://github.com/ARISE-Initiative/robosuite/tree/master/tests) folder for checking the correctness of your code.
35
+
36
+ Coding Conventions
37
+ ------------------
38
+ In addition to the pre-commit hooks, we value readability and adhere to the following coding conventions:
39
+ - Indent using four spaces (soft tabs)
40
+ - Always put spaces after list items and method parameters (e.g., `[1, 2, 3]` rather than `[1,2,3]`), and around operators and hash arrows (e.g., `x += 1` rather than `x+=1`)
41
+ - Use the [Google Python Style](https://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings) for the docstrings
42
+ - For scripts such as in [demos](https://github.com/ARISE-Initiative/robosuite/tree/master/robosuite/demos) and [tests](https://github.com/ARISE-Initiative/robosuite/tree/master/tests),
43
+ include a docstring at the top of the file that describes the high-level purpose of the script and/or instructions on how to use the scripts (if relevant).
44
+
45
+ We look forward to your contributions. Thanks!
46
+
47
+ The robosuite core team
LICENSE ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) 2022 Stanford Vision and Learning Lab and UT Robot Perception and Learning Lab
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
23
+ This software includes the partial implementation of Deepmind Mujoco https://github.com/deepmind/mujoco.
24
+ Deepmind Mujoco is licensed under the Apache License, Version 2.0 (the "License");
25
+ you may not use the files except in compliance with the License.
26
+
27
+ You may obtain a copy of the License at
28
+ http://www.apache.org/licenses/LICENSE-2.0
MANIFEST.in ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ recursive-include robosuite/controllers/config/ *
2
+ recursive-include robosuite/demos *
3
+ recursive-include robosuite/models/assets/ *
4
+ recursive-include robosuite/scripts *
README.md ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # robosuite
2
+
3
+ ![gallery of_environments](docs/images/gallery.png)
4
+
5
+ [**[Homepage]**](https://robosuite.ai/) &ensp; [**[White Paper]**](https://arxiv.org/abs/2009.12293) &ensp; [**[Documentations]**](https://robosuite.ai/docs/overview.html) &ensp; [**[ARISE Initiative]**](https://github.com/ARISE-Initiative)
6
+
7
+ -------
8
+ ## Latest Updates
9
+
10
+ - [10/28/2024] **v1.5**: Added support for diverse robot embodiments (including humanoids), custom robot composition, composite controllers (including whole body controllers), more teleoperation devices, photo-realistic rendering. [[release notes]](https://github.com/ARISE-Initiative/robosuite/releases/tag/v1.5.0) [[documentation]](http://robosuite.ai/docs/overview.html)
11
+
12
+ - [11/15/2022] **v1.4**: Backend migration to DeepMind's official [MuJoCo Python binding](https://github.com/deepmind/mujoco), robot textures, and bug fixes :robot: [[release notes]](https://github.com/ARISE-Initiative/robosuite/releases/tag/v1.4.0) [[documentation]](http://robosuite.ai/docs/v1.4/)
13
+
14
+ - [10/19/2021] **v1.3**: Ray tracing and physically based rendering tools :sparkles: and access to additional vision modalities 🎥 [[video spotlight]](https://www.youtube.com/watch?v=2xesly6JrQ8) [[release notes]](https://github.com/ARISE-Initiative/robosuite/releases/tag/v1.3) [[documentation]](http://robosuite.ai/docs/v1.3/)
15
+
16
+ - [02/17/2021] **v1.2**: Added observable sensor models :eyes: and dynamics randomization :game_die: [[release notes]](https://github.com/ARISE-Initiative/robosuite/releases/tag/v1.2)
17
+
18
+ - [12/17/2020] **v1.1**: Refactored infrastructure and standardized model classes for much easier environment prototyping :wrench: [[release notes]](https://github.com/ARISE-Initiative/robosuite/releases/tag/v1.1)
19
+
20
+ -------
21
+
22
+ **robosuite** is a simulation framework powered by the [MuJoCo](http://mujoco.org/) physics engine for robot learning. It also offers a suite of benchmark environments for reproducible research. The current release (v1.5) features support for diverse robot embodiments (including humanoids), custom robot composition, composite controllers (including whole body controllers), more teleoperation devices, photo-realistic rendering. This project is part of the broader [Advancing Robot Intelligence through Simulated Environments (ARISE) Initiative](https://github.com/ARISE-Initiative), with the aim of lowering the barriers of entry for cutting-edge research at the intersection of AI and Robotics.
23
+
24
+ Data-driven algorithms, such as reinforcement learning and imitation learning, provide a powerful and generic tool in robotics. These learning paradigms, fueled by new advances in deep learning, have achieved some exciting successes in a variety of robot control problems. However, the challenges of reproducibility and the limited accessibility of robot hardware (especially during a pandemic) have impaired research progress. The overarching goal of **robosuite** is to provide researchers with:
25
+
26
+ * a standardized set of benchmarking tasks for rigorous evaluation and algorithm development;
27
+ * a modular design that offers great flexibility in designing new robot simulation environments;
28
+ * a high-quality implementation of robot controllers and off-the-shelf learning algorithms to lower the barriers to entry.
29
+
30
+ This framework was originally developed in late 2017 by researchers in [Stanford Vision and Learning Lab](http://svl.stanford.edu) (SVL) as an internal tool for robot learning research. Now, it is actively maintained and used for robotics research projects in SVL, the [UT Robot Perception and Learning Lab](http://rpl.cs.utexas.edu) (RPL) and NVIDIA [Generalist Embodied Agent Research Group](https://research.nvidia.com/labs/gear/) (GEAR). We welcome community contributions to this project. For details, please check out our [contributing guidelines](CONTRIBUTING.md).
31
+
32
+ **Robosuite** offers a modular design of APIs for building new environments, robot embodiments, and robot controllers with procedural generation. We highlight these primary features below:
33
+
34
+ * **standardized tasks**: a set of standardized manipulation tasks of large diversity and varying complexity and RL benchmarking results for reproducible research;
35
+ * **procedural generation**: modular APIs for programmatically creating new environments and new tasks as combinations of robot models, arenas, and parameterized 3D objects. Check out our repo [robosuite_models](https://github.com/ARISE-Initiative/robosuite_models) for extra robot models tailored to robosuite.
36
+ * **robot controllers**: a selection of controller types to command the robots, such as joint-space velocity control, inverse kinematics control, operational space control, and whole body control;
37
+ * **teleoperation devices**: a selection of teleoperation devices including keyboard, spacemouse and MuJoCo viewer drag-drop;
38
+ * **multi-modal sensors**: heterogeneous types of sensory signals, including low-level physical states, RGB cameras, depth maps, and proprioception;
39
+ * **human demonstrations**: utilities for collecting human demonstrations, replaying demonstration datasets, and leveraging demonstration data for learning. Check out our sister project [robomimic](https://arise-initiative.github.io/robomimic-web/);
40
+ * **photorealistic rendering**: integration with advanced graphics tools that provide real-time photorealistic renderings of simulated scenes, including support for NVIDIA Isaac Sim rendering.
41
+
42
+ ## Citation
43
+ Please cite [**robosuite**](https://robosuite.ai) if you use this framework in your publications:
44
+ ```bibtex
45
+ @inproceedings{robosuite2020,
46
+ title={robosuite: A Modular Simulation Framework and Benchmark for Robot Learning},
47
+ author={Yuke Zhu and Josiah Wong and Ajay Mandlekar and Roberto Mart\'{i}n-Mart\'{i}n and Abhishek Joshi and Soroush Nasiriany and Yifeng Zhu and Kevin Lin},
48
+ booktitle={arXiv preprint arXiv:2009.12293},
49
+ year={2020}
50
+ }
51
+ ```
collect.sh ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ # Collect 50 successful episodes per task with videos
3
+ # Usage: bash collect.sh
4
+ # Output: tactile_data/{task_name}/episode_XX.hdf5
5
+ # tactile_data/videos/{task_name}/{task_name}_epXX.mp4
6
+
7
+ set -e
8
+ cd "$(dirname "$0")"
9
+
10
+ PYTHONUNBUFFERED=1 python tactile_tasks/run_collection.py \
11
+ --task all \
12
+ --n_episodes 50 \
13
+ --save_dir ./tactile_data
docs/.gitignore ADDED
@@ -0,0 +1 @@
 
 
1
+ _build
docs/Makefile ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Minimal makefile for Sphinx documentation
2
+ #
3
+
4
+ # You can set these variables from the command line.
5
+ SPHINXOPTS =
6
+ SPHINXBUILD = sphinx-build
7
+ SPHINXPROJ = robosuite
8
+ SOURCEDIR = .
9
+ BUILDDIR = _build
10
+
11
+ # Put it first so that "make" without argument is like "make help".
12
+ help:
13
+ @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14
+
15
+ apidoc:
16
+ @sphinx-apidoc -T --force ../robosuite -o source
17
+
18
+ .PHONY: help Makefile
19
+
20
+ # Catch-all target: route all unknown targets to Sphinx using the new
21
+ # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
22
+ %: Makefile
23
+ @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
docs/acknowledgement.md ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Acknowledgements
2
+
3
+ **robosuite** is built on the [MuJoCo engine](http://www.mujoco.org/) with the Python interfaces provided by [mujoco](https://github.com/deepmind/mujoco). We would like to thank members of the [Stanford People, AI, & Robots (PAIR) Group](http://pair.stanford.edu/) and [UT Robot Perception and Learning Lab](http://rpl.cs.utexas.edu/) for their support and feedback to this project. In particular, the following people have made their contributions in different stages of this project:
4
+
5
+ - [Jiren Zhu](https://github.com/jirenz), [Joan Creus-Costa](https://github.com/jcreus) (robosuite v0.3)
6
+ - [Jim (Linxi) Fan](http://jimfan.me/), [Zihua Liu](https://www.linkedin.com/in/zihua-liu/), [Orien Zeng](https://www.linkedin.com/in/orien-zeng-054589b6/), [Anchit Gupta](https://www.linkedin.com/in/anchitgupta/) ([Surreal](http://surreal.stanford.edu/) experiments)
7
+ - [Michelle Lee](http://stanford.edu/~mishlee/), [Rachel Gardner](https://www.linkedin.com/in/rachel0/) (controller implementations)
8
+ - [Danfei Xu](https://cs.stanford.edu/~danfei/) (placement initializer)
9
+ - [Andrew Kondrich](http://www.andrewkondrich.com/), [Jonathan Booher](https://web.stanford.edu/~jaustinb/) (domain randomization)
10
+ - [Albert Tung](https://www.linkedin.com/in/albert-tung3/) (demonstration collection)
11
+ - [Divyansh Jha](https://github.com/divyanshj16), [Fei Xia](http://fxia.me/) (robosuite v1.3 renderers)
12
+ - [Zhenyu Jiang](https://zhenyujiang.me/), [Yuqi Xie](https://xieleo5.github.io/), [You Liang Tan](https://youliangtan.github.io/), (robosuite v1.5)
13
+
14
+ We wholeheartedly welcome the community to contribute to our project through issues and pull requests. New contributors will be added to the list above.
docs/basicusage.md ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Basic Usage
2
+
3
+ ## Running Standardized Environments
4
+ **robosuite** offers a set of standardized manipulation tasks for benchmarking purposes. These pre-defined environments can be easily instantiated with the `make` function. The APIs we provide to interact with our environments are simple and similar to the ones used by [OpenAI Gym](https://github.com/openai/gym/). Below is a minimalistic example of how to interact with an environment.
5
+
6
+ <div class="admonition warning">
7
+ <p class="admonition-title">Attention Mac users!</p>
8
+
9
+ Mac users who wish to use the default mjviewer renderer need to prepend the "python" command with "mj": `mjpython ...`
10
+ </div>
11
+
12
+ ```python
13
+ import numpy as np
14
+ import robosuite as suite
15
+
16
+ # create environment instance
17
+ env = suite.make(
18
+ env_name="Lift", # try with other tasks like "Stack" and "Door"
19
+ robots="Panda", # try with other robots like "Sawyer" and "Jaco"
20
+ has_renderer=True,
21
+ has_offscreen_renderer=False,
22
+ use_camera_obs=False,
23
+ )
24
+
25
+ # reset the environment
26
+ env.reset()
27
+
28
+ for i in range(1000):
29
+ action = np.random.randn(*env.action_spec[0].shape) * 0.1
30
+ obs, reward, done, info = env.step(action) # take action in the environment
31
+ env.render() # render on display
32
+ ````
33
+
34
+ This script above creates a simulated environment with the on-screen renderer, which is useful for visualization and qualitative evaluation. The `step()` function takes an `action` as input and returns a tuple of `(obs, reward, done, info)` where `obs` is an `OrderedDict` containing observations `[(name_string, np.array), ...]`, `reward` is the immediate reward obtained per step, `done` is a Boolean flag indicating if the episode has terminated and `info` is a dictionary which contains additional metadata.
35
+
36
+ Many other parameters can be configured for each environment. They provide functionalities such as headless rendering, getting pixel observations, changing camera settings, using reward shaping, and adding extra low-level observations. Please refer to [Environment](modules/environments) modules and the [Environment class](simulation/environment) APIs for further details.
37
+
38
+ Demo scripts that showcase various features of **robosuite** are available [here](demos). The purpose of each script and usage instructions can be found at the beginning of each file.
39
+
docs/changelog.md ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Changelog
2
+
3
+ ## Version 1.5.2
4
+
5
+ - **Bug Fixes**:
6
+ - Fixed domain randomization compatibility for `mujoco!=3.1.1`.
7
+ - Corrected dexterous hand mounting for Panda and pot-with-handles geometry for rectangular pots.
8
+ - Fixed Mink IK with delta input, duplicated inertial properties, free-joint issues, and Baxter mesh problems.
9
+ - Resolved mobile base XML and controller logic issues, binding utils on Windows, and EGL error reporting.
10
+ - Hot-fixed `Task.generate_id_mappings()` to remove invalid EEF targets.
11
+
12
+ - **Features / Enhancements**:
13
+ - Add env seeding for determinism.
14
+ - Added support for multiple cameras across renderers and observation pipelines.
15
+ - Enabled instance segmentation to include arena bodies.
16
+ - Added DualSense controller support and improved SpaceMouse auto-detection.
17
+ - Introduced scalable arenas and MuJoCo objects via `set_scale`.
18
+ - Allowed base type specification and manipulator mounts for mobile manipulation envs.
19
+ - Added new robots and hands (xArm7 revised, Inspire/Fourier grasp qpos).
20
+ - Extended whole-body IK with `input_ref_frame=base` and `skip_wbc_action`.
21
+ - Added sensors, shell inertia for Sawyer meshes, and joint position observations.
22
+
23
+ - **Documentation Updates**:
24
+ - Updated v1.5 docs, fixed broken links, improved dark-mode visibility, and refined demo/device documentation.
25
+ - Added USD requirements and SpaceMouse dependencies to docs and extras.
26
+ - Improved demos page and clarified base type comments.
27
+
28
+ - **CI / Release / Tooling**:
29
+ - Added and refined PyPI publishing workflows.
30
+ - Improved build–docs synchronization and pinned Mink version.
31
+
32
+ - **Miscellaneous**:
33
+ - Added render modalities and updated demo scripts to include all manipulators by default.
34
+ - Refactored controller configs and composite controller logic.
35
+ - Improved data collection wrapper resets and environment seeding.
36
+
37
+ ## Version 1.5.1
38
+
39
+ - **Bug Fixes**:
40
+ - Fixed segmentation demo, part controller demo, demo renderer, joint and actuator issues, equality removal, and orientation mismatch in Fourier hands.
41
+
42
+ - **Documentation Updates**:
43
+ - Updated `basicusage.md`, overview page, demo docs, teleop usage info, devices, and related docs.
44
+ - Added a CI doc update workflow and `.nojekyll` fix.
45
+ - Simplified composite controller keywords and updated robots section and task images.
46
+
47
+ - **Features/Enhancements**:
48
+ - Added GymWrapper support for both `gym` and `gymnasium` with `dict_obs`.
49
+ - Updated DexMimicGen assets and added a default whole-body Mink IK config.
50
+ - Improved CI to check all tests and print video save paths in demo recordings.
51
+ - Add GR1 and spot robot to `demo_random_actions.py` script.
52
+
53
+ - **Miscellaneous**:
54
+ - Added troubleshooting for SpaceMouse failures and terminated `mjviewer` on resets.
55
+ - Adjusted OSC position fixes and updated part controller JSONs.
56
+
57
+ ## Version 1.5.0
58
+
59
+ The 1.5 release of **Robosuite** introduces significant advancements to extend flexibility and realism in robotic simulations. Key highlights include support for diverse robot embodiments (e.g., humanoids), custom robot compositions, composite controllers (such as whole-body controllers), expanded teleoperation devices, and photorealistic rendering capabilities.
60
+
61
+ ### New Features
62
+ - **Diverse Robot Embodiments**: Support for complex robots, including humanoids, allowing exploration of advanced manipulation and mobility tasks. Please see [robosuite_models](https://github.com/ARISE-Initiative/robosuite_models) for extra robosuite-compatible robot models.
63
+ - **Custom Robot Composition**: Users can now build custom robots from modular components, offering extensive configuration options.
64
+ - **Composite Controllers**: New controller abstraction includes whole-body controllers, and the ability to control robots with composed body parts, arms, and grippers.
65
+ - **Additional Teleoperation Devices**: Expanded compatibility with teleoperation tools like drag-and-drop in the MuJoCo viewer and Apple Vision Pro.
66
+ - **Photorealistic Rendering**: Integration of NVIDIA Isaac Sim for enhanced, real-time photorealistic visuals, bringing simulations closer to real-world fidelity.
67
+
68
+ ### Improvements
69
+ - **Updated Documentation**: New tutorials and expanded documentation on utilizing advanced controllers, teleoperation, and rendering options.
70
+ - **Simulation speed improvement**: By default we set the `lite_physics` flag to True to skip redundant calls to [`env.sim.step()`](https://github.com/ARISE-Initiative/robosuite/blob/29e73bd41f9bc43ba88bb7d2573b868398905819/robosuite/environments/base.py#L444)
71
+
72
+ ### Migration
73
+
74
+ - Composite controller refactoring: please see example of [usage](https://github.com/ARISE-Initiative/robosuite/blob/29e73bd41f9bc43ba88bb7d2573b868398905819/robosuite/examples/third_party_controller/mink_controller.py#L421)
docs/conf.py ADDED
@@ -0,0 +1,205 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # -*- coding: utf-8 -*-
2
+ #
3
+ # robosuite documentation build configuration file, created by
4
+ # sphinx-quickstart on Sun Aug 16 10:05:44 2020.
5
+ #
6
+ # This file is execfile()d with the current directory set to its
7
+ # containing dir.
8
+ #
9
+ # Note that not all possible configuration values are present in this
10
+ # autogenerated file.
11
+ #
12
+ # All configuration values have a default; values that are commented out
13
+ # serve to show the default.
14
+
15
+ # If extensions (or modules to document with autodoc) are in another directory,
16
+ # add these directories to sys.path here. If the directory is relative to the
17
+ # documentation root, use os.path.abspath to make it absolute, like shown here.
18
+
19
+ import os
20
+ import sys
21
+
22
+ sys.path.insert(0, os.path.abspath("."))
23
+
24
+ import sphinx_book_theme
25
+
26
+ import robosuite
27
+
28
+ # -- General configuration ------------------------------------------------
29
+
30
+ # If your documentation needs a minimal Sphinx version, state it here.
31
+ #
32
+ # needs_sphinx = '1.0'
33
+
34
+ # Add any Sphinx extension module names here, as strings. They can be
35
+ # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
36
+ # ones.
37
+ extensions = [
38
+ "sphinx.ext.napoleon",
39
+ "sphinx_markdown_tables",
40
+ "sphinx.ext.mathjax",
41
+ "sphinx.ext.githubpages",
42
+ "sphinx.ext.autodoc",
43
+ "recommonmark", # use Sphinx-1.4 or newer
44
+ "nbsphinx",
45
+ "sphinx_togglebutton",
46
+ ]
47
+
48
+ myst_enable_extensions = [
49
+ "dollarmath",
50
+ ]
51
+
52
+ mathjax_config = {
53
+ "tex2jax": {
54
+ "inlineMath": [["\\(", "\\)"]],
55
+ "displayMath": [["\\[", "\\]"]],
56
+ },
57
+ }
58
+
59
+ mathjax3_config = {
60
+ "tex": {
61
+ "inlineMath": [["\\(", "\\)"]],
62
+ "displayMath": [["\\[", "\\]"]],
63
+ }
64
+ }
65
+
66
+ # Sphinx-apidoc variables
67
+ apidoc_module_dir = "../robosuite"
68
+ apidoc_output_dir = "reference"
69
+
70
+
71
+ # Add any paths that contain templates here, relative to this directory.
72
+ templates_path = ["_templates"]
73
+
74
+ # source_parsers = {
75
+ # '.md': CommonMarkParser,
76
+ # }
77
+
78
+ # The suffix(es) of source filenames.
79
+ # You can specify multiple suffix as a list of string:
80
+ source_suffix = [".rst", ".md", ".ipynb"]
81
+
82
+ # The master toctree document.
83
+ master_doc = "index"
84
+
85
+ # General information about the project.
86
+ project = "robosuite"
87
+ copyright = "Stanford University and The University of Texas at Austin 2025"
88
+ author = "the robosuite core team"
89
+
90
+ # The version info for the project you're documenting, acts as replacement for
91
+ # |version| and |release|, also used in various other places throughout the
92
+ # built documents.
93
+ #
94
+ # The short X.Y version.
95
+ version = (".").join(robosuite.__version__.split(".")[:-1])
96
+ # The full version, including alpha/beta/rc tags.
97
+ release = (".").join(robosuite.__version__.split(".")[:-1])
98
+
99
+ # The language for content autogenerated by Sphinx. Refer to documentation
100
+ # for a list of supported languages.
101
+ #
102
+ # This is also used if you do content translation via gettext catalogs.
103
+ # Usually you set "language" from the command line for these cases.
104
+ language = None
105
+
106
+ # List of patterns, relative to source directory, that match files and
107
+ # directories to ignore when looking for source files.
108
+ # This patterns also effect to html_static_path and html_extra_path
109
+ exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
110
+
111
+ # The name of the Pygments (syntax highlighting) style to use.
112
+ pygments_style = "sphinx"
113
+
114
+ # If true, `todo` and `todoList` produce output, else they produce nothing.
115
+ todo_include_todos = False
116
+
117
+
118
+ # -- Options for HTML output ----------------------------------------------
119
+
120
+ # The theme to use for HTML and HTML Help pages. See the documentation for
121
+ # a list of builtin themes.
122
+ #
123
+ html_theme = "sphinx_book_theme"
124
+ html_logo = "robosuite_color.png"
125
+
126
+ # Theme options are theme-specific and customize the look and feel of a theme
127
+ # further. For a list of options available for each theme, see the
128
+ # documentation.
129
+ #
130
+ # html_theme_options = {}
131
+
132
+ # Add any paths that contain custom static files (such as style sheets) here,
133
+ # relative to this directory. They are copied after the builtin static files,
134
+ # so a file named "default.css" will overwrite the builtin "default.css".
135
+ html_static_path = ["_static"]
136
+
137
+ html_css_files = [
138
+ "css/theme.css",
139
+ ]
140
+
141
+ html_js_files = ["js/custom.js"]
142
+
143
+
144
+ # -- Options for HTMLHelp output ------------------------------------------
145
+
146
+ # Output file base name for HTML help builder.
147
+ htmlhelp_basename = "robosuitedoc"
148
+
149
+
150
+ # -- Options for LaTeX output ---------------------------------------------
151
+
152
+ latex_elements = {
153
+ # The paper size ('letterpaper' or 'a4paper').
154
+ #
155
+ # 'papersize': 'letterpaper',
156
+ # The font size ('10pt', '11pt' or '12pt').
157
+ #
158
+ # 'pointsize': '10pt',
159
+ # Additional stuff for the LaTeX preamble.
160
+ #
161
+ # 'preamble': '',
162
+ # Latex figure (float) alignment
163
+ #
164
+ # 'figure_align': 'htbp',
165
+ }
166
+
167
+ # Grouping the document tree into LaTeX files. List of tuples
168
+ # (source start file, target name, title,
169
+ # author, documentclass [howto, manual, or own class]).
170
+ latex_documents = [
171
+ (master_doc, "robosuite.tex", "robosuite Documentation", author, "manual"),
172
+ ]
173
+
174
+
175
+ # -- Options for manual page output ---------------------------------------
176
+
177
+ # One entry per manual page. List of tuples
178
+ # (source start file, name, description, authors, manual section).
179
+ man_pages = [(master_doc, "robosuite", "robosuite Documentation", [author], 1)]
180
+
181
+
182
+ # -- Options for Texinfo output -------------------------------------------
183
+
184
+ # Grouping the document tree into Texinfo files. List of tuples
185
+ # (source start file, target name, title, author,
186
+ # dir menu entry, description, category)
187
+ texinfo_documents = [
188
+ (
189
+ master_doc,
190
+ "robosuite",
191
+ "robosuite Documentation",
192
+ author,
193
+ "robosuite",
194
+ "ARISE",
195
+ "Miscellaneous",
196
+ ),
197
+ ]
198
+
199
+ autodoc_mock_imports = [
200
+ "robosuite.devices.mjgui",
201
+ "robosuite.devices.spacemouse",
202
+ "robosuite.devices.dualsense",
203
+ "robosuite.devices.keyboard",
204
+ "robosuite.devices.device",
205
+ ]
docs/demos.md ADDED
@@ -0,0 +1,230 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Demo Showcases
2
+
3
+ We provide a collection of [demo scripts](https://github.com/ARISE-Initiative/robosuite/tree/master/robosuite/demos) to showcase the functionalities in **robosuite**.
4
+
5
+ <div class="admonition warning">
6
+ <p class="admonition-title">Attention Mac users!</p>
7
+
8
+ For these scripts, Mac users who wish to use the default mjviewer renderer need to prepend the "python" command with "mj": `mjpython ...`
9
+ </div>
10
+
11
+ ### Environment Configuration
12
+ The `demo_random_action.py` script is the starter demo script that you should try first. It highlights the modular design of our simulated environments. It enables users to create new simulation instances by choosing one [environment](modules/environments), one or more [robots](modules/robots), and their [controllers](modules/controllers) from the command line. The script creates an environment instance and controls the robots with uniform random actions drawn from the controller-specific action space. The list of all environments, robots, controllers, and gripper types supported in the current version of **robosuite** are defined by `suite.ALL_ENVIRONMENTS`, `suite.ALL_ROBOTS`, `suite. ALL_PART_CONTROLLERS`, and `suite.ALL_GRIPPERS` respectively.
13
+
14
+
15
+ ### Controller Test
16
+ The `demo_control.py` script demonstrates the various functionalities of each controller available within **robosuite**.
17
+ For a given controller, runs through each dimension and executes a perturbation `test_value` from its
18
+ neutral (stationary) value for a certain amount of time "steps_per_action", and then returns to all neutral values
19
+ for time `steps_per_rest` before proceeding with the next action dim.
20
+ For example, given that the expected action space of the `OSC_POSE` controller (without a gripper) is `(dx, dy, dz, droll, dpitch, dyaw)`, the testing sequence of actions over time will be:
21
+
22
+ ```
23
+ ***START OF DEMO***
24
+ ( dx, 0, 0, 0, 0, 0, grip) <-- Translation in x-direction for 'steps_per_action' steps
25
+ ( 0, 0, 0, 0, 0, 0, grip) <-- No movement (pause) for 'steps_per_rest' steps
26
+ ( 0, dy, 0, 0, 0, 0, grip) <-- Translation in y-direction for 'steps_per_action' steps
27
+ ( 0, 0, 0, 0, 0, 0, grip) <-- No movement (pause) for 'steps_per_rest' steps
28
+ ( 0, 0, dz, 0, 0, 0, grip) <-- Translation in z-direction for 'steps_per_action' steps
29
+ ( 0, 0, 0, 0, 0, 0, grip) <-- No movement (pause) for 'steps_per_rest' steps
30
+ ( 0, 0, 0, dr, 0, 0, grip) <-- Rotation in roll (x) axis for 'steps_per_action' steps
31
+ ( 0, 0, 0, 0, 0, 0, grip) <-- No movement (pause) for 'steps_per_rest' steps
32
+ ( 0, 0, 0, 0, dp, 0, grip) <-- Rotation in pitch (y) axis for 'steps_per_action' steps
33
+ ( 0, 0, 0, 0, 0, 0, grip) <-- No movement (pause) for 'steps_per_rest' steps
34
+ ( 0, 0, 0, 0, 0, dy, grip) <-- Rotation in yaw (z) axis for 'steps_per_action' steps
35
+ ( 0, 0, 0, 0, 0, 0, grip) <-- No movement (pause) for 'steps_per_rest' steps
36
+ ***END OF DEMO***
37
+ ```
38
+
39
+ Thus the `OSC_POSE` controller should be expected to sequentially move linearly in the x direction first, then the y direction, then the z direction, and then begin sequentially rotating about its x-axis, then y-axis, then z-axis. Please reference the documentation of [Controllers](modules/controllers) for an overview of each controller. Controllers are expected to behave in a generally controlled manner, according to their control space. The expected sequential qualitative behavior during the test is described below for each controller:
40
+
41
+ * `OSC_POSE`: Gripper moves sequentially and linearly in x, y, z direction, then sequentially rotates in x-axis, y-axis, z-axis, relative to the global coordinate frame
42
+ * `OSC_POSITION`: Gripper moves sequentially and linearly in x, y, z direction, relative to the global coordinate frame
43
+ * `IK_POSE`: Gripper moves sequentially and linearly in x, y, z direction, then sequentially rotates in x-axis, y-axis, z-axis, relative to the local robot end effector frame
44
+ * `JOINT_POSITION`: Robot Joints move sequentially in a controlled fashion
45
+ * `JOINT_VELOCITY`: Robot Joints move sequentially in a controlled fashion
46
+ * `JOINT_TORQUE`: Unlike other controllers, joint torque controller is expected to act rather lethargic, as the "controller" is really just a wrapper for direct torque control of the mujoco actuators. Therefore, a "neutral" value of 0 torque will not guarantee a stable robot when it has non-zero velocity!
47
+
48
+
49
+ ### Domain Randomization
50
+
51
+ The `demo_domain_randomization.py` script showcases our domain randomization functionality. Domain randomization can be easily enabled by wrapping an environment with the [DomainRandomizationWrapper](source/robosuite.wrappers). At this moment, the randomization functionality focuses on visual variations, including colors, textures, and camera viewpoints.
52
+
53
+ ![collection of grippers](images/domain_randomization.png)
54
+
55
+
56
+ ### Sensor Realism
57
+ The `demo_sensor_corruption.py` script shows how the [Observable](modules/sensors) functionality can be used to model sensor corruption and delay. The [Observable](modules/sensors) class provides easy-to-use interface for simulating real-world sensor noises, variable sensor delays, and sampling frequencies of realistic sensors. These techniques are useful for improving the generalization and robustness of the policies trained on robosuite, facilitating sim2real transfer to the real hardware. For example, see Appendix B of [Zhu et al. RSS'2018](https://arxiv.org/abs/1802.09564) and Section V of [Tan et al. RSS'2018](https://arxiv.org/abs/1804.10332).
58
+
59
+
60
+ ### Gripper Selection
61
+ The `demo_gripper_selection.py` script shows you how to select gripper for an environment. This is controlled by `gripper_type` keyword argument. The set of all grippers is defined by the global variable `robosuite.ALL_GRIPPERS`.
62
+
63
+ ![collection of grippers](images/gripper_collection.png)
64
+
65
+ ### Gripper Interaction & Procedural Generation
66
+ The `demo_gripper_interaction.py` script illustrates the process of importing grippers into a scene and making it interact
67
+ with the objects with actuators. It also shows how to procedurally generate a scene with the Modeling APIs of the MJCF utility functions.
68
+
69
+
70
+ ### Trajectory Replay
71
+ The `demo_collect_and_playback_data.py` shows how to record robot roll-out trajectory data with the [DataCollectionWrapper](source/robosuite.wrappers) wrapper and play them back. This wrapper records and stores the environment states in a trajectory to temporary files in `.npz` format (default path: `/tmp`). During playback, it loads the stored states from disk and resets the simulator to these states. Example:
72
+ ```
73
+ $ python demo_collect_and_playback_data.py --environment Door
74
+ ```
75
+
76
+ ### OpenAI Gym-style APIs
77
+ This `demo_gym_functionality.py` script shows how to adapt an environment to be compatible with the [OpenAI Gym](https://gym.openai.com/)-style APIs. This is useful when using learning pipelines that require supporting these APIs. For instance, this can be used with [OpenAI Baselines](https://github.com/openai/baselines) to train agents with RL. We base this script off of some code snippets found in the [Getting Started with Gym](https://gym.openai.com/docs/) section of the OpenAI gym documentation. The following snippet was used to demo basic functionality in OpenAI Gym.
78
+
79
+ ```python
80
+ import gym
81
+ env = gym.make('CartPole-v0')
82
+ for i_episode in range(20):
83
+ observation = env.reset()
84
+ for t in range(100):
85
+ env.render()
86
+ print(observation)
87
+ action = env.action_space.sample()
88
+ observation, reward, done, info = env.step(action)
89
+ if done:
90
+ print("Episode finished after {} timesteps".format(t+1))
91
+ break
92
+ ```
93
+
94
+ To adapt the **robosuite** APIs to be compatible with OpenAI Gym's style, this script demonstrates how this can be easily achieved by using the [GymWrapper](source/robosuite.wrappers).
95
+
96
+
97
+ ### Teleoperation
98
+ The `demo_device_control.py` scripts shows how to teleoperate robot with [control devices](modules/devices), such as keyboard or SpaceMouse. The user input device can be set by the `--device` argument, with the following two options:
99
+
100
+ * **Keyboard**
101
+ We use the keyboard to control the end-effector of the robot.
102
+ The keyboard provides 6-DoF control commands through various keyboard keys.
103
+
104
+ **Note:**
105
+ To run this script with macOS, you must run it with root access.
106
+
107
+ * **SpaceMouse**
108
+ We use the SpaceMouse 3D mouse from [3Dconnexion](https://www.3dconnexion.com/spacemouse_wireless/en/) to control the end-effector of the robot. The mouse provides 6-DoF control commands.
109
+
110
+ We used the SpaceMouse Wireless. The paper below used the same device
111
+ to collect human demonstrations for imitation learning.
112
+
113
+ ```text
114
+ Reinforcement and Imitation Learning for Diverse Visuomotor Skills
115
+ Yuke Zhu, Ziyu Wang, Josh Merel, Andrei Rusu, Tom Erez, Serkan Cabi, Saran Tunyasuvunakool,
116
+ János Kramár, Raia Hadsell, Nando de Freitas, Nicolas Heess
117
+ RSS 2018
118
+ ```
119
+
120
+ **Note:**
121
+ This current implementation only supports macOS (Linux support can be added).
122
+ Download and install the [driver](https://www.3dconnexion.com/service/drivers.html) before running the script.
123
+
124
+ * **DualSense**
125
+ We use the DualSense joystick from [DualSense](https://www.playstation.com/en-us/accessories/dualsense-wireless-controller/) to control the end-effector of the robot. The joystick provides 6-DoF control commands.
126
+
127
+ **Note:**
128
+ Make sure `hidapi` can detect your DualSense in your computer. In Linux, you may add udev rules in `/etc/udev/rules.d` to get access to the device without root privilege. For the rules content you can refer to [game-device-udev](https://codeberg.org/fabiscafe/game-devices-udev).
129
+
130
+ * **Mujoco GUI**
131
+ The Mujoco GUI provides a graphical user interface for viewing and interacting with a mujoco simulation. We use the GUI and a mouse to drag and drop mocap bodies, whose
132
+ poses are tracked by a controller. More specifically, once the mujoco GUI is loaded from running `python demo_device_control.py`, you first need to hit the <Tab> key to reach the interactive mujoco viewer state. Then, you should double click on
133
+ a mocap body. Finally, to drag the mocap body, you can hit to <Ctrl> or <Shift> key to translate or rotate the mocap body. For Mac users, you need to use `mjpython demo_device_control.py`. See the note from [mujoco](https://mujoco.readthedocs.io/en/stable/python.html#passive-viewer) for more details.
134
+
135
+
136
+ Additionally, `--pos_sensitivity` and `--rot_sensitivity` provide relative gains for increasing / decreasing the user input
137
+ device sensitivity.
138
+
139
+
140
+ Furthermore, please choose environment specifics with the following arguments:
141
+
142
+ * `--environment`: Task to perform, e.g., `Lift`, `TwoArmPegInHole`, `NutAssembly`, etc.
143
+
144
+ * `--robots`: Robot(s) with which to perform the task, e.g., `Tiago`, `Panda`, `GR1`, `Sawyer`, etc. Note that the environments include sanity checks, such that a `TwoArm...` environment will not accept configurations with a single, one-armed robot.
145
+
146
+ * `--config`: Exclusively applicable and only should be specified for `TwoArm...` environments. Specifies the robot
147
+ configuration desired for the task when two robots are inputted. Options are {`parallel` and `opposed`}
148
+
149
+ * `parallel`: Sets up the environment such that two robots are stationed next to
150
+ each other facing the same direction. Expects a 2-tuple of robot names to be specified
151
+ in the `--robots` argument.
152
+
153
+ * `opposed`: Sets up the environment such that two robots are stationed opposed from
154
+ each other, facing each other from opposite directions. Expects a 2-tuple of robot names
155
+ to be specified in the `--robots` argument.
156
+
157
+
158
+ Examples:
159
+ * For normal single-arm environment:
160
+ ```
161
+ $ python demo_device_control.py --environment PickPlaceCan --robots Sawyer
162
+ ```
163
+ * For two-arm bimanual environment:
164
+ ```
165
+ $ python demo_device_control.py --environment TwoArmLift --robots Tiago
166
+ ```
167
+ * For two-arm multi single-arm robot environment:
168
+ ```
169
+ $ python demo_device_control.py --environment TwoArmLift --robots Sawyer Sawyer --config parallel
170
+ ```
171
+
172
+ ### Video Recording
173
+ The `demo_video_recording.py` script shows how to record a video of robot roll-out with the `imageio` library. This script uses offscreen rendering. This is useful for generating qualitative videos of robot policy behaviors. The generated video is in the mp4 format. Example:
174
+ ```sh
175
+ $ python demo_video_recording.py --environment Lift --robots Panda
176
+ ```
177
+
178
+ ### Rendering Options
179
+ The `demo_renderers.py` script shows how to use different renderers with the simulation environments. Our current version supports the default MuJoCo renderer. More information about these renderers can be found in the [Renderer](modules/renderers) module. Example:
180
+ ```sh
181
+ $ python demo_renderers.py --renderer default
182
+ ```
183
+ The `--renderer` flag can be set to `mujoco` or `default`
184
+
185
+ ### Exporting to USD
186
+ Exporting to USD allows users to render **robosuite** trajectories in external renderers such as NVIDIA Omniverse and Blender. In order to export to USD you must install the required dependencies for the exporter.
187
+ ```sh
188
+ $ pip install usd-core pillow tqdm
189
+ ```
190
+ Once the dependencies are installed, the USD exporter can be imported via `from robosuite.utils.usd import exporter`. The `USDExporter` class in the `exporter` module handles exporting all nessecary assets and USD files associated with a **robosuite** trajectory.
191
+
192
+ First, instantiate a **robosuite** environment. Each environment has an MjModel and MjData instance associated with it. These attributes can be retrieved using
193
+ ```python
194
+ model = env.sim.model._model
195
+ data = env.sim.data._data
196
+ ```
197
+ Both `model` and `data` are used by the USD exporter. Once a robosuite environment is defined, create a `USDExporter` object with the following arguments.
198
+
199
+ * `model` (required): an MjModel instance.
200
+ * `max_geom`: Optional integer specifying the maximum number of geoms that
201
+ can be rendered in the same scene. If None this will be chosen
202
+ automatically based on the estimated maximum number of renderable
203
+ geoms in the model.
204
+ * `output_directory_name`: name of root directory to store outputted frames
205
+ and assets generated by the USD renderer.
206
+ and assets by the USD renderer.
207
+ * `light_intensity`: default intensity of the lights in the external renderer.
208
+ * `shareable`: use relative paths to assets instead of absolute paths to allow
209
+ files to be shared across users.
210
+ * `online`: set to true if using USD exporter for online rendering. This value
211
+ is set to true when rendering with Isaac Sim. If online is set to true, shareable must be false.
212
+ * `framerate`: framerate of the exported scene when rendered
213
+ * `camera_names`: list of fixed cameras defined in the mujoco model to render.
214
+ * `stage`: predefined stage to add objects in the scene to.
215
+ * `verbose`: decides whether to print updates.
216
+
217
+ `USDExporter` is adapted from [MuJoCo](https://github.com/google-deepmind/mujoco). In order to add a new frame in the outputted USD trajectory, call `update_scene` in the `exporter` module.
218
+
219
+ ```python
220
+ exp = exporter.USDExporter(model=model, output_directory_name="usd_demo")
221
+ exp.update_scene(data)
222
+ ```
223
+
224
+ This updates all geoms in the scene with their current poses from simulation. To save a USD trajectory, use the `save_scene` method.
225
+
226
+ ```python
227
+ exp.save_scene(filetype="usd")
228
+ ```
229
+
230
+ Users are able to save scenes as .usd, .usda, or .usdc files. For a more comprehensive example of the USD renderer, please refer to the [`demo_usd_export.py`]() script. This demonstration allows users to teleoperate a robot with a device (i.e. keyboard or spacemouse) and save the collected trajectory as a USD file.
docs/index.rst ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .. robosuite documentation master file, created by
2
+ sphinx-quickstart on Sun Aug 16 10:05:44 2020.
3
+ You can adapt this file completely to your liking, but it should at least
4
+ contain the root `toctree` directive.
5
+
6
+ Welcome to robosuite's documentation!
7
+ =====================================
8
+
9
+ .. toctree::
10
+ :maxdepth: 1
11
+ :caption: Introduction
12
+
13
+ overview
14
+ installation
15
+ basicusage
16
+ demos
17
+
18
+ .. toctree::
19
+ :maxdepth: 1
20
+ :caption: Modules
21
+
22
+ modules/overview
23
+ modules/robots
24
+ modules/objects
25
+ modules/environments
26
+ modules/sensors
27
+ modules/devices
28
+ modules/renderers
29
+ modules/controllers
30
+
31
+ .. toctree::
32
+ :maxdepth: 1
33
+ :caption: Tutorials
34
+
35
+ tutorials/add_controller
36
+ tutorials/add_environment
37
+
38
+ .. toctree::
39
+ :maxdepth: 3
40
+ :caption: Simulation API
41
+
42
+ simulation/robot
43
+ simulation/environment
44
+ simulation/device
45
+ simulation/controller
46
+
47
+ .. toctree::
48
+ :maxdepth: 1
49
+ :caption: Modeling API
50
+
51
+ modeling/mujoco_model
52
+ modeling/robot_model
53
+ modeling/object_model
54
+ modeling/arena
55
+ modeling/task
56
+
57
+ .. toctree::
58
+ :maxdepth: 4
59
+ :caption: Source API
60
+
61
+ source/robosuite
62
+
63
+ .. toctree::
64
+ :maxdepth: 1
65
+ :caption: Algorithms
66
+
67
+ algorithms/benchmarking
68
+ algorithms/demonstrations
69
+ algorithms/sim2real
70
+
71
+ .. toctree::
72
+ :maxdepth: 1
73
+ :caption: Miscellaneous
74
+
75
+ references
76
+ changelog
77
+ acknowledgement
78
+
79
+ Indices and tables
80
+ ==================
81
+
82
+ * :ref:`genindex`
83
+ * :ref:`modindex`
84
+ * :ref:`search`
docs/installation.md ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Installation
2
+ **robosuite** officially supports macOS and Linux on Python 3. It can be run with an on-screen display for visualization or in a headless mode for model training, with or without a GPU.
3
+
4
+ The base installation requires the MuJoCo physics engine (with [mujoco](https://github.com/deepmind/mujoco), refer to link for troubleshooting the installation and further instructions) and [numpy](http://www.numpy.org/). To avoid interfering with system packages, it is recommended to install it under a virtual environment by first running `virtualenv -p python3 . && source bin/activate` or setting up a Conda environment by installing [Anaconda](https://www.anaconda.com/) and running `conda create -n robosuite python=3.10`.
5
+
6
+ ### Install from pip
7
+
8
+ **Note**: For users looking to use the most up-to-date code and develop customized features, it is recommended to install from source.
9
+
10
+ 1. After setting up mujoco, robosuite can be installed with
11
+ ```sh
12
+ $ pip install robosuite
13
+ ```
14
+
15
+ 2. Test your installation with
16
+ ```sh
17
+ $ python -m robosuite.demos.demo_random_action
18
+ ```
19
+
20
+ <div class="admonition warning">
21
+ <p class="admonition-title">Attention Mac users!</p>
22
+
23
+ Mac users who wish to use the default mjviewer renderer need to prepend the "python" command with "mj": `mjpython ...`
24
+ </div>
25
+
26
+ ### Install from source
27
+
28
+ 1. Clone the robosuite repository
29
+ ```sh
30
+ $ git clone https://github.com/ARISE-Initiative/robosuite.git
31
+ $ cd robosuite
32
+ ```
33
+
34
+ 2. Install the base requirements with
35
+ ```sh
36
+ $ pip3 install -r requirements.txt
37
+ ```
38
+ This will also install our library as an editable package, such that local changes will be reflected elsewhere without having to reinstall the package.
39
+
40
+ 3. (Optional) We also provide add-on functionalities, such as [OpenAI Gym](https://github.com/openai/gym) [interfaces](source/robosuite.wrappers), [inverse kinematics controllers](source/robosuite.controllers) powered by [PyBullet](http://bulletphysics.org), and [teleoperation](source/robosuite.devices) with [SpaceMouse](https://www.3dconnexion.com/products/spacemouse.html) and [DualSense](https://www.playstation.com/en-us/accessories/dualsense-wireless-controller/) devices. To enable these additional features, please install the extra dependencies by running
41
+ ```sh
42
+ $ pip3 install -r requirements-extra.txt
43
+ ```
44
+
45
+ 4. Test your installation with
46
+ ```sh
47
+ $ python robosuite/demos/demo_random_action.py
48
+ ```
49
+
50
+ <div class="admonition warning">
51
+ <p class="admonition-title">Attention Mac users!</p>
52
+
53
+ Mac users who wish to use the default mjviewer renderer need to prepend the "python" command with "mj": `mjpython ...`
54
+ </div>
55
+
56
+ ### Installing on Windows
57
+
58
+ It is common to run into issues when installing **robosuite** on a Windows machine. **robosuite** can be installed on Windows using the following steps.
59
+
60
+ 1. Either follow step 1 from the section [Install from pip](#install-from-pip) or steps 1 and 2 in the section [Install from source](#install-from-source). During this process, you may run into some errors. Please refer to the steps below on how to fix these.
61
+
62
+ 2. If you run into the error `FileNotFoundError: [Errno 2] No such file or directory: 'C:\\tmp\\robosuite.log'`, create a directory called `tmp` under `C:\`.
63
+
64
+ 3. You will also likely face the issue of `mujoco.dll not found`. If you are running in a conda environment (highly recommended), go to the location where your packages are installed (i.e. site-packages). If you are unsure where the MuJoCo package is located, open a new python shell and run the following.
65
+
66
+ ```python
67
+ import mujoco
68
+ print(mujoco.__path__)
69
+ ```
70
+
71
+ If the MuJoCo package does not already exists, install it by running
72
+
73
+ ```sh
74
+ $ pip install mujoco
75
+ ```
76
+
77
+ Within the MuJoCo package, there should be a file called `mujoco.dll`. If you installed robosuite using pip, copy and paste this file into `anaconda3\envs\{your env name}\Lib\site-packages\robosuite\utils `. If you installed robosuite from source, copy and paste this file directly into `robosuite\utils`.
78
+
79
+ 4. You may also get an `EGL` issue. If this happens, please go into `robosuite\utils\binding_utils.py` (either in site-packages or in cloned repository depending on whether you installed from pip or source) and change `"egl"` to `"wgl"` at line 43. It should look like this:
80
+
81
+ ```python
82
+ if _SYSTEM == "Darwin":
83
+ os.environ["MUJOCO_GL"] = "cgl"
84
+ else:
85
+ os.environ["MUJOCO_GL"] = "wgl"
86
+ ```
87
+
88
+ 5. Test your **robosuite** installation by running
89
+
90
+ ```sh
91
+ $ python robosuite/demos/demo_random_action.py
92
+ ```
docs/overview.md ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Overview
2
+
3
+ ![gallery of_environments](images/gallery.png)
4
+
5
+
6
+ **robosuite** is a simulation framework powered by the [MuJoCo](http://mujoco.org/) physics engine for robot learning. It also offers a suite of benchmark environments for reproducible research. The current release (v1.5) features support for diverse robot embodiments (including humanoids), custom robot composition, composite controllers (including whole body controllers), more teleoperation devices, photo-realistic rendering. This project is part of the broader [Advancing Robot Intelligence through Simulated Environments (ARISE) Initiative](https://github.com/ARISE-Initiative), with the aim of lowering the barriers of entry for cutting-edge research at the intersection of AI and Robotics.
7
+
8
+ Data-driven algorithms, such as reinforcement learning and imitation learning, provide a powerful and generic tool in robotics. These learning paradigms, fueled by new advances in deep learning, have achieved some exciting successes in a variety of robot control problems. However, the challenges of reproducibility and the limited accessibility of robot hardware have impaired research progress. The overarching goal of **robosuite** is to provide researchers with:
9
+
10
+ * a standardized set of benchmarking tasks for rigorous evaluation and algorithm development;
11
+ * a modular design that offers great flexibility in designing new robot simulation environments;
12
+ * a high-quality implementation of robot controllers and off-the-shelf learning algorithms to lower the barriers to entry.
13
+
14
+ This framework was originally developed in late 2017 by researchers in [Stanford Vision and Learning Lab](http://svl.stanford.edu) (SVL) as an internal tool for robot learning research. Now, it is actively maintained and used for robotics research projects in SVL, the [UT Robot Perception and Learning Lab](http://rpl.cs.utexas.edu) (RPL) and NVIDIA [Generalist Embodied Agent Research Group](https://research.nvidia.com/labs/gear/) (GEAR). We welcome community contributions to this project. For details, please check out our [contributing guidelines](CONTRIBUTING.md).
15
+
16
+ **Robosuite** offers a modular design of APIs for building new environments, robot embodiments, and robot controllers with procedural generation. We highlight these primary features below:
17
+
18
+ * **standardized tasks**: a set of standardized manipulation tasks of large diversity and varying complexity and RL benchmarking results for reproducible research;
19
+ * **procedural generation**: modular APIs for programmatically creating new environments and new tasks as combinations of robot models, arenas, and parameterized 3D objects. Check out our repo [robosuite_models](https://github.com/ARISE-Initiative/robosuite_models) for extra robot models tailored to robosuite.
20
+ * **robot controllers**: a selection of controller types to command the robots, such as joint-space velocity control, inverse kinematics control, operational space control, and whole body control;
21
+ * **teleoperation devices**: a selection of teleoperation devices including keyboard, spacemouse, dualsense and MuJoCo viewer drag-drop;
22
+ * **multi-modal sensors**: heterogeneous types of sensory signals, including low-level physical states, RGB cameras, depth maps, and proprioception;
23
+ * **human demonstrations**: utilities for collecting human demonstrations, replaying demonstration datasets, and leveraging demonstration data for learning. Check out our sister project [robomimic](https://arise-initiative.github.io/robomimic-web/);
24
+ * **photorealistic rendering**: integration with advanced graphics tools that provide real-time photorealistic renderings of simulated scenes, including support for NVIDIA Isaac Sim rendering.
25
+
26
+ ## Citation
27
+ Please cite [**robosuite**](https://robosuite.ai) if you use this framework in your publications:
28
+ ```bibtex
29
+ @inproceedings{robosuite2020,
30
+ title={robosuite: A Modular Simulation Framework and Benchmark for Robot Learning},
31
+ author={Yuke Zhu and Josiah Wong and Ajay Mandlekar and Roberto Mart\'{i}n-Mart\'{i}n and Abhishek Joshi and Kevin Lin and Abhiram Maddukuri and Soroush Nasiriany and Yifeng Zhu},
32
+ booktitle={arXiv preprint arXiv:2009.12293},
33
+ year={2020}
34
+ }
35
+ ```
docs/references.md ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ # Projects using robosuite
2
+
3
+ Link to list of references of projects and papers that use [**robosuite**](https://scholar.google.com/scholar?oi=bibs&hl=en&cites=10588857002863609969&as_sdt=5)
4
+
docs/simulation/controller.rst ADDED
@@ -0,0 +1,210 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Controller
2
+ ==========
3
+
4
+ Every ``Robot`` is equipped with a controller, which determines both the action space as well as how its
5
+ values are mapped into command torques. By default, all controllers have a pre-defined set of methods and
6
+ properities, though specific controllers may extend and / or override the default functionality found in
7
+ the base class.
8
+
9
+
10
+
11
+ Composite Controllers
12
+ ----------------------
13
+ Composite controllers are controllers that are composed of multiple sub-controllers. They are used to control the entire robot, including all of its parts. What happens is that when an action vector is commanded to the robot, the action will be split into multipl sub-actions, each of which will be sent to the corresponding sub-controller. To understand the action split, use the function `robosuite.robots.robot.print_action_info()`. To create the action easily, we also provide a helper function `robosuite.robots.robot.create_action_vector()` which takes the action dictionary as inputs and return the action vector with correct dimensions. For controller actions whose input dimentions does not match the robot's degrees of freedoms, you need to write your own `create_action_vector()` function inside the custom composite controller so that the robot's function can retrieve the information properly.
14
+
15
+ Composite Controller (Base class)
16
+ *********************************
17
+ .. autoclass:: robosuite.controllers.composite.composite_controller.CompositeController
18
+
19
+ .. automethod:: load_controller_config
20
+ .. automethod:: _init_controllers
21
+ .. automethod:: _validate_composite_controller_specific_config
22
+ .. automethod:: setup_action_split_idx
23
+ .. automethod:: set_goal
24
+ .. automethod:: reset
25
+ .. automethod:: run_controller
26
+ .. automethod:: get_control_dim
27
+ .. automethod:: get_controller_base_pose
28
+ .. automethod:: update_state
29
+ .. automethod:: get_controller
30
+ .. autoproperty:: action_limits
31
+
32
+ HybridMobileBase
33
+ ****************
34
+ .. autoclass:: robosuite.controllers.composite.composite_controller.HybridMobileBase
35
+
36
+ .. automethod:: set_goal
37
+ .. autoproperty:: action_limits
38
+ .. automethod:: create_action_vector
39
+
40
+ WholeBody
41
+ *********
42
+ .. autoclass:: robosuite.controllers.composite.composite_controller.WholeBody
43
+
44
+ .. automethod:: _init_controllers
45
+ .. automethod:: _init_joint_action_policy
46
+ .. automethod:: setup_action_split_idx
47
+ .. automethod:: setup_whole_body_controller_action_split_idx
48
+ .. automethod:: set_goal
49
+ .. automethod:: update_state
50
+ .. autoproperty:: action_limits
51
+ .. automethod:: create_action_vector
52
+ .. automethod:: print_action_info
53
+ .. automethod:: print_action_info_dict
54
+
55
+ WholeBodyIK
56
+ ***********
57
+ .. autoclass:: robosuite.controllers.composite.composite_controller.WholeBodyIK
58
+
59
+ .. automethod:: _validate_composite_controller_specific_config
60
+ .. automethod:: _init_joint_action_policy
61
+
62
+
63
+
64
+
65
+ Part Controllers
66
+ -----------------
67
+ Part controllers are equivalent to controllers in robosuite up to `v1.4`. Starting from `v1.5`, we need to accommodate the diverse embodiments, and the original controllers are changed to controllers for specific parts, such as arms, heads, legs, torso, etc.
68
+
69
+ Controller (Base class)
70
+ ************************
71
+ .. autoclass:: robosuite.controllers.parts.controller.Controller
72
+
73
+ .. automethod:: run_controller
74
+ .. automethod:: scale_action
75
+ .. automethod:: update_reference_data
76
+ .. automethod:: _update_single_reference
77
+ .. automethod:: update
78
+ .. automethod:: update_base_pose
79
+ .. automethod:: update_origin
80
+ .. automethod:: update_initial_joints
81
+ .. automethod:: clip_torques
82
+ .. automethod:: reset_goal
83
+ .. automethod:: nums2array
84
+ .. autoproperty:: torque_compensation
85
+ .. autoproperty:: actuator_limits
86
+ .. autoproperty:: control_limits
87
+ .. autoproperty:: name
88
+
89
+ Joint Position Controller (generic)
90
+ ************************************
91
+ .. autoclass:: robosuite.controllers.parts.generic.joint_pos.JointPositionController
92
+
93
+ .. automethod:: update_base_pose
94
+ .. automethod:: set_goal
95
+ .. automethod:: run_controller
96
+ .. automethod:: reset_goal
97
+ .. autoproperty:: control_limits
98
+ .. autoproperty:: name
99
+
100
+ Joint Velocity Controller (generic)
101
+ ************************************
102
+ .. autoclass:: robosuite.controllers.parts.generic.joint_vel.JointVelocityController
103
+
104
+ .. automethod:: set_goal
105
+ .. automethod:: run_controller
106
+ .. automethod:: reset_goal
107
+ .. autoproperty:: name
108
+
109
+
110
+ Joint Torque Controller (generic)
111
+ **********************************
112
+ .. autoclass:: robosuite.controllers.parts.generic.joint_tor.JointTorqueController
113
+
114
+ .. automethod:: set_goal
115
+ .. automethod:: run_controller
116
+ .. automethod:: reset_goal
117
+ .. autoproperty:: name
118
+
119
+
120
+ Operational Space Controller (arm)
121
+ **********************************
122
+ .. autoclass:: osc.OperationalSpaceController
123
+
124
+ .. automethod:: set_goal
125
+ .. automethod:: world_to_origin_frame
126
+ .. automethod:: compute_goal_pos
127
+ .. automethod:: goal_origin_to_eef_pose
128
+ .. automethod:: compute_goal_orientation
129
+ .. automethod:: run_controller
130
+ .. automethod:: update_origin
131
+ .. automethod:: update_initial_joints
132
+ .. automethod:: reset_goal
133
+ .. autoproperty:: control_limits
134
+ .. autoproperty:: nam
135
+
136
+
137
+ Inverse Kinematics Controller (arm)
138
+ ************************************
139
+ .. autoclass:: robosuite.controllers.parts.arm.ik.InverseKinematicsController
140
+
141
+ .. automethod:: get_control
142
+ .. automethod:: compute_joint_positions
143
+ .. automethod:: set_goal
144
+ .. automethod:: run_controller
145
+ .. automethod:: update_initial_joints
146
+ .. automethod:: reset_goal
147
+ .. automethod:: _clip_ik_input
148
+ .. automethod:: _make_input
149
+ .. automethod:: _get_current_error
150
+ .. autoproperty:: control_limits
151
+ .. autoproperty:: name
152
+
153
+
154
+ Mobile Base Controller (mobile base)
155
+ *************************************
156
+ .. autoclass:: robosuite.controllers.parts.mobile_base.mobile_base_controller.MobileBaseController
157
+
158
+ .. automethod:: get_base_pose
159
+ .. automethod:: reset
160
+ .. automethod:: run_controller
161
+ .. automethod:: scale_action
162
+ .. automethod:: update
163
+ .. automethod:: update_initial_joints
164
+ .. automethod:: clip_torques
165
+ .. automethod:: reset_goal
166
+ .. automethod:: nums2array
167
+ .. autoproperty:: torque_compensation
168
+ .. autoproperty:: actuator_limits
169
+ .. autoproperty:: control_limits
170
+ .. autoproperty:: name
171
+
172
+
173
+ Mobile Base Joint Velocity Controller (mobile base)
174
+ ****************************************************
175
+ .. autoclass:: robosuite.controllers.parts.mobile_base.joint_vel.MobileBaseJointVelocityController
176
+
177
+ .. automethod:: set_goal
178
+ .. automethod:: run_controller
179
+ .. automethod:: reset_goal
180
+ .. autoproperty:: control_limits
181
+ .. autoproperty:: name
182
+
183
+
184
+ Gripper Controller (base class)
185
+ ********************************
186
+ .. autoclass:: robosuite.controllers.parts.gripper.gripper_controller.GripperController
187
+
188
+ .. automethod:: run_controller
189
+ .. automethod:: scale_action
190
+ .. automethod:: update
191
+ .. automethod:: update_base_pose
192
+ .. automethod:: update_initial_joints
193
+ .. automethod:: clip_torques
194
+ .. automethod:: reset_goal
195
+ .. automethod:: nums2array
196
+ .. autoproperty:: torque_compensation
197
+ .. autoproperty:: actuator_limits
198
+ .. autoproperty:: control_limits
199
+ .. autoproperty:: name
200
+
201
+
202
+ Simple Grip Controller (gripper)
203
+ *********************************
204
+ .. autoclass:: robosuite.controllers.parts.gripper.simple_grip.SimpleGripController
205
+
206
+ .. automethod:: set_goal
207
+ .. automethod:: run_controller
208
+ .. automethod:: reset_goal
209
+ .. autoproperty:: control_limits
210
+ .. autoproperty:: name
docs/simulation/device.rst ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Device
2
+ ======
3
+
4
+ Devices allow for direct real-time interfacing with the MuJoCo simulation. The currently supported devices are ``Keyboard``. ``SpaceMouse``. ``DualSense`` and ``MjGUI``.
5
+
6
+ Base Device
7
+ -----------
8
+
9
+ .. autoclass:: robosuite.devices.device.Device
10
+
11
+ .. automethod:: start_control
12
+ .. automethod:: get_controller_state
13
+
14
+
15
+ Keyboard Device
16
+ ---------------
17
+
18
+ .. autoclass:: robosuite.devices.keyboard.Keyboard
19
+
20
+ .. automethod:: get_controller_state
21
+ .. automethod:: on_press
22
+ .. automethod:: on_release
23
+ .. automethod:: _display_controls
24
+
25
+
26
+ SpaceMouse Device
27
+ -----------------
28
+
29
+ .. autoclass:: robosuite.devices.spacemouse.SpaceMouse
30
+
31
+ .. automethod:: get_controller_state
32
+ .. automethod:: run
33
+ .. automethod:: control
34
+ .. automethod:: control_gripper
35
+ .. automethod:: _display_controls
36
+
37
+ DualSense Device
38
+ -----------------
39
+
40
+ .. autoclass:: robosuite.devices.dualsense.DualSense
41
+
42
+ .. automethod:: get_controller_state
43
+ .. automethod:: run
44
+ .. automethod:: control
45
+ .. automethod:: control_gripper
46
+ .. automethod:: _display_controls
47
+ .. automethod:: _check_connection_type
48
+
49
+ MjGUI Device
50
+ ------------
51
+ .. autoclass:: robosuite.devices.mjgui.MJGUI
52
+
53
+ .. automethod:: get_controller_state
54
+ .. automethod:: input2action
55
+ .. automethod:: _display_controls
docs/simulation/environment.rst ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Environment
2
+ ===========
3
+
4
+ The ``MujocoEnv`` class defines a top-level simulation object encapsulating a ``MjSim`` object. Robosuite uses
5
+ class extensions of this base class, namely, ``RobotEnv`` which additionally encompasses ``Robot`` objects and the top-level
6
+ task environments which capture specific ``ManipulationTask`` instances and additional objects.
7
+
8
+ Base Environment
9
+ ----------------
10
+
11
+ .. autoclass:: robosuite.environments.base.MujocoEnv
12
+
13
+ .. automethod:: initialize_time
14
+ .. automethod:: reset
15
+ .. automethod:: step
16
+ .. automethod:: reward
17
+ .. automethod:: render
18
+ .. automethod:: observation_spec
19
+ .. automethod:: clear_objects
20
+ .. automethod:: visualize
21
+ .. automethod:: reset_from_xml_string
22
+ .. automethod:: check_contact
23
+ .. automethod:: get_contacts
24
+ .. automethod:: modify_observable
25
+ .. automethod:: close
26
+ .. autoproperty:: observation_modalities
27
+ .. autoproperty:: observation_names
28
+ .. autoproperty:: enabled_observables
29
+ .. autoproperty:: active_observables
30
+ .. autoproperty:: action_spec
31
+ .. autoproperty:: action_dim
32
+
33
+
34
+ Robot Environment
35
+ -----------------
36
+
37
+ .. autoclass:: robosuite.environments.robot_env.RobotEnv
38
+
39
+ .. automethod:: _load_robots
40
+ .. automethod:: _check_robot_configuration
41
+
42
+
43
+ Manipulator Environment
44
+ -----------------------
45
+
46
+ .. autoclass:: robosuite.environments.manipulation.manipulation_env.ManipulationEnv
47
+
48
+ .. automethod:: _check_grasp
49
+ .. automethod:: _gripper_to_target
50
+ .. automethod:: _visualize_gripper_to_target
docs/simulation/robot.rst ADDED
@@ -0,0 +1,137 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Robot
2
+ =====
3
+
4
+ The ``Robot`` class defines a simulation object encapsulating a robot model, gripper model, base model, and controller. Robosuite uses class extensions of this base class to model different robotic domains. The current release focuses on manipulation and mobility, and includes a ``MobileRobot`` class, which itself is extended by ``WheeledRobot`` and ``LeggedRobot`` classes representing different types of mobile robots.
5
+
6
+ Base Robot
7
+ ----------
8
+ .. autoclass:: robosuite.robots.robot.Robot
9
+
10
+ .. automethod:: _load_controller
11
+ .. automethod:: _postprocess_part_controller_config
12
+ .. automethod:: load_model
13
+ .. automethod:: reset_sim
14
+ .. automethod:: reset
15
+ .. automethod:: setup_references
16
+ .. automethod:: setup_observables
17
+ .. automethod:: _create_arm_sensors
18
+ .. automethod:: _create_base_sensors
19
+ .. automethod:: control
20
+ .. automethod:: check_q_limits
21
+ .. autoproperty:: is_mobile
22
+ .. autoproperty:: action_limits
23
+ .. automethod:: _input2dict
24
+ .. autoproperty:: torque_limits
25
+ .. autoproperty:: action_dim
26
+ .. autoproperty:: dof
27
+ .. automethod:: pose_in_base_from_name
28
+ .. automethod:: set_robot_joint_positions
29
+ .. autoproperty:: js_energy
30
+ .. autoproperty:: _joint_positions
31
+ .. autoproperty:: _joint_velocities
32
+ .. autoproperty:: joint_indexes
33
+ .. autoproperty:: arm_joint_indexes
34
+ .. automethod:: get_sensor_measurement
35
+ .. automethod:: visualize
36
+ .. automethod:: _visualize_grippers
37
+ .. autoproperty:: action_limits
38
+ .. autoproperty:: is_mobile
39
+ .. autoproperty:: ee_ft_integral
40
+ .. autoproperty:: ee_force
41
+ .. autoproperty:: ee_torque
42
+ .. autoproperty:: _hand_pose
43
+ .. autoproperty:: _hand_quat
44
+ .. autoproperty:: _hand_total_velocity
45
+ .. autoproperty:: _hand_pos
46
+ .. autoproperty:: _hand_orn
47
+ .. autoproperty:: _hand_vel
48
+ .. autoproperty:: _hand_ang_vel
49
+ .. automethod:: _load_arm_controllers
50
+ .. automethod:: enable_parts
51
+ .. automethod:: enabled
52
+ .. automethod:: create_action_vector
53
+ .. automethod:: print_action_info
54
+ .. automethod:: print_action_info_dict
55
+ .. automethod:: get_gripper_name
56
+ .. automethod:: has_part
57
+ .. autoproperty:: _joint_split_idx
58
+ .. autoproperty:: part_controllers
59
+
60
+
61
+ Fixed Base Robot
62
+ ----------------
63
+ Tabletop manipulators.
64
+
65
+ .. autoclass:: robosuite.robots.fixed_base_robot.FixedBaseRobot
66
+ Mobile Base Robot
67
+ -----------------
68
+
69
+ ``WheeledRobot`` and ``LeggedRobot`` are two types of mobile base robots supported in robosuite.
70
+
71
+ .. autoclass:: robosuite.robots.mobile_base_robot.MobileBaseRobot
72
+
73
+ .. automethod:: _load_controller
74
+ .. automethod:: load_model
75
+ .. automethod:: reset
76
+ .. automethod:: setup_references
77
+ .. automethod:: control
78
+ .. automethod:: setup_observables
79
+ .. autoproperty:: action_limits
80
+ .. autoproperty:: is_mobile
81
+ .. autoproperty:: _action_split_indexes
82
+
83
+ Mobile robot
84
+ -------------
85
+ Base class for wheeled and legged robots.
86
+
87
+ .. autoclass:: robosuite.robots.mobile_robot.MobileRobot
88
+
89
+ .. automethod:: _load_controller
90
+ .. automethod:: _load_base_controller
91
+ .. automethod:: _load_torso_controller
92
+ .. automethod:: _load_head_controller
93
+ .. automethod:: load_model
94
+ .. automethod:: reset
95
+ .. automethod:: setup_references
96
+ .. automethod:: control
97
+ .. automethod:: setup_observables
98
+ .. automethod:: _create_base_sensors
99
+ .. automethod:: enable_parts
100
+ .. autoproperty:: is_mobile
101
+ .. autoproperty:: base
102
+ .. autoproperty:: torso
103
+ .. autoproperty:: head
104
+ .. autoproperty:: legs
105
+ .. autoproperty:: _action_split_indexes
106
+
107
+ Wheeled Robot
108
+ -------------
109
+ Mobile robots with wheeled bases.
110
+
111
+ .. autoclass:: robosuite.robots.wheeled_robot.WheeledRobot
112
+
113
+ .. automethod:: _load_controller
114
+ .. automethod:: load_model
115
+ .. automethod:: reset
116
+ .. automethod:: setup_references
117
+ .. automethod:: control
118
+ .. automethod:: setup_observables
119
+ .. autoproperty:: action_limits
120
+
121
+
122
+ Legged Robot
123
+ ------------
124
+ Robots with legs.
125
+
126
+ .. autoclass:: robosuite.robots.legged_robot.LeggedRobot
127
+
128
+ .. automethod:: _load_leg_controllers
129
+ .. automethod:: _load_controller
130
+ .. automethod:: load_model
131
+ .. automethod:: reset
132
+ .. automethod:: setup_references
133
+ .. automethod:: control
134
+ .. automethod:: setup_observables
135
+ .. autoproperty:: action_limits
136
+ .. autoproperty:: is_legs_actuated
137
+ .. autoproperty:: num_leg_joints
docs/source/robosuite.controllers.composite.rst ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ robosuite.controllers.composite package
2
+ =======================================
3
+
4
+ Submodules
5
+ ----------
6
+
7
+ robosuite.controllers.composite.composite\_controller module
8
+ ------------------------------------------------------------
9
+
10
+ .. automodule:: robosuite.controllers.composite.composite_controller
11
+ :members:
12
+ :undoc-members:
13
+ :show-inheritance:
14
+
15
+ robosuite.controllers.composite.composite\_controller\_factory module
16
+ ---------------------------------------------------------------------
17
+
18
+ .. automodule:: robosuite.controllers.composite.composite_controller_factory
19
+ :members:
20
+ :undoc-members:
21
+ :show-inheritance:
22
+
23
+ Module contents
24
+ ---------------
25
+
26
+ .. automodule:: robosuite.controllers.composite
27
+ :members:
28
+ :undoc-members:
29
+ :show-inheritance:
docs/source/robosuite.controllers.parts.arm.rst ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ robosuite.controllers.parts.arm package
2
+ =======================================
3
+
4
+ Submodules
5
+ ----------
6
+
7
+ robosuite.controllers.parts.arm.ik module
8
+ -----------------------------------------
9
+
10
+ .. automodule:: robosuite.controllers.parts.arm.ik
11
+ :members:
12
+ :undoc-members:
13
+ :show-inheritance:
14
+
15
+ robosuite.controllers.parts.arm.osc module
16
+ ------------------------------------------
17
+
18
+ .. automodule:: robosuite.controllers.parts.arm.osc
19
+ :members:
20
+ :undoc-members:
21
+ :show-inheritance:
22
+
23
+ Module contents
24
+ ---------------
25
+
26
+ .. automodule:: robosuite.controllers.parts.arm
27
+ :members:
28
+ :undoc-members:
29
+ :show-inheritance:
docs/source/robosuite.controllers.parts.generic.rst ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ robosuite.controllers.parts.generic package
2
+ ===========================================
3
+
4
+ Submodules
5
+ ----------
6
+
7
+ robosuite.controllers.parts.generic.joint\_pos module
8
+ -----------------------------------------------------
9
+
10
+ .. automodule:: robosuite.controllers.parts.generic.joint_pos
11
+ :members:
12
+ :undoc-members:
13
+ :show-inheritance:
14
+
15
+ robosuite.controllers.parts.generic.joint\_tor module
16
+ -----------------------------------------------------
17
+
18
+ .. automodule:: robosuite.controllers.parts.generic.joint_tor
19
+ :members:
20
+ :undoc-members:
21
+ :show-inheritance:
22
+
23
+ robosuite.controllers.parts.generic.joint\_vel module
24
+ -----------------------------------------------------
25
+
26
+ .. automodule:: robosuite.controllers.parts.generic.joint_vel
27
+ :members:
28
+ :undoc-members:
29
+ :show-inheritance:
30
+
31
+ Module contents
32
+ ---------------
33
+
34
+ .. automodule:: robosuite.controllers.parts.generic
35
+ :members:
36
+ :undoc-members:
37
+ :show-inheritance:
docs/source/robosuite.controllers.parts.mobile_base.rst ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ robosuite.controllers.parts.mobile\_base package
2
+ ================================================
3
+
4
+ Submodules
5
+ ----------
6
+
7
+ robosuite.controllers.parts.mobile\_base.joint\_vel module
8
+ ----------------------------------------------------------
9
+
10
+ .. automodule:: robosuite.controllers.parts.mobile_base.joint_vel
11
+ :members:
12
+ :undoc-members:
13
+ :show-inheritance:
14
+
15
+ robosuite.controllers.parts.mobile\_base.mobile\_base\_controller module
16
+ ------------------------------------------------------------------------
17
+
18
+ .. automodule:: robosuite.controllers.parts.mobile_base.mobile_base_controller
19
+ :members:
20
+ :undoc-members:
21
+ :show-inheritance:
22
+
23
+ Module contents
24
+ ---------------
25
+
26
+ .. automodule:: robosuite.controllers.parts.mobile_base
27
+ :members:
28
+ :undoc-members:
29
+ :show-inheritance:
docs/source/robosuite.devices.rst ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ robosuite.devices package
2
+ =========================
3
+
4
+ Submodules
5
+ ----------
6
+
7
+ robosuite.devices.device module
8
+ -------------------------------
9
+
10
+ .. automodule:: robosuite.devices.device
11
+ :members:
12
+ :undoc-members:
13
+ :show-inheritance:
14
+
15
+ robosuite.devices.dualsense module
16
+ ----------------------------------
17
+
18
+ .. automodule:: robosuite.devices.dualsense
19
+ :members:
20
+ :undoc-members:
21
+ :show-inheritance:
22
+
23
+ robosuite.devices.keyboard module
24
+ ---------------------------------
25
+
26
+ .. automodule:: robosuite.devices.keyboard
27
+ :members:
28
+ :undoc-members:
29
+ :show-inheritance:
30
+
31
+ robosuite.devices.mjgui module
32
+ ------------------------------
33
+
34
+ .. automodule:: robosuite.devices.mjgui
35
+ :members:
36
+ :undoc-members:
37
+ :show-inheritance:
38
+
39
+ robosuite.devices.spacemouse module
40
+ -----------------------------------
41
+
42
+ .. automodule:: robosuite.devices.spacemouse
43
+ :members:
44
+ :undoc-members:
45
+ :show-inheritance:
46
+
47
+ Module contents
48
+ ---------------
49
+
50
+ .. automodule:: robosuite.devices
51
+ :members:
52
+ :undoc-members:
53
+ :show-inheritance:
docs/source/robosuite.environments.manipulation.rst ADDED
@@ -0,0 +1,117 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ robosuite.environments.manipulation package
2
+ ===========================================
3
+
4
+ Submodules
5
+ ----------
6
+
7
+ robosuite.environments.manipulation.door module
8
+ -----------------------------------------------
9
+
10
+ .. automodule:: robosuite.environments.manipulation.door
11
+ :members:
12
+ :undoc-members:
13
+ :show-inheritance:
14
+
15
+ robosuite.environments.manipulation.lift module
16
+ -----------------------------------------------
17
+
18
+ .. automodule:: robosuite.environments.manipulation.lift
19
+ :members:
20
+ :undoc-members:
21
+ :show-inheritance:
22
+
23
+ robosuite.environments.manipulation.manipulation\_env module
24
+ ------------------------------------------------------------
25
+
26
+ .. automodule:: robosuite.environments.manipulation.manipulation_env
27
+ :members:
28
+ :undoc-members:
29
+ :show-inheritance:
30
+
31
+ robosuite.environments.manipulation.nut\_assembly module
32
+ --------------------------------------------------------
33
+
34
+ .. automodule:: robosuite.environments.manipulation.nut_assembly
35
+ :members:
36
+ :undoc-members:
37
+ :show-inheritance:
38
+
39
+ robosuite.environments.manipulation.pick\_place module
40
+ ------------------------------------------------------
41
+
42
+ .. automodule:: robosuite.environments.manipulation.pick_place
43
+ :members:
44
+ :undoc-members:
45
+ :show-inheritance:
46
+
47
+ robosuite.environments.manipulation.stack module
48
+ ------------------------------------------------
49
+
50
+ .. automodule:: robosuite.environments.manipulation.stack
51
+ :members:
52
+ :undoc-members:
53
+ :show-inheritance:
54
+
55
+ robosuite.environments.manipulation.tool\_hang module
56
+ -----------------------------------------------------
57
+
58
+ .. automodule:: robosuite.environments.manipulation.tool_hang
59
+ :members:
60
+ :undoc-members:
61
+ :show-inheritance:
62
+
63
+ robosuite.environments.manipulation.two\_arm\_env module
64
+ --------------------------------------------------------
65
+
66
+ .. automodule:: robosuite.environments.manipulation.two_arm_env
67
+ :members:
68
+ :undoc-members:
69
+ :show-inheritance:
70
+
71
+ robosuite.environments.manipulation.two\_arm\_handover module
72
+ -------------------------------------------------------------
73
+
74
+ .. automodule:: robosuite.environments.manipulation.two_arm_handover
75
+ :members:
76
+ :undoc-members:
77
+ :show-inheritance:
78
+
79
+ robosuite.environments.manipulation.two\_arm\_lift module
80
+ ---------------------------------------------------------
81
+
82
+ .. automodule:: robosuite.environments.manipulation.two_arm_lift
83
+ :members:
84
+ :undoc-members:
85
+ :show-inheritance:
86
+
87
+ robosuite.environments.manipulation.two\_arm\_peg\_in\_hole module
88
+ ------------------------------------------------------------------
89
+
90
+ .. automodule:: robosuite.environments.manipulation.two_arm_peg_in_hole
91
+ :members:
92
+ :undoc-members:
93
+ :show-inheritance:
94
+
95
+ robosuite.environments.manipulation.two\_arm\_transport module
96
+ --------------------------------------------------------------
97
+
98
+ .. automodule:: robosuite.environments.manipulation.two_arm_transport
99
+ :members:
100
+ :undoc-members:
101
+ :show-inheritance:
102
+
103
+ robosuite.environments.manipulation.wipe module
104
+ -----------------------------------------------
105
+
106
+ .. automodule:: robosuite.environments.manipulation.wipe
107
+ :members:
108
+ :undoc-members:
109
+ :show-inheritance:
110
+
111
+ Module contents
112
+ ---------------
113
+
114
+ .. automodule:: robosuite.environments.manipulation
115
+ :members:
116
+ :undoc-members:
117
+ :show-inheritance:
docs/source/robosuite.models.grippers.rst ADDED
@@ -0,0 +1,125 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ robosuite.models.grippers package
2
+ =================================
3
+
4
+ Submodules
5
+ ----------
6
+
7
+ robosuite.models.grippers.bd\_gripper module
8
+ --------------------------------------------
9
+
10
+ .. automodule:: robosuite.models.grippers.bd_gripper
11
+ :members:
12
+ :undoc-members:
13
+ :show-inheritance:
14
+
15
+ robosuite.models.grippers.fourier\_hands module
16
+ -----------------------------------------------
17
+
18
+ .. automodule:: robosuite.models.grippers.fourier_hands
19
+ :members:
20
+ :undoc-members:
21
+ :show-inheritance:
22
+
23
+ robosuite.models.grippers.gripper\_factory module
24
+ -------------------------------------------------
25
+
26
+ .. automodule:: robosuite.models.grippers.gripper_factory
27
+ :members:
28
+ :undoc-members:
29
+ :show-inheritance:
30
+
31
+ robosuite.models.grippers.gripper\_model module
32
+ -----------------------------------------------
33
+
34
+ .. automodule:: robosuite.models.grippers.gripper_model
35
+ :members:
36
+ :undoc-members:
37
+ :show-inheritance:
38
+
39
+ robosuite.models.grippers.gripper\_tester module
40
+ ------------------------------------------------
41
+
42
+ .. automodule:: robosuite.models.grippers.gripper_tester
43
+ :members:
44
+ :undoc-members:
45
+ :show-inheritance:
46
+
47
+ robosuite.models.grippers.inspire\_hands module
48
+ -----------------------------------------------
49
+
50
+ .. automodule:: robosuite.models.grippers.inspire_hands
51
+ :members:
52
+ :undoc-members:
53
+ :show-inheritance:
54
+
55
+ robosuite.models.grippers.jaco\_three\_finger\_gripper module
56
+ -------------------------------------------------------------
57
+
58
+ .. automodule:: robosuite.models.grippers.jaco_three_finger_gripper
59
+ :members:
60
+ :undoc-members:
61
+ :show-inheritance:
62
+
63
+ robosuite.models.grippers.null\_gripper module
64
+ ----------------------------------------------
65
+
66
+ .. automodule:: robosuite.models.grippers.null_gripper
67
+ :members:
68
+ :undoc-members:
69
+ :show-inheritance:
70
+
71
+ robosuite.models.grippers.panda\_gripper module
72
+ -----------------------------------------------
73
+
74
+ .. automodule:: robosuite.models.grippers.panda_gripper
75
+ :members:
76
+ :undoc-members:
77
+ :show-inheritance:
78
+
79
+ robosuite.models.grippers.rethink\_gripper module
80
+ -------------------------------------------------
81
+
82
+ .. automodule:: robosuite.models.grippers.rethink_gripper
83
+ :members:
84
+ :undoc-members:
85
+ :show-inheritance:
86
+
87
+ robosuite.models.grippers.robotiq\_140\_gripper module
88
+ ------------------------------------------------------
89
+
90
+ .. automodule:: robosuite.models.grippers.robotiq_140_gripper
91
+ :members:
92
+ :undoc-members:
93
+ :show-inheritance:
94
+
95
+ robosuite.models.grippers.robotiq\_85\_gripper module
96
+ -----------------------------------------------------
97
+
98
+ .. automodule:: robosuite.models.grippers.robotiq_85_gripper
99
+ :members:
100
+ :undoc-members:
101
+ :show-inheritance:
102
+
103
+ robosuite.models.grippers.robotiq\_three\_finger\_gripper module
104
+ ----------------------------------------------------------------
105
+
106
+ .. automodule:: robosuite.models.grippers.robotiq_three_finger_gripper
107
+ :members:
108
+ :undoc-members:
109
+ :show-inheritance:
110
+
111
+ robosuite.models.grippers.wiping\_gripper module
112
+ ------------------------------------------------
113
+
114
+ .. automodule:: robosuite.models.grippers.wiping_gripper
115
+ :members:
116
+ :undoc-members:
117
+ :show-inheritance:
118
+
119
+ Module contents
120
+ ---------------
121
+
122
+ .. automodule:: robosuite.models.grippers
123
+ :members:
124
+ :undoc-members:
125
+ :show-inheritance:
docs/source/robosuite.models.mounts.rst ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ robosuite.models.mounts package
2
+ ===============================
3
+
4
+ Submodules
5
+ ----------
6
+
7
+ robosuite.models.mounts.mount\_factory module
8
+ ---------------------------------------------
9
+
10
+ .. automodule:: robosuite.models.mounts.mount_factory
11
+ :members:
12
+ :undoc-members:
13
+ :show-inheritance:
14
+
15
+ robosuite.models.mounts.mount\_model module
16
+ -------------------------------------------
17
+
18
+ .. automodule:: robosuite.models.mounts.mount_model
19
+ :members:
20
+ :undoc-members:
21
+ :show-inheritance:
22
+
23
+ robosuite.models.mounts.null\_mount module
24
+ ------------------------------------------
25
+
26
+ .. automodule:: robosuite.models.mounts.null_mount
27
+ :members:
28
+ :undoc-members:
29
+ :show-inheritance:
30
+
31
+ robosuite.models.mounts.rethink\_minimal\_mount module
32
+ ------------------------------------------------------
33
+
34
+ .. automodule:: robosuite.models.mounts.rethink_minimal_mount
35
+ :members:
36
+ :undoc-members:
37
+ :show-inheritance:
38
+
39
+ robosuite.models.mounts.rethink\_mount module
40
+ ---------------------------------------------
41
+
42
+ .. automodule:: robosuite.models.mounts.rethink_mount
43
+ :members:
44
+ :undoc-members:
45
+ :show-inheritance:
46
+
47
+ Module contents
48
+ ---------------
49
+
50
+ .. automodule:: robosuite.models.mounts
51
+ :members:
52
+ :undoc-members:
53
+ :show-inheritance:
docs/source/robosuite.models.objects.composite.rst ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ robosuite.models.objects.composite package
2
+ ==========================================
3
+
4
+ Submodules
5
+ ----------
6
+
7
+ robosuite.models.objects.composite.bin module
8
+ ---------------------------------------------
9
+
10
+ .. automodule:: robosuite.models.objects.composite.bin
11
+ :members:
12
+ :undoc-members:
13
+ :show-inheritance:
14
+
15
+ robosuite.models.objects.composite.cone module
16
+ ----------------------------------------------
17
+
18
+ .. automodule:: robosuite.models.objects.composite.cone
19
+ :members:
20
+ :undoc-members:
21
+ :show-inheritance:
22
+
23
+ robosuite.models.objects.composite.hammer module
24
+ ------------------------------------------------
25
+
26
+ .. automodule:: robosuite.models.objects.composite.hammer
27
+ :members:
28
+ :undoc-members:
29
+ :show-inheritance:
30
+
31
+ robosuite.models.objects.composite.hollow\_cylinder module
32
+ ----------------------------------------------------------
33
+
34
+ .. automodule:: robosuite.models.objects.composite.hollow_cylinder
35
+ :members:
36
+ :undoc-members:
37
+ :show-inheritance:
38
+
39
+ robosuite.models.objects.composite.hook\_frame module
40
+ -----------------------------------------------------
41
+
42
+ .. automodule:: robosuite.models.objects.composite.hook_frame
43
+ :members:
44
+ :undoc-members:
45
+ :show-inheritance:
46
+
47
+ robosuite.models.objects.composite.lid module
48
+ ---------------------------------------------
49
+
50
+ .. automodule:: robosuite.models.objects.composite.lid
51
+ :members:
52
+ :undoc-members:
53
+ :show-inheritance:
54
+
55
+ robosuite.models.objects.composite.pot\_with\_handles module
56
+ ------------------------------------------------------------
57
+
58
+ .. automodule:: robosuite.models.objects.composite.pot_with_handles
59
+ :members:
60
+ :undoc-members:
61
+ :show-inheritance:
62
+
63
+ robosuite.models.objects.composite.stand\_with\_mount module
64
+ ------------------------------------------------------------
65
+
66
+ .. automodule:: robosuite.models.objects.composite.stand_with_mount
67
+ :members:
68
+ :undoc-members:
69
+ :show-inheritance:
70
+
71
+ Module contents
72
+ ---------------
73
+
74
+ .. automodule:: robosuite.models.objects.composite
75
+ :members:
76
+ :undoc-members:
77
+ :show-inheritance:
docs/source/robosuite.models.objects.group.rst ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ robosuite.models.objects.group package
2
+ ======================================
3
+
4
+ Submodules
5
+ ----------
6
+
7
+ robosuite.models.objects.group.transport module
8
+ -----------------------------------------------
9
+
10
+ .. automodule:: robosuite.models.objects.group.transport
11
+ :members:
12
+ :undoc-members:
13
+ :show-inheritance:
14
+
15
+ Module contents
16
+ ---------------
17
+
18
+ .. automodule:: robosuite.models.objects.group
19
+ :members:
20
+ :undoc-members:
21
+ :show-inheritance:
docs/source/robosuite.models.robots.manipulators.rst ADDED
@@ -0,0 +1,125 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ robosuite.models.robots.manipulators package
2
+ ============================================
3
+
4
+ Submodules
5
+ ----------
6
+
7
+ robosuite.models.robots.manipulators.baxter\_robot module
8
+ ---------------------------------------------------------
9
+
10
+ .. automodule:: robosuite.models.robots.manipulators.baxter_robot
11
+ :members:
12
+ :undoc-members:
13
+ :show-inheritance:
14
+
15
+ robosuite.models.robots.manipulators.gr1\_robot module
16
+ ------------------------------------------------------
17
+
18
+ .. automodule:: robosuite.models.robots.manipulators.gr1_robot
19
+ :members:
20
+ :undoc-members:
21
+ :show-inheritance:
22
+
23
+ robosuite.models.robots.manipulators.humanoid\_model module
24
+ -----------------------------------------------------------
25
+
26
+ .. automodule:: robosuite.models.robots.manipulators.humanoid_model
27
+ :members:
28
+ :undoc-members:
29
+ :show-inheritance:
30
+
31
+ robosuite.models.robots.manipulators.humanoid\_upperbody\_model module
32
+ ----------------------------------------------------------------------
33
+
34
+ .. automodule:: robosuite.models.robots.manipulators.humanoid_upperbody_model
35
+ :members:
36
+ :undoc-members:
37
+ :show-inheritance:
38
+
39
+ robosuite.models.robots.manipulators.iiwa\_robot module
40
+ -------------------------------------------------------
41
+
42
+ .. automodule:: robosuite.models.robots.manipulators.iiwa_robot
43
+ :members:
44
+ :undoc-members:
45
+ :show-inheritance:
46
+
47
+ robosuite.models.robots.manipulators.jaco\_robot module
48
+ -------------------------------------------------------
49
+
50
+ .. automodule:: robosuite.models.robots.manipulators.jaco_robot
51
+ :members:
52
+ :undoc-members:
53
+ :show-inheritance:
54
+
55
+ robosuite.models.robots.manipulators.kinova3\_robot module
56
+ ----------------------------------------------------------
57
+
58
+ .. automodule:: robosuite.models.robots.manipulators.kinova3_robot
59
+ :members:
60
+ :undoc-members:
61
+ :show-inheritance:
62
+
63
+ robosuite.models.robots.manipulators.legged\_manipulator\_model module
64
+ ----------------------------------------------------------------------
65
+
66
+ .. automodule:: robosuite.models.robots.manipulators.legged_manipulator_model
67
+ :members:
68
+ :undoc-members:
69
+ :show-inheritance:
70
+
71
+ robosuite.models.robots.manipulators.manipulator\_model module
72
+ --------------------------------------------------------------
73
+
74
+ .. automodule:: robosuite.models.robots.manipulators.manipulator_model
75
+ :members:
76
+ :undoc-members:
77
+ :show-inheritance:
78
+
79
+ robosuite.models.robots.manipulators.panda\_robot module
80
+ --------------------------------------------------------
81
+
82
+ .. automodule:: robosuite.models.robots.manipulators.panda_robot
83
+ :members:
84
+ :undoc-members:
85
+ :show-inheritance:
86
+
87
+ robosuite.models.robots.manipulators.sawyer\_robot module
88
+ ---------------------------------------------------------
89
+
90
+ .. automodule:: robosuite.models.robots.manipulators.sawyer_robot
91
+ :members:
92
+ :undoc-members:
93
+ :show-inheritance:
94
+
95
+ robosuite.models.robots.manipulators.spot\_arm module
96
+ -----------------------------------------------------
97
+
98
+ .. automodule:: robosuite.models.robots.manipulators.spot_arm
99
+ :members:
100
+ :undoc-members:
101
+ :show-inheritance:
102
+
103
+ robosuite.models.robots.manipulators.tiago\_robot module
104
+ --------------------------------------------------------
105
+
106
+ .. automodule:: robosuite.models.robots.manipulators.tiago_robot
107
+ :members:
108
+ :undoc-members:
109
+ :show-inheritance:
110
+
111
+ robosuite.models.robots.manipulators.ur5e\_robot module
112
+ -------------------------------------------------------
113
+
114
+ .. automodule:: robosuite.models.robots.manipulators.ur5e_robot
115
+ :members:
116
+ :undoc-members:
117
+ :show-inheritance:
118
+
119
+ Module contents
120
+ ---------------
121
+
122
+ .. automodule:: robosuite.models.robots.manipulators
123
+ :members:
124
+ :undoc-members:
125
+ :show-inheritance:
docs/source/robosuite.models.robots.rst ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ robosuite.models.robots package
2
+ ===============================
3
+
4
+ Subpackages
5
+ -----------
6
+
7
+ .. toctree::
8
+ :maxdepth: 4
9
+
10
+ robosuite.models.robots.manipulators
11
+
12
+ Submodules
13
+ ----------
14
+
15
+ robosuite.models.robots.compositional module
16
+ --------------------------------------------
17
+
18
+ .. automodule:: robosuite.models.robots.compositional
19
+ :members:
20
+ :undoc-members:
21
+ :show-inheritance:
22
+
23
+ robosuite.models.robots.robot\_model module
24
+ -------------------------------------------
25
+
26
+ .. automodule:: robosuite.models.robots.robot_model
27
+ :members:
28
+ :undoc-members:
29
+ :show-inheritance:
30
+
31
+ Module contents
32
+ ---------------
33
+
34
+ .. automodule:: robosuite.models.robots
35
+ :members:
36
+ :undoc-members:
37
+ :show-inheritance:
docs/source/robosuite.models.tasks.rst ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ robosuite.models.tasks package
2
+ ==============================
3
+
4
+ Submodules
5
+ ----------
6
+
7
+ robosuite.models.tasks.manipulation\_task module
8
+ ------------------------------------------------
9
+
10
+ .. automodule:: robosuite.models.tasks.manipulation_task
11
+ :members:
12
+ :undoc-members:
13
+ :show-inheritance:
14
+
15
+ robosuite.models.tasks.task module
16
+ ----------------------------------
17
+
18
+ .. automodule:: robosuite.models.tasks.task
19
+ :members:
20
+ :undoc-members:
21
+ :show-inheritance:
22
+
23
+ Module contents
24
+ ---------------
25
+
26
+ .. automodule:: robosuite.models.tasks
27
+ :members:
28
+ :undoc-members:
29
+ :show-inheritance:
docs/source/robosuite.renderers.context.rst ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ robosuite.renderers.context package
2
+ ===================================
3
+
4
+ Submodules
5
+ ----------
6
+
7
+ robosuite.renderers.context.egl\_context module
8
+ -----------------------------------------------
9
+
10
+ .. automodule:: robosuite.renderers.context.egl_context
11
+ :members:
12
+ :undoc-members:
13
+ :show-inheritance:
14
+
15
+ robosuite.renderers.context.glfw\_context module
16
+ ------------------------------------------------
17
+
18
+ .. automodule:: robosuite.renderers.context.glfw_context
19
+ :members:
20
+ :undoc-members:
21
+ :show-inheritance:
22
+
23
+ robosuite.renderers.context.osmesa\_context module
24
+ --------------------------------------------------
25
+
26
+ .. automodule:: robosuite.renderers.context.osmesa_context
27
+ :members:
28
+ :undoc-members:
29
+ :show-inheritance:
30
+
31
+ Module contents
32
+ ---------------
33
+
34
+ .. automodule:: robosuite.renderers.context
35
+ :members:
36
+ :undoc-members:
37
+ :show-inheritance:
docs/source/robosuite.renderers.mjviewer.rst ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ robosuite.renderers.mjviewer package
2
+ ====================================
3
+
4
+ Submodules
5
+ ----------
6
+
7
+ robosuite.renderers.mjviewer.mjviewer\_renderer module
8
+ ------------------------------------------------------
9
+
10
+ .. automodule:: robosuite.renderers.mjviewer.mjviewer_renderer
11
+ :members:
12
+ :undoc-members:
13
+ :show-inheritance:
14
+
15
+ Module contents
16
+ ---------------
17
+
18
+ .. automodule:: robosuite.renderers.mjviewer
19
+ :members:
20
+ :undoc-members:
21
+ :show-inheritance:
docs/source/robosuite.renderers.mujoco.rst ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ robosuite.renderers.mujoco package
2
+ ==================================
3
+
4
+ Submodules
5
+ ----------
6
+
7
+ robosuite.renderers.mujoco.mujoco\_py\_renderer module
8
+ ------------------------------------------------------
9
+
10
+ .. automodule:: robosuite.renderers.mujoco.mujoco_py_renderer
11
+ :members:
12
+ :undoc-members:
13
+ :show-inheritance:
14
+
15
+ Module contents
16
+ ---------------
17
+
18
+ .. automodule:: robosuite.renderers.mujoco
19
+ :members:
20
+ :undoc-members:
21
+ :show-inheritance:
docs/source/robosuite.renderers.rst ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ robosuite.renderers package
2
+ ===========================
3
+
4
+ Subpackages
5
+ -----------
6
+
7
+ .. toctree::
8
+ :maxdepth: 4
9
+
10
+ robosuite.renderers.context
11
+ robosuite.renderers.mjviewer
12
+
13
+ Submodules
14
+ ----------
15
+
16
+ robosuite.renderers.base module
17
+ -------------------------------
18
+
19
+ .. automodule:: robosuite.renderers.base
20
+ :members:
21
+ :undoc-members:
22
+ :show-inheritance:
23
+
24
+ robosuite.renderers.base\_parser module
25
+ ---------------------------------------
26
+
27
+ .. automodule:: robosuite.renderers.base_parser
28
+ :members:
29
+ :undoc-members:
30
+ :show-inheritance:
31
+
32
+ Module contents
33
+ ---------------
34
+
35
+ .. automodule:: robosuite.renderers
36
+ :members:
37
+ :undoc-members:
38
+ :show-inheritance:
docs/source/robosuite.robots.rst ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ robosuite.robots package
2
+ ========================
3
+
4
+ Submodules
5
+ ----------
6
+
7
+ robosuite.robots.fixed\_base\_robot module
8
+ ------------------------------------------
9
+
10
+ .. automodule:: robosuite.robots.fixed_base_robot
11
+ :members:
12
+ :undoc-members:
13
+ :show-inheritance:
14
+
15
+ robosuite.robots.legged\_robot module
16
+ -------------------------------------
17
+
18
+ .. automodule:: robosuite.robots.legged_robot
19
+ :members:
20
+ :undoc-members:
21
+ :show-inheritance:
22
+
23
+ robosuite.robots.mobile\_robot module
24
+ -------------------------------------
25
+
26
+ .. automodule:: robosuite.robots.mobile_robot
27
+ :members:
28
+ :undoc-members:
29
+ :show-inheritance:
30
+
31
+ robosuite.robots.robot module
32
+ -----------------------------
33
+
34
+ .. automodule:: robosuite.robots.robot
35
+ :members:
36
+ :undoc-members:
37
+ :show-inheritance:
38
+
39
+ robosuite.robots.wheeled\_robot module
40
+ --------------------------------------
41
+
42
+ .. automodule:: robosuite.robots.wheeled_robot
43
+ :members:
44
+ :undoc-members:
45
+ :show-inheritance:
46
+
47
+ Module contents
48
+ ---------------
49
+
50
+ .. automodule:: robosuite.robots
51
+ :members:
52
+ :undoc-members:
53
+ :show-inheritance:
docs/source/robosuite.rst ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ robosuite package
2
+ =================
3
+
4
+ Subpackages
5
+ -----------
6
+
7
+ .. toctree::
8
+ :maxdepth: 4
9
+
10
+ robosuite.controllers
11
+ robosuite.devices
12
+ robosuite.environments
13
+ robosuite.models
14
+ robosuite.renderers
15
+ robosuite.robots
16
+ robosuite.utils
17
+ robosuite.wrappers
18
+
19
+ Submodules
20
+ ----------
21
+
22
+ robosuite.macros module
23
+ -----------------------
24
+
25
+ .. automodule:: robosuite.macros
26
+ :members:
27
+ :undoc-members:
28
+ :show-inheritance:
29
+
30
+ robosuite.macros\_private module
31
+ --------------------------------
32
+
33
+ .. automodule:: robosuite.macros_private
34
+ :members:
35
+ :undoc-members:
36
+ :show-inheritance:
37
+
38
+ Module contents
39
+ ---------------
40
+
41
+ .. automodule:: robosuite
42
+ :members:
43
+ :undoc-members:
44
+ :show-inheritance:
docs/source/robosuite.utils.rst ADDED
@@ -0,0 +1,165 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ robosuite.utils package
2
+ =======================
3
+
4
+ Submodules
5
+ ----------
6
+
7
+ robosuite.utils.binding\_utils module
8
+ -------------------------------------
9
+
10
+ .. automodule:: robosuite.utils.binding_utils
11
+ :members:
12
+ :undoc-members:
13
+ :show-inheritance:
14
+
15
+ robosuite.utils.buffers module
16
+ ------------------------------
17
+
18
+ .. automodule:: robosuite.utils.buffers
19
+ :members:
20
+ :undoc-members:
21
+ :show-inheritance:
22
+
23
+ robosuite.utils.camera\_utils module
24
+ ------------------------------------
25
+
26
+ .. automodule:: robosuite.utils.camera_utils
27
+ :members:
28
+ :undoc-members:
29
+ :show-inheritance:
30
+
31
+ robosuite.utils.control\_utils module
32
+ -------------------------------------
33
+
34
+ .. automodule:: robosuite.utils.control_utils
35
+ :members:
36
+ :undoc-members:
37
+ :show-inheritance:
38
+
39
+ robosuite.utils.errors module
40
+ -----------------------------
41
+
42
+ .. automodule:: robosuite.utils.errors
43
+ :members:
44
+ :undoc-members:
45
+ :show-inheritance:
46
+
47
+ robosuite.utils.ik\_utils module
48
+ --------------------------------
49
+
50
+ .. automodule:: robosuite.utils.ik_utils
51
+ :members:
52
+ :undoc-members:
53
+ :show-inheritance:
54
+
55
+ robosuite.utils.input\_utils module
56
+ -----------------------------------
57
+
58
+ .. automodule:: robosuite.utils.input_utils
59
+ :members:
60
+ :undoc-members:
61
+ :show-inheritance:
62
+
63
+ robosuite.utils.log\_utils module
64
+ ---------------------------------
65
+
66
+ .. automodule:: robosuite.utils.log_utils
67
+ :members:
68
+ :undoc-members:
69
+ :show-inheritance:
70
+
71
+ robosuite.utils.mjcf\_utils module
72
+ ----------------------------------
73
+
74
+ .. automodule:: robosuite.utils.mjcf_utils
75
+ :members:
76
+ :undoc-members:
77
+ :show-inheritance:
78
+
79
+ robosuite.utils.mjmod module
80
+ ----------------------------
81
+
82
+ .. automodule:: robosuite.utils.mjmod
83
+ :members:
84
+ :undoc-members:
85
+ :show-inheritance:
86
+
87
+ robosuite.utils.numba module
88
+ ----------------------------
89
+
90
+ .. automodule:: robosuite.utils.numba
91
+ :members:
92
+ :undoc-members:
93
+ :show-inheritance:
94
+
95
+ robosuite.utils.observables module
96
+ ----------------------------------
97
+
98
+ .. automodule:: robosuite.utils.observables
99
+ :members:
100
+ :undoc-members:
101
+ :show-inheritance:
102
+
103
+ robosuite.utils.opencv\_renderer module
104
+ ---------------------------------------
105
+
106
+ .. automodule:: robosuite.utils.opencv_renderer
107
+ :members:
108
+ :undoc-members:
109
+ :show-inheritance:
110
+
111
+ robosuite.utils.placement\_samplers module
112
+ ------------------------------------------
113
+
114
+ .. automodule:: robosuite.utils.placement_samplers
115
+ :members:
116
+ :undoc-members:
117
+ :show-inheritance:
118
+
119
+ robosuite.utils.robot\_composition\_utils module
120
+ ------------------------------------------------
121
+
122
+ .. automodule:: robosuite.utils.robot_composition_utils
123
+ :members:
124
+ :undoc-members:
125
+ :show-inheritance:
126
+
127
+ robosuite.utils.robot\_utils module
128
+ -----------------------------------
129
+
130
+ .. automodule:: robosuite.utils.robot_utils
131
+ :members:
132
+ :undoc-members:
133
+ :show-inheritance:
134
+
135
+ robosuite.utils.sim\_utils module
136
+ ---------------------------------
137
+
138
+ .. automodule:: robosuite.utils.sim_utils
139
+ :members:
140
+ :undoc-members:
141
+ :show-inheritance:
142
+
143
+ robosuite.utils.traj\_utils module
144
+ ----------------------------------
145
+
146
+ .. automodule:: robosuite.utils.traj_utils
147
+ :members:
148
+ :undoc-members:
149
+ :show-inheritance:
150
+
151
+ robosuite.utils.transform\_utils module
152
+ ---------------------------------------
153
+
154
+ .. automodule:: robosuite.utils.transform_utils
155
+ :members:
156
+ :undoc-members:
157
+ :show-inheritance:
158
+
159
+ Module contents
160
+ ---------------
161
+
162
+ .. automodule:: robosuite.utils
163
+ :members:
164
+ :undoc-members:
165
+ :show-inheritance:
generate_urdf.py ADDED
@@ -0,0 +1,428 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """Generate a combined Sawyer + Robotiq85 URDF from robosuite MJCF files."""
3
+
4
+ import os
5
+ import shutil
6
+ import numpy as np
7
+ from scipy.spatial.transform import Rotation
8
+
9
+
10
+ def quat_wxyz_to_rpy(w, x, y, z):
11
+ """Convert MuJoCo quaternion (w,x,y,z) to URDF rpy (roll,pitch,yaw)."""
12
+ r = Rotation.from_quat([x, y, z, w]) # scipy uses (x,y,z,w)
13
+ return r.as_euler('xyz') # extrinsic XYZ = rpy
14
+
15
+
16
+ def fmt(v, prec=6):
17
+ return f"{v:.{prec}f}".rstrip('0').rstrip('.')
18
+
19
+
20
+ def rpy_str(w, x, y, z):
21
+ rpy = quat_wxyz_to_rpy(w, x, y, z)
22
+ return f"{fmt(rpy[0])} {fmt(rpy[1])} {fmt(rpy[2])}"
23
+
24
+
25
+ def xyz_str(x, y, z):
26
+ return f"{fmt(x)} {fmt(y)} {fmt(z)}"
27
+
28
+
29
+ def diag_to_inertia(ixx, iyy, izz):
30
+ return f'<inertia ixx="{fmt(ixx)}" ixy="0" ixz="0" iyy="{fmt(iyy)}" iyz="0" izz="{fmt(izz)}"/>'
31
+
32
+
33
+ def inertial_block(mass, pos, diag, quat=None):
34
+ lines = [' <inertial>']
35
+ if quat:
36
+ lines.append(f' <origin xyz="{pos}" rpy="{rpy_str(*quat)}"/>')
37
+ else:
38
+ lines.append(f' <origin xyz="{pos}" rpy="0 0 0"/>')
39
+ lines.append(f' <mass value="{fmt(mass)}"/>')
40
+ lines.append(f' {diag_to_inertia(*diag)}')
41
+ lines.append(' </inertial>')
42
+ return '\n'.join(lines)
43
+
44
+
45
+ def visual_mesh(mesh_path, origin_xyz="0 0 0", origin_rpy="0 0 0", scale=None):
46
+ lines = [' <visual>']
47
+ lines.append(f' <origin xyz="{origin_xyz}" rpy="{origin_rpy}"/>')
48
+ if scale:
49
+ lines.append(f' <geometry><mesh filename="{mesh_path}" scale="{scale}"/></geometry>')
50
+ else:
51
+ lines.append(f' <geometry><mesh filename="{mesh_path}"/></geometry>')
52
+ lines.append(' </visual>')
53
+ return '\n'.join(lines)
54
+
55
+
56
+ def collision_mesh(mesh_path, origin_xyz="0 0 0", origin_rpy="0 0 0", scale=None):
57
+ lines = [' <collision>']
58
+ lines.append(f' <origin xyz="{origin_xyz}" rpy="{origin_rpy}"/>')
59
+ if scale:
60
+ lines.append(f' <geometry><mesh filename="{mesh_path}" scale="{scale}"/></geometry>')
61
+ else:
62
+ lines.append(f' <geometry><mesh filename="{mesh_path}"/></geometry>')
63
+ lines.append(' </collision>')
64
+ return '\n'.join(lines)
65
+
66
+
67
+ def revolute_joint(name, parent, child, xyz, rpy, axis, lower, upper, effort, damping=0.0):
68
+ return f"""
69
+ <joint name="{name}" type="revolute">
70
+ <parent link="{parent}"/>
71
+ <child link="{child}"/>
72
+ <origin xyz="{xyz}" rpy="{rpy}"/>
73
+ <axis xyz="{axis}"/>
74
+ <limit lower="{fmt(lower)}" upper="{fmt(upper)}" effort="{fmt(effort)}" velocity="3.0"/>
75
+ <dynamics damping="{fmt(damping)}"/>
76
+ </joint>"""
77
+
78
+
79
+ def fixed_joint(name, parent, child, xyz, rpy="0 0 0"):
80
+ return f"""
81
+ <joint name="{name}" type="fixed">
82
+ <parent link="{parent}"/>
83
+ <child link="{child}"/>
84
+ <origin xyz="{xyz}" rpy="{rpy}"/>
85
+ </joint>"""
86
+
87
+
88
+ def mimic_joint(name, parent_link, child_link, xyz, rpy, axis, lower, upper,
89
+ mimic_joint_name, multiplier=1.0, offset=0.0):
90
+ return f"""
91
+ <joint name="{name}" type="revolute">
92
+ <parent link="{parent_link}"/>
93
+ <child link="{child_link}"/>
94
+ <origin xyz="{xyz}" rpy="{rpy}"/>
95
+ <axis xyz="{axis}"/>
96
+ <limit lower="{fmt(lower)}" upper="{fmt(upper)}" effort="20" velocity="3.0"/>
97
+ <mimic joint="{mimic_joint_name}" multiplier="{fmt(multiplier)}" offset="{fmt(offset)}"/>
98
+ </joint>"""
99
+
100
+
101
+ def generate_urdf():
102
+ parts = []
103
+ parts.append('<?xml version="1.0"?>')
104
+ parts.append('<robot name="sawyer_robotiq85">')
105
+
106
+ # ==================== SAWYER ARM ====================
107
+ # --- base_link (world mount point) ---
108
+ parts.append("""
109
+ <link name="base_link">
110
+ <inertial>
111
+ <origin xyz="0 0 0" rpy="0 0 0"/>
112
+ <mass value="0.001"/>
113
+ <inertia ixx="0.000001" ixy="0" ixz="0" iyy="0.000001" iyz="0" izz="0.000001"/>
114
+ </inertial>
115
+ </link>""")
116
+
117
+ # --- right_arm_base_link ---
118
+ sawyer_meshes = {
119
+ 'base': ['base_0.obj', 'base_1.obj'],
120
+ 'l0': [f'l0_{i}.obj' for i in range(7)],
121
+ 'l1': [f'l1_{i}.obj' for i in range(3)],
122
+ 'l2': [f'l2_{i}.obj' for i in range(5)],
123
+ 'l3': [f'l3_{i}.obj' for i in range(4)],
124
+ 'l4': [f'l4_{i}.obj' for i in range(8)],
125
+ 'l5': [f'l5_{i}.obj' for i in range(5)],
126
+ 'l6': [f'l6_{i}.obj' for i in range(6)],
127
+ }
128
+
129
+ def sawyer_link(name, mass, pos, diag, quat, mesh_dir, meshes):
130
+ lines = [f'\n <link name="{name}">']
131
+ lines.append(inertial_block(mass, pos, diag, quat))
132
+ for m in meshes:
133
+ lines.append(visual_mesh(f"meshes/sawyer/{mesh_dir}/{m}"))
134
+ lines.append(collision_mesh(f"meshes/sawyer/{mesh_dir}/{m}"))
135
+ lines.append(' </link>')
136
+ return '\n'.join(lines)
137
+
138
+ parts.append(sawyer_link("right_arm_base_link", 2.0687,
139
+ "-0.0006241 -0.0000280 0.065404",
140
+ (0.00740351, 0.00681776, 0.00672942),
141
+ (-0.209285, 0.674441, 0.227335, 0.670558),
142
+ "base", sawyer_meshes['base']))
143
+
144
+ parts.append(fixed_joint("base_to_arm", "base_link", "right_arm_base_link",
145
+ "0 0 0"))
146
+
147
+ # --- right_l0 ---
148
+ parts.append(sawyer_link("right_l0", 5.3213,
149
+ "0.024366 0.010969 0.14363",
150
+ (0.0651588, 0.0510944, 0.0186218),
151
+ (0.894823, 0.00899958, -0.170275, 0.412573),
152
+ "l0", sawyer_meshes['l0']))
153
+ parts.append(revolute_joint("right_j0", "right_arm_base_link", "right_l0",
154
+ "0 0 0.08", "0 0 0", "0 0 1",
155
+ -3.0503, 3.0503, 80.0))
156
+
157
+ # --- right_l1 ---
158
+ parts.append(sawyer_link("right_l1", 4.505,
159
+ "-0.0030849 -0.026811 0.092521",
160
+ (0.0224339, 0.0221624, 0.0097097),
161
+ (0.424888, 0.891987, 0.132364, -0.0794296),
162
+ "l1", sawyer_meshes['l1']))
163
+ rpy_l1 = rpy_str(0.5, -0.5, 0.5, 0.5)
164
+ parts.append(revolute_joint("right_j1", "right_l0", "right_l1",
165
+ "0.081 0.05 0.237", rpy_l1, "0 0 1",
166
+ -3.8095, 2.2736, 80.0))
167
+
168
+ # --- right_l2 ---
169
+ parts.append(sawyer_link("right_l2", 1.745,
170
+ "-0.00016044 -0.014967 0.13582",
171
+ (0.0257928, 0.025506, 0.00292515),
172
+ (0.707831, -0.0524761, 0.0516007, 0.702537),
173
+ "l2", sawyer_meshes['l2']))
174
+ rpy_l2 = rpy_str(0.707107, 0.707107, 0, 0)
175
+ parts.append(revolute_joint("right_j2", "right_l1", "right_l2",
176
+ "0 -0.14 0.1425", rpy_l2, "0 0 1",
177
+ -3.0426, 3.0426, 40.0))
178
+
179
+ # --- right_l3 ---
180
+ parts.append(sawyer_link("right_l3", 2.5097,
181
+ "-0.0048135 -0.0281 -0.084154",
182
+ (0.0102404, 0.0096997, 0.00369622),
183
+ (0.902999, 0.385391, -0.0880901, 0.168247),
184
+ "l3", sawyer_meshes['l3']))
185
+ rpy_l3 = rpy_str(0.707107, -0.707107, 0, 0)
186
+ parts.append(revolute_joint("right_j3", "right_l2", "right_l3",
187
+ "0 -0.042 0.26", rpy_l3, "0 0 1",
188
+ -3.0439, 3.0439, 40.0))
189
+
190
+ # --- right_l4 ---
191
+ parts.append(sawyer_link("right_l4", 1.1136,
192
+ "-0.0018844 0.0069001 0.1341",
193
+ (0.0136549, 0.0135493, 0.00127353),
194
+ (0.803612, 0.031257, -0.0298334, 0.593582),
195
+ "l4", sawyer_meshes['l4']))
196
+ rpy_l4 = rpy_str(0.707107, 0.707107, 0, 0)
197
+ parts.append(revolute_joint("right_j4", "right_l3", "right_l4",
198
+ "0 -0.125 -0.1265", rpy_l4, "0 0 1",
199
+ -2.9761, 2.9761, 9.0))
200
+
201
+ # --- right_l5 ---
202
+ parts.append(sawyer_link("right_l5", 1.5625,
203
+ "0.0061133 -0.023697 0.076416",
204
+ (0.00474131, 0.00422857, 0.00190672),
205
+ (0.404076, 0.9135, 0.0473125, 0.00158335),
206
+ "l5", sawyer_meshes['l5']))
207
+ rpy_l5 = rpy_str(0.707107, -0.707107, 0, 0)
208
+ parts.append(revolute_joint("right_j5", "right_l4", "right_l5",
209
+ "0 0.031 0.275", rpy_l5, "0 0 1",
210
+ -2.9761, 2.9761, 9.0, damping=0.2))
211
+
212
+ # --- right_l6 ---
213
+ parts.append(sawyer_link("right_l6", 0.3292,
214
+ "-0.0000081 0.0085838 -0.0049566",
215
+ (0.000360258, 0.000311068, 0.000214974),
216
+ (0.479044, 0.515636, -0.513069, 0.491322),
217
+ "l6", sawyer_meshes['l6']))
218
+ rpy_l6 = rpy_str(0.0616248, 0.06163, -0.704416, 0.704416)
219
+ parts.append(revolute_joint("right_j6", "right_l5", "right_l6",
220
+ "0 -0.11 0.1053", rpy_l6, "0 0 1",
221
+ -4.7124, 4.7124, 9.0, damping=0.1))
222
+
223
+ # --- right_hand (gripper mount) ---
224
+ parts.append("""
225
+ <link name="right_hand">
226
+ <inertial>
227
+ <origin xyz="0 0 0" rpy="0 0 0"/>
228
+ <mass value="0.001"/>
229
+ <inertia ixx="0.000001" ixy="0" ixz="0" iyy="0.000001" iyz="0" izz="0.000001"/>
230
+ </inertial>
231
+ </link>""")
232
+ rpy_hand = rpy_str(0.707105, 0, 0, 0.707108)
233
+ parts.append(fixed_joint("right_l6_to_hand", "right_l6", "right_hand",
234
+ "0 0 0.024", rpy_hand))
235
+
236
+ # ==================== ROBOTIQ 85 GRIPPER ====================
237
+ s = "0.001 0.001 0.001" # scale for gripper meshes
238
+
239
+ # --- adapter link (gripper base) ---
240
+ parts.append(f"""
241
+ <link name="robotiq_85_adapter_link">
242
+ <inertial>
243
+ <origin xyz="0 0 0" rpy="0 0 0"/>
244
+ <mass value="0.01"/>
245
+ <inertia ixx="0.001" ixy="0" ixz="0" iyy="0.001" iyz="0" izz="0.001"/>
246
+ </inertial>
247
+ {visual_mesh("meshes/robotiq_85/robotiq_arg2f_base_link_vis.stl")}
248
+ {collision_mesh("meshes/robotiq_85/robotiq_arg2f_base_link.stl")}
249
+ </link>""")
250
+ parts.append(fixed_joint("hand_to_gripper", "right_hand", "robotiq_85_adapter_link",
251
+ "0 0 0"))
252
+
253
+ # --- left_outer_knuckle ---
254
+ parts.append(f"""
255
+ <link name="left_outer_knuckle">
256
+ {inertial_block(0.0311462, "0.000164 0.055483 -0.010076",
257
+ (5.11372e-05, 4.89464e-05, 4.95906e-06),
258
+ (0.920541, 0.390623, -0.00362953, 0.00231744))}
259
+ {visual_mesh("meshes/robotiq_85/robotiq_arg2f_85_outer_knuckle_vis.stl", scale=s)}
260
+ {collision_mesh("meshes/robotiq_85/robotiq_arg2f_85_outer_knuckle.stl", scale=s)}
261
+ </link>""")
262
+ # quat "0 0 0 1" = identity in MuJoCo → rpy 0 0 pi (w=0 is 180 rotation)
263
+ # Actually quat (w=0, x=0, y=0, z=1) → 180° around z
264
+ rpy_lok = rpy_str(0, 0, 0, 1)
265
+ parts.append(revolute_joint("finger_joint", "robotiq_85_adapter_link", "left_outer_knuckle",
266
+ "0 -0.0306011 0.054904", rpy_lok, "1 0 0",
267
+ 0, 0.8, 20.0))
268
+
269
+ # --- left_outer_finger (visual only, part of left_outer_knuckle subtree) ---
270
+ parts.append(f"""
271
+ <link name="left_outer_finger">
272
+ <inertial>
273
+ <origin xyz="0 0 0" rpy="0 0 0"/>
274
+ <mass value="0.001"/>
275
+ <inertia ixx="0.000001" ixy="0" ixz="0" iyy="0.000001" iyz="0" izz="0.000001"/>
276
+ </inertial>
277
+ {visual_mesh("meshes/robotiq_85/robotiq_arg2f_85_outer_finger_vis.stl", scale=s)}
278
+ {collision_mesh("meshes/robotiq_85/robotiq_arg2f_85_outer_finger.stl", scale=s)}
279
+ </link>""")
280
+ parts.append(fixed_joint("left_outer_finger_joint", "left_outer_knuckle", "left_outer_finger",
281
+ "0 0.0315 -0.0041"))
282
+
283
+ # --- left_inner_finger ---
284
+ parts.append(f"""
285
+ <link name="left_inner_finger">
286
+ {inertial_block(0.0156391, "0.0002 0.003269 0.001753",
287
+ (1.57977e-05, 1.51089e-05, 1.4647e-06),
288
+ (0.933621, 0.35825, -0.00273441, 0.00104851))}
289
+ {visual_mesh("meshes/robotiq_85/robotiq_arg2f_85_inner_finger_vis.stl", scale=s)}
290
+ {collision_mesh("meshes/robotiq_85/robotiq_arg2f_85_inner_finger.stl", scale=s)}
291
+ </link>""")
292
+ parts.append(mimic_joint("left_inner_finger_joint", "left_outer_finger", "left_inner_finger",
293
+ "0 0.0376 0.043", "0 0 0", "1 0 0",
294
+ -0.8757, 0.8757, "finger_joint", multiplier=-1.0))
295
+
296
+ # --- left_inner_knuckle ---
297
+ parts.append(f"""
298
+ <link name="left_inner_knuckle">
299
+ {inertial_block(0.0271177, "0.000123 0.050785 0.00104",
300
+ (2.83809e-05, 2.61936e-05, 2.81319e-06),
301
+ (0.497203, 0.502496, -0.507943, 0.492221))}
302
+ {visual_mesh("meshes/robotiq_85/robotiq_arg2f_85_inner_knuckle_vis.stl", scale=s)}
303
+ {collision_mesh("meshes/robotiq_85/robotiq_arg2f_85_inner_knuckle.stl", scale=s)}
304
+ </link>""")
305
+ rpy_lik = rpy_str(0, 0, 0, 1)
306
+ parts.append(mimic_joint("left_inner_knuckle_joint", "robotiq_85_adapter_link", "left_inner_knuckle",
307
+ "0 -0.0127 0.06142", rpy_lik, "1 0 0",
308
+ 0, 0.8757, "finger_joint", multiplier=1.0))
309
+
310
+ # --- right_outer_knuckle ---
311
+ parts.append(f"""
312
+ <link name="right_outer_knuckle">
313
+ {inertial_block(0.0311462, "0.000164 0.055483 -0.010076",
314
+ (5.11372e-05, 4.89464e-05, 4.95906e-06),
315
+ (0.920541, 0.390623, -0.00362953, 0.00231744))}
316
+ {visual_mesh("meshes/robotiq_85/robotiq_arg2f_85_outer_knuckle_vis.stl", scale=s)}
317
+ {collision_mesh("meshes/robotiq_85/robotiq_arg2f_85_outer_knuckle.stl", scale=s)}
318
+ </link>""")
319
+ parts.append(mimic_joint("right_outer_knuckle_joint", "robotiq_85_adapter_link", "right_outer_knuckle",
320
+ "0 0.0306011 0.054904", "0 0 0", "1 0 0",
321
+ 0, 0.8, "finger_joint", multiplier=1.0))
322
+
323
+ # --- right_outer_finger ---
324
+ parts.append(f"""
325
+ <link name="right_outer_finger">
326
+ <inertial>
327
+ <origin xyz="0 0 0" rpy="0 0 0"/>
328
+ <mass value="0.001"/>
329
+ <inertia ixx="0.000001" ixy="0" ixz="0" iyy="0.000001" iyz="0" izz="0.000001"/>
330
+ </inertial>
331
+ {visual_mesh("meshes/robotiq_85/robotiq_arg2f_85_outer_finger_vis.stl", scale=s)}
332
+ {collision_mesh("meshes/robotiq_85/robotiq_arg2f_85_outer_finger.stl", scale=s)}
333
+ </link>""")
334
+ parts.append(fixed_joint("right_outer_finger_joint", "right_outer_knuckle", "right_outer_finger",
335
+ "0 0.0315 -0.0041"))
336
+
337
+ # --- right_inner_finger ---
338
+ parts.append(f"""
339
+ <link name="right_inner_finger">
340
+ {inertial_block(0.0156391, "0.0002 0.003269 0.001753",
341
+ (1.57977e-05, 1.51089e-05, 1.4647e-06),
342
+ (0.933621, 0.35825, -0.00273441, 0.00104851))}
343
+ {visual_mesh("meshes/robotiq_85/robotiq_arg2f_85_inner_finger_vis.stl", scale=s)}
344
+ {collision_mesh("meshes/robotiq_85/robotiq_arg2f_85_inner_finger.stl", scale=s)}
345
+ </link>""")
346
+ parts.append(mimic_joint("right_inner_finger_joint", "right_outer_finger", "right_inner_finger",
347
+ "0 0.0376 0.043", "0 0 0", "1 0 0",
348
+ -0.8757, 0.8757, "finger_joint", multiplier=-1.0))
349
+
350
+ # --- right_inner_knuckle ---
351
+ parts.append(f"""
352
+ <link name="right_inner_knuckle">
353
+ {inertial_block(0.0271177, "0.000123 0.050785 0.00104",
354
+ (2.83809e-05, 2.61936e-05, 2.81319e-06),
355
+ (0.497203, 0.502496, -0.507943, 0.492221))}
356
+ {visual_mesh("meshes/robotiq_85/robotiq_arg2f_85_inner_knuckle_vis.stl", scale=s)}
357
+ {collision_mesh("meshes/robotiq_85/robotiq_arg2f_85_inner_knuckle.stl", scale=s)}
358
+ </link>""")
359
+ parts.append(mimic_joint("right_inner_knuckle_joint", "robotiq_85_adapter_link", "right_inner_knuckle",
360
+ "0 0.0127 0.06142", "0 0 0", "1 0 0",
361
+ 0, 0.8757, "finger_joint", multiplier=1.0))
362
+
363
+ # --- EEF frame (for reference) ---
364
+ parts.append("""
365
+ <link name="eef_link">
366
+ <inertial>
367
+ <origin xyz="0 0 0" rpy="0 0 0"/>
368
+ <mass value="0.001"/>
369
+ <inertia ixx="0.000001" ixy="0" ixz="0" iyy="0.000001" iyz="0" izz="0.000001"/>
370
+ </inertial>
371
+ </link>""")
372
+ rpy_eef = rpy_str(0.707105, 0, 0, -0.707105)
373
+ parts.append(fixed_joint("eef_joint", "robotiq_85_adapter_link", "eef_link",
374
+ "0 0 0.145", rpy_eef))
375
+
376
+ parts.append('\n</robot>')
377
+ return '\n'.join(parts)
378
+
379
+
380
+ def copy_meshes(output_dir):
381
+ """Copy all required mesh files to output directory."""
382
+ robosuite_root = os.path.dirname(os.path.abspath(__file__))
383
+ sawyer_mesh_src = os.path.join(robosuite_root, "robosuite/models/assets/robots/sawyer/obj_meshes")
384
+ gripper_mesh_src = os.path.join(robosuite_root, "robosuite/models/assets/grippers/meshes/robotiq_85_gripper")
385
+
386
+ # Sawyer meshes
387
+ for subdir in ['base', 'l0', 'l1', 'l2', 'l3', 'l4', 'l5', 'l6']:
388
+ dst = os.path.join(output_dir, "meshes/sawyer", subdir)
389
+ os.makedirs(dst, exist_ok=True)
390
+ src = os.path.join(sawyer_mesh_src, subdir)
391
+ if os.path.isdir(src):
392
+ for f in os.listdir(src):
393
+ if f.endswith('.obj'):
394
+ shutil.copy2(os.path.join(src, f), os.path.join(dst, f))
395
+
396
+ # Robotiq85 meshes (STL files)
397
+ dst = os.path.join(output_dir, "meshes/robotiq_85")
398
+ os.makedirs(dst, exist_ok=True)
399
+ for f in os.listdir(gripper_mesh_src):
400
+ if f.endswith('.stl'):
401
+ shutil.copy2(os.path.join(gripper_mesh_src, f), os.path.join(dst, f))
402
+
403
+
404
+ def main():
405
+ output_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "supplement/urdf")
406
+ os.makedirs(output_dir, exist_ok=True)
407
+
408
+ # Generate URDF
409
+ urdf_content = generate_urdf()
410
+ urdf_path = os.path.join(output_dir, "sawyer_robotiq85.urdf")
411
+ with open(urdf_path, 'w') as f:
412
+ f.write(urdf_content)
413
+ print(f"URDF written to: {urdf_path}")
414
+
415
+ # Copy meshes
416
+ copy_meshes(output_dir)
417
+ print(f"Meshes copied to: {output_dir}/meshes/")
418
+
419
+ # Verify
420
+ n_sawyer = sum(len(os.listdir(os.path.join(output_dir, "meshes/sawyer", d)))
421
+ for d in os.listdir(os.path.join(output_dir, "meshes/sawyer")))
422
+ n_gripper = len(os.listdir(os.path.join(output_dir, "meshes/robotiq_85")))
423
+ print(f"Total: {n_sawyer} sawyer meshes + {n_gripper} gripper meshes")
424
+ print(f"\nDone! URDF package at: {output_dir}/")
425
+
426
+
427
+ if __name__ == "__main__":
428
+ main()
pyproject.toml ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [tool.black]
2
+ line-length = 120
3
+ target-version = ["py36", "py37", "py38"]
4
+ extend-exclude = "robosuite/((models/assets)|(controllers/config))"
5
+
6
+ [tool.isort]
7
+ profile = "black"
8
+ line_length = 120
9
+ skip = ["__init__.py"]
10
+ filter_files = true
11
+ py_version = "all"
12
+ extend_skip = [
13
+ "robosuite/models/assets",
14
+ "robosuite/controllers/config",
15
+ ]
requirements-extra.txt ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # required for GymWrapper
2
+ gymnasium
3
+
4
+ # macOS only
5
+ hidapi
6
+
7
+ # required for demonstration utils
8
+ h5py
9
+
10
+ # for extra robosuite_models
11
+ robosuite-models==1.0.0
12
+
13
+ # for USD export and rendering
14
+ usd-core
requirements.txt ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ -e .
2
+
3
+ # PyTorch (CUDA 12.1)
4
+ --extra-index-url https://download.pytorch.org/whl/cu121
5
+ torch==2.4.1
6
+ torchvision==0.19.1
7
+
8
+ # ACT
9
+ einops==0.8.2
10
+ ipython==8.38.0
11
+
12
+ # DP
13
+ hydra-core==1.2.0
14
+ omegaconf==2.3.0
15
+ diffusers==0.37.0
16
+ numba==0.64.0
17
+ dill==0.4.1
18
+ pandas==2.3.3
19
+
20
+ # Shared
21
+ numpy==1.26.4
22
+ scipy==1.15.3
23
+ h5py==3.15.1
24
+ zarr==2.18.3
25
+ transforms3d==0.4.2
26
+ wandb==0.25.0
27
+ PyYAML==6.0.3
setup.py ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # read the contents of your README file
2
+ from os import path
3
+
4
+ from setuptools import find_packages, setup
5
+
6
+ this_directory = path.abspath(path.dirname(__file__))
7
+ with open(path.join(this_directory, "README.md"), encoding="utf-8") as f:
8
+ lines = f.readlines()
9
+
10
+ # remove images from README
11
+ lines = [x for x in lines if ".png" not in x]
12
+ long_description = "".join(lines)
13
+
14
+ setup(
15
+ name="robosuite",
16
+ packages=[package for package in find_packages() if package.startswith("robosuite")],
17
+ install_requires=[
18
+ "numpy>=1.13.3",
19
+ "numba>=0.49.1",
20
+ "scipy>=1.2.3",
21
+ "mujoco>=3.3.0",
22
+ "qpsolvers[quadprog]>=4.3.1",
23
+ "Pillow",
24
+ "opencv-python",
25
+ "pynput",
26
+ "termcolor",
27
+ "pytest",
28
+ "tqdm",
29
+ ],
30
+ extras_require={
31
+ "mink": [
32
+ "mink==0.0.5",
33
+ ],
34
+ },
35
+ eager_resources=["*"],
36
+ include_package_data=True,
37
+ python_requires=">=3",
38
+ description="robosuite: A Modular Simulation Framework and Benchmark for Robot Learning",
39
+ author="Yuke Zhu",
40
+ url="https://github.com/ARISE-Initiative/robosuite",
41
+ author_email="yukez@cs.utexas.edu",
42
+ version="1.5.2",
43
+ long_description=long_description,
44
+ long_description_content_type="text/markdown",
45
+ )
train_all.sh ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ # Train ACT and DP on all tactile tasks
3
+ # Usage: bash train_all.sh
4
+
5
+ set -e
6
+
7
+ TASKS="precision_grasp peg_insertion gentle_stack"
8
+
9
+ echo "============================================"
10
+ echo " ACT Training"
11
+ echo "============================================"
12
+ for task in $TASKS; do
13
+ echo ""
14
+ echo ">>> ACT: $task"
15
+ cd /home/p/robosuite/policy/ACT
16
+ python imitate_episodes.py --task $task
17
+ done
18
+
19
+ echo ""
20
+ echo "============================================"
21
+ echo " DP Training"
22
+ echo "============================================"
23
+ for task in $TASKS; do
24
+ echo ""
25
+ echo ">>> DP: $task"
26
+ cd /home/p/robosuite/policy/DP
27
+ python train.py --config-name=robot_dp_tactile \
28
+ task.dataset.zarr_path=data/${task}-default-50.zarr
29
+ done
30
+
31
+ echo ""
32
+ echo "============================================"
33
+ echo " All done!"
34
+ echo "============================================"