You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
obs, reward, terminated, truncated, info = env_rel.step(act)
90
+
print(obs)
91
+
if truncated or terminated:
92
+
logger.info("Truncated or terminated!")
93
+
return
28
94
```
29
-
Checkout the python examples that we provide in [examples](examples):
30
-
-[fr3.py](python/examples/fr3.py) shows direct robot control with RCS's python bindings
31
-
-[env_joint_control.py](python/examples/env_joint_control.py) and [env_cartesian_control.py](python/examples/env_cartesian_control.py) demonstrates RCS's high level [gymnasium](https://gymnasium.farama.org/) interface both for joint- and end effector space control
95
+
### Examples
96
+
Checkout the python examples in the [examples](examples) folder:
97
+
-[fr3_direct_control.py](examples/fr3.py) shows direct robot control with RCS's python bindings
98
+
-[fr3_env_joint_control.py](examples/env_joint_control.py) and [fr3_env_cartesian_control.py](examples/env_cartesian_control.py) demonstrates RCS's high level [gymnasium](https://gymnasium.farama.org/) interface both for joint- and end effector space control
32
99
All of these examples work both in the MuJoCo simulation as well as on your hardware FR3.
33
-
Just switch between the following settings in the example script
100
+
101
+
102
+
### Hardware Extensions
103
+
To enable hardware usage in RCS, install the needed hardware extensions via pip. RCS itself comes with a couple of supported extensions e.g. control of the FR3 via the [`rcs_fr3`](extensions/rcs_fr3) extension. All native supported extension are located in [extensions](extensions).
104
+
To install extensions:
105
+
```shell
106
+
pip install -ve extensions/rcs_fr3
107
+
```
108
+
For more details real the readme file of the respective extension.
109
+
110
+
After the required hardware extensions are installed the examples also above work on real hardware:
111
+
Switch to hardware by setting the following flag:
34
112
```python
35
113
ROBOT_INSTANCE= RobotPlatform.SIMULATION
36
114
# ROBOT_INSTANCE = RobotPlatform.HARDWARE
37
115
```
38
-
and add your robot credentials to a `.env` file like this:
39
-
```env
40
-
DESK_USERNAME=...
41
-
DESK_PASSWORD=...
42
-
```
43
116
44
-
### Command Line Interface
117
+
####Command Line Interface
45
118
Some modules include command line interfaces, e.g. rcs_fr3 defines useful commands to handle the FR3 robot without the need to use the Desk Website.
46
119
You can see the available subcommands as follows:
47
120
```shell
48
-
python -m rcs.fr3 --help
49
-
python -m rcs.realsense --help
121
+
python -m rcs_fr3 --help
122
+
python -m rcs_realsense --help
50
123
```
51
124
52
125
## Development
126
+
### Formatting and Linting
53
127
```shell
54
128
# check for c++ formatting errors
55
129
make cppcheckformat
@@ -66,10 +140,13 @@ make pylint
66
140
# Testing
67
141
make pytest
68
142
```
69
-
70
143
### Stub Files for Python Bindings
71
144
We use autogenerated python stub files (`.pyi`) in the [`_core`](python/rcs/_core/) folder to show our linters the expected types of the C++ Python bindings.
72
145
If the python bindings in the C++ code have changed you might need to regenerate them by using:
0 commit comments