Skip to content

Commit 853c195

Browse files
committed
Merge branch 'master' of https://github.com/Abhiram824/robosuite
2 parents d19f19e + f4b2574 commit 853c195

File tree

116 files changed

+1986
-231
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

116 files changed

+1986
-231
lines changed

.github/workflows/run-tests.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,5 @@ jobs:
5757
run: |
5858
export PYOPENGL_PLATFORM="osmesa"
5959
export MUJOCO_GL="osmesa"
60+
export NUMBA_DISABLE_JIT=1
6061
pytest

.github/workflows/update-pypi.yaml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- 'pypi-action'
8+
release:
9+
types: [published]
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
build:
16+
name: Build distribution
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
# Checkout the repository
21+
- name: Checkout code
22+
uses: actions/checkout@v4
23+
24+
# Set up Python environment
25+
- name: Set up Python
26+
uses: actions/setup-python@v5
27+
with:
28+
python-version: '3.x'
29+
30+
# Install dependencies
31+
- name: Build release distribution
32+
run: |
33+
python -m pip install --upgrade pip
34+
python -m pip install build
35+
python -m build
36+
37+
- name: Store the distribution packages
38+
uses: actions/upload-artifact@v4
39+
with:
40+
name: release-dists
41+
path: dist/
42+
43+
publish-to-pypi:
44+
name: Publish Python distribution to PyPI
45+
needs:
46+
- build
47+
runs-on: ubuntu-latest
48+
49+
environment:
50+
name: pypi
51+
url: https://pypi.org/p/robosuite/
52+
53+
permissions:
54+
id-token: write # IMPORTANT: mandatory for trusted publishing
55+
56+
steps:
57+
- name: Download the dists
58+
uses: actions/download-artifact@v4
59+
with:
60+
name: release-dists
61+
path: dist/
62+
- name: Publish distribution to PyPI
63+
uses: pypa/gh-action-pypi-publish@release/v1

docs/algorithms/demonstrations.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22

33
## Collecting Human Demonstrations
44

