Skip to content

Commit 4b18edf

Browse files
docs: update doc
1 parent 7b7342f commit 4b18edf

8 files changed

Lines changed: 67 additions & 11 deletions

File tree

docs/algorithms/demonstrations.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
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"
1010

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

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: 6 additions & 0 deletions
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

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

docs/source/robosuite.devices.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@ robosuite.devices.device module
1212
:undoc-members:
1313
:show-inheritance:
1414

15+
robosuite.devices.dualsense module
16+
----------------------------------
17+
18+
.. automodule:: robosuite.devices.dualsense
19+
:members:
20+
:undoc-members:
21+
:show-inheritance:
22+
1523
robosuite.devices.keyboard module
1624
---------------------------------
1725

0 commit comments

Comments
 (0)