5-
We provide teleoperation utilities that allow users to control the robots with input devices, such as the keyboard, [SpaceMouse](https://www.3dconnexion.com/spacemouse_compact/en/) and mujoco-gui. Such functionality allows us to collect a dataset of human demonstrations for learning. We provide an example script to illustrate how to collect demonstrations. Our [collect_human_demonstrations](https://github.com/ARISE-Initiative/robosuite/blob/master/robosuite/scripts/collect_human_demonstrations.py) script takes the following arguments:
5+
We provide teleoperation utilities that allow users to control the robots with input devices, such as the keyboard, [SpaceMouse](https://www.3dconnexion.com/spacemouse_compact/en/), [DualSense](https://www.playstation.com/en-us/accessories/dualsense-wireless-controller/) and mujoco-gui. Such functionality allows us to collect a dataset of human demonstrations for learning. We provide an example script to illustrate how to collect demonstrations. Our [collect_human_demonstrations](https://github.com/ARISE-Initiative/robosuite/blob/master/robosuite/scripts/collect_human_demonstrations.py) script takes the following arguments:
66

77
- `directory:` path to a folder for where to store the pickle file of collected demonstrations
88
- `environment:` name of the environment you would like to collect the demonstrations for
9-
- `device:` either "keyboard" or "spacemouse" or "mjgui"
9+
- `device:` either "keyboard" or "spacemouse" or "dualsense" or "mjgui"
10+
- `renderer:` Mujoco's builtin interactive viewer (mjviewer) or OpenCV viewer (mujoco)
11+
- `camera:` Pass multiple camera names to enable multiple views. Note that the "mujoco" renderer must be enabled when using multiple views, while "mjviewer" is not supported.
1012

1113
See the [devices page](https://robosuite.ai/docs/modules/devices.html) for details on how to use the devices.
1214

docs/changelog.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,19 @@
22

33
## Version 1.5.1
44

5+
- **Bug Fixes**:
6+
- Fixed segmentation demo, part controller demo, demo renderer, joint and actuator issues, equality removal, and orientation mismatch in Fourier hands.
7+
58
- **Documentation Updates**:
69
- Updated `basicusage.md`, overview page, demo docs, teleop usage info, devices, and related docs.
710
- Added a CI doc update workflow and `.nojekyll` fix.
811
- Simplified composite controller keywords and updated robots section and task images.
912

10-
- **Bug Fixes**:
11-
- Fixed segmentation demo, part controller demo, demo renderer, joint and actuator issues, equality removal, and orientation mismatch in Fourier hands.
12-
1313
- **Features/Enhancements**:
1414
- Added GymWrapper support for both `gym` and `gymnasium` with `dict_obs`.
15-
- Updated DexMimicGen assets and included a default whole-body Mink IK config.
16-
- Improved CI to check all tests and print video save paths in demo recordings.
15+
- Updated DexMimicGen assets and added a default whole-body Mink IK config.
16+
- Improved CI to check all tests and print video save paths in demo recordings.
17+
- Add GR1 and spot robot to `demo_random_actions.py` script.
1718

1819
- **Miscellaneous**:
1920
- Added troubleshooting for SpaceMouse failures and terminated `mjviewer` on resets.

docs/conf.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,12 +185,21 @@
185185
# (source start file, target name, title, author,
186186
# dir menu entry, description, category)
187187
texinfo_documents = [
188-
(master_doc, "robosuite", "robosuite Documentation", author, "robosuite", "ARISE", "Miscellaneous"),
188+
(
189+
master_doc,
190+
"robosuite",
191+
"robosuite Documentation",
192+
author,
193+
"robosuite",
194+
"ARISE",
195+
"Miscellaneous",
196+
),
189197
]
190198

191199
autodoc_mock_imports = [
192200
"robosuite.devices.mjgui",
193201
"robosuite.devices.spacemouse",
202+
"robosuite.devices.dualsense",
194203
"robosuite.devices.keyboard",
195204
"robosuite.devices.device",
196205
]

docs/demos.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,12 @@ The `demo_device_control.py` scripts shows how to teleoperate robot with [contro
121121
This current implementation only supports macOS (Linux support can be added).
122122
Download and install the [driver](https://www.3dconnexion.com/service/drivers.html) before running the script.
123123
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+
124130
* **Mujoco GUI**
125131
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
126132
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
@@ -174,7 +180,7 @@ The `demo_renderers.py` script shows how to use different renderers with the sim
174180
```sh
175181
$ python demo_renderers.py --renderer default
176182
```
177-
The `--renderer` flag can be set to `mujoco` or `default(default)
183+
The `--renderer` flag can be set to `mujoco` or `default`
178184

179185
### Exporting to USD
180186
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.

docs/installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ The base installation requires the MuJoCo physics engine (with [mujoco](https://
3737
```
3838
This will also install our library as an editable package, such that local changes will be reflected elsewhere without having to reinstall the package.
3939

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) devices. To enable these additional features, please install the extra dependencies by running
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
4141
```sh
4242
$ pip3 install -r requirements-extra.txt
4343
```

docs/modules/devices.md

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# I/O Devices
22

3-
Devices are used to read user input and teleoperate simulated robots in real-time. This is achieved by either using a keyboard or a [SpaceMouse](https://www.3dconnexion.com/spacemouse_compact/en/), and whose teleoperation capabilities can be demonstrated with the [demo_device_control.py](../demos.html#teleoperation) script. More generally, we support any interface that implements the [Device](../simulation/device) abstract base class. In order to support your own custom device, simply subclass this base class and implement the required methods.
3+
Devices are used to read user input and teleoperate simulated robots in real-time. This is achieved by either using a keyboard, a [SpaceMouse](https://www.3dconnexion.com/spacemouse_compact/en/) or a [DualSense](https://www.playstation.com/en-us/accessories/dualsense-wireless-controller/) joystick, and whose teleoperation capabilities can be demonstrated with the [demo_device_control.py](../demos.html#teleoperation) script. More generally, we support any interface that implements the [Device](../simulation/device) abstract base class. In order to support your own custom device, simply subclass this base class and implement the required methods.
44

55
## Keyboard
66

@@ -19,10 +19,10 @@ Note that the rendering window must be active for these commands to work.
1919
| o-p | rotate (yaw) |
2020
| y-h | rotate (pitch) |
2121
| e-r | rotate (roll) |
22-
| b | toggle arm/base mode (if appli cable) |
22+
| b | toggle arm/base mode (if applicable) |
2323
| s | switch active arm (if multi-armed robot) |
2424
| = | switch active robot (if multi-robot env) |
25-
| ESC | quit |
25+
| Ctrl+C | quit |
2626

2727

2828
## 3Dconnexion SpaceMouse
@@ -38,8 +38,29 @@ We support the use of a [SpaceMouse](https://www.3dconnexion.com/spacemouse_comp
3838
| Move mouse laterally | move arm horizontally in x-y plane |
3939
| Move mouse vertically | move arm vertically |
4040
| Twist mouse about an axis | rotate arm about a corresponding axis |
41-
| ESC (keyboard) | quit |
42-
41+
| b | toggle arm/base mode (if applicable) |
42+
| s | switch active arm (if multi-armed robot) |
43+
| = | switch active robot (if multi-robot environment) |
44+
| Ctrl+C (keyboard) | quit |
45+
46+
## Sony DualSense
47+
48+
we support the use of a [Sony DualSense](https://www.playstation.com/en-us/accessories/dualsense-wireless-controller/) as well.
49+
50+
**Sony DualSense controls**
51+
52+
| Control | Command |
53+
| :--------------------------- | :------------------------------------ |
54+
| Square button | reset simulation |
55+
| Circle button (hold) | close gripper |
56+
| Move LX/LY Stick | move arm horizontally in x-y plane |
57+
| Press L2 Trigger with or without L1 button | move arm vertically |
58+
| Move RX/RY Stick | rotate arm about x/y axis (roll/pitch) |
59+
| Press R2 Trigger with or without R1 button | rotate arm about z axis (yaw) |
60+
| Triangle button | toggle arm/base mode (if applicable) |
61+
| Left/Right Direction Pad | switch active arm (if multi-armed robot) |
62+
| Up/Down Direction Pad | switch active robot (if multi-robot environment) |
63+
| Ctrl+C (keyboard) | quit |
4364

4465
## Mujoco GUI Device
4566

docs/overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ This framework was originally developed in late 2017 by researchers in [Stanford
1818
* **standardized tasks**: a set of standardized manipulation tasks of large diversity and varying complexity and RL benchmarking results for reproducible research;
1919
* **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.
2020
* **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 and MuJoCo viewer drag-drop;
21+
* **teleoperation devices**: a selection of teleoperation devices including keyboard, spacemouse, dualsense and MuJoCo viewer drag-drop;
2222
* **multi-modal sensors**: heterogeneous types of sensory signals, including low-level physical states, RGB cameras, depth maps, and proprioception;
2323
* **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/);
2424
* **photorealistic rendering**: integration with advanced graphics tools that provide real-time photorealistic renderings of simulated scenes, including support for NVIDIA Isaac Sim rendering.

docs/simulation/device.rst

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Device
22
======
33

4-
Devices allow for direct real-time interfacing with the MuJoCo simulation. The currently supported devices are ``Keyboard``. ``SpaceMouse`` and ``MjGUI``.
4+
Devices allow for direct real-time interfacing with the MuJoCo simulation. The currently supported devices are ``Keyboard``. ``SpaceMouse``. ``DualSense`` and ``MjGUI``.
55

66
Base Device
77
-----------
@@ -34,6 +34,18 @@ SpaceMouse Device
3434
.. automethod:: control_gripper
3535
.. automethod:: _display_controls
3636

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+
3749
MjGUI Device
3850
------------
3951
.. autoclass:: robosuite.devices.mjgui.MJGUI

0 commit comments

Comments
 (0)