Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ManiSkill
Submodule ManiSkill added at 954edc
144 changes: 32 additions & 112 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,138 +1,58 @@
# Robot Control Stack
RCS is a unified and multilayered robot control interface over a MuJoCo simulation and real world robot currently implemented for the FR3/Panda, xArm7, UR5e and SO101.

**Robot Control Stack (RCS)** is a unified and multilayered robot control interface over a MuJoCo simulation and real world robot currently implemented for the FR3/Panda, xArm7, UR5e and SO101.

## Installation

We build and test RCS on the latest Debian and on the latest Ubuntu LTS.

1. Install the system dependencies:
```shell
sudo apt install $(cat debian_deps.txt)
```
2. Create, activate and configure a [Python virtual environment](https://docs.python.org/3/library/venv.html):
```shell
python3 -m venv .venv
source .venv/bin/activate
```
Then, install the package:
```shell
pip install -r requirements_dev.txt
pip config --site set global.no-build-isolation false
```
3. Build and install RCS:
```shell
pip install -ve .
```
1. **System Dependencies**:
```shell
sudo apt install $(cat debian_deps.txt)
```

For a docker deployment see the [docker](docker) folder.

## Usage
The python package is called `rcs`.

### Direct Robot Control
Simple direct robot control:
```python
import rcs
from rcs import sim
from rcs._core.sim import CameraType
from rcs.camera.sim import SimCameraConfig, SimCameraSet
from time import sleep
simulation = sim.Sim(rcs.scenes["fr3_empty_world"].mjb)
urdf_path = rcs.scenes["fr3_empty_world"].urdf
ik = rcs.common.RL(str(urdf_path))
cfg = sim.SimRobotConfig()
cfg.add_id("0")
cfg.tcp_offset = rcs.common.Pose(rcs.common.FrankaHandTCPOffset())
robot = rcs.sim.SimRobot(simulation, ik, cfg)

gripper_cfg_sim = sim.SimGripperConfig()
gripper_cfg_sim.add_id("0")
gripper = sim.SimGripper(simulation, gripper_cfg_sim)

camera_set = SimCameraSet(simulation, {})
simulation.open_gui()
# wait for gui
sleep(5)
# step the robot 10 cm in x direction
robot.set_cartesian_position(
robot.get_cartesian_position() * rcs.common.Pose(translation=np.array([0.1, 0, 0]))
)
# close gripper
gripper.grasp()
simulation.step_until_convergence()
input("press enter to close")
```
### Gym Env Interface
```python
from rcs.envs.creators import SimEnvCreator
from rcs.envs.utils import (
default_mujoco_cameraset_cfg,
default_sim_gripper_cfg,
default_sim_robot_cfg,
)
from rcs.envs.base import ControlMode, RelativeTo
env_rel = SimEnvCreator()(
control_mode=ControlMode.JOINTS,
robot_cfg=default_sim_robot_cfg(),
gripper_cfg=default_sim_gripper_cfg(),
cameras=default_mujoco_cameraset_cfg(),
max_relative_movement=np.deg2rad(5),
relative_to=RelativeTo.LAST_STEP,
)
env_rel.get_wrapper_attr("sim").open_gui()

for _ in range(100):
obs, info = env_rel.reset()
for _ in range(10):
# sample random relative action and execute it
act = env_rel.action_space.sample()
print(act)
obs, reward, terminated, truncated, info = env_rel.step(act)
print(obs)
```
2. **Python Environment**:
```shell
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements_dev.txt
```

3. **Install RCS**:
```shell
pip install -ve .
```

### Examples
Checkout the python examples in the [examples](examples) folder. For example
[fr3_direct_control.py](examples/fr3/fr3_direct_control.py) shows direct robot control with RCS's python bindings.
And [fr3_env_joint_control.py](examples/fr3/fr3_env_joint_control.py) and [fr3_env_cartesian_control.py](examples/fr3/fr3_env_cartesian_control.py) demonstrates RCS's high level [gymnasium](https://gymnasium.farama.org/) interface both for joint- and end effector space control
Checkout the other sub folders for other robot-specific examples.
Most of these examples work both in the MuJoCo simulation as well as on hardware.
## Hardware Extensions

RCS supports various hardware extensions (e.g., FR3, xArm7, RealSense). These are located in the `extensions` directory.

To install an extension:

### Hardware Extensions
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).
To install extensions:
```shell
pip install -ve extensions/rcs_fr3
```
For more details real the readme file of the respective extension.

After the required hardware extensions are installed the examples also above work on real hardware:
Switch to hardware by setting the following flag:
```python
# ROBOT_INSTANCE = RobotPlatform.SIMULATION
ROBOT_INSTANCE = RobotPlatform.HARDWARE
```
For a full list of extensions and detailed documentation, visit [robot-control-stack.org/extensions](https://robot-control-stack.org/extensions).

## Documentation

#### Command Line Interface
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.
You can see the available subcommands as follows:
```shell
python -m rcs_fr3 --help
python -m rcs_realsense --help
```

## Developer Documentation
See [robot-control-stack.org](https://robot-control-stack.org) for the development documentation.
For full documentation, including installation, usage, and API reference, please visit:

**[robot-control-stack.org](https://robot-control-stack.org)**

## Citation

If you find RCS useful for your academic work, please consider citing it:
```

```bibtex
@misc{juelg2025robotcontrolstack,
title={{Robot Control Stack}: {A} Lean Ecosystem for Robot Learning at Scale},
author={Tobias J{\"u}lg and Pierre Krack and Seongjin Bien and Yannik Blei and Khaled Gamal and Ken Nakahara and Johannes Hechtl and Roberto Calandra and Wolfram Burgard and Florian Walter},
year={2025},
howpublished = {\url{https://arxiv.org/abs/2509.14932}}
}
```
```

For more scientific info, visit the [paper website](https://robotcontrolstack.github.io/).
34 changes: 34 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Documentation

This directory contains the source code for the Robot Control Stack (RCS) documentation.

## Building Locally

To build the documentation locally, follow these steps:

1. **Install Dependencies**:
Ensure you have the documentation dependencies installed.

```shell
pip install -r requirements.txt
```

2. **Build**:
Run `sphinx-build` to generate the HTML documentation.

```shell
sphinx-build -b html . _build/html
```

3. **View**:
Open `_build/html/index.html` in your web browser.

## Live Reloading

For a better development experience, you can use `sphinx-autobuild` to automatically rebuild the documentation when you make changes.

```shell
sphinx-autobuild . _build/html
```

This will start a local server (usually at http://127.0.0.1:8000) and refresh the page whenever you save a file.
Empty file removed docs/_static/.keep
Empty file.
File renamed without changes.
File renamed without changes
7 changes: 7 additions & 0 deletions docs/_static/version_switcher.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[
{
"name": "latest",
"version": "latest",
"url": "https://robot-control-stack.org/"
}
]
10 changes: 10 additions & 0 deletions docs/api/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# API

```{toctree}
:maxdepth: 2

../getting_started/index
../user_guide/architecture
../user_guide/gym_interface
../user_guide/low_level_api
```
1 change: 0 additions & 1 deletion docs/changelog.md

This file was deleted.

79 changes: 52 additions & 27 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,48 +1,73 @@
import os
import sys
sys.path.insert(0, os.path.abspath('..'))

project = 'Robot Control Stack'
author = 'Tobias Jülg'
release = '0.4'
# inject path to rcs package to enable autodoc/autoapi to find packages
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "../python")))

project = "Robot Control Stack"
copyright = "2025, RCS Contributors"
author = "Tobias Jülg"
release = "0.5.2"
version = "0.5.2"

extensions = [
'myst_parser',
'sphinx.ext.autodoc',
'sphinx.ext.napoleon',
'sphinx.ext.viewcode',
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
"sphinx.ext.mathjax",
"sphinx.ext.viewcode",
"sphinx.ext.napoleon",
"sphinx.ext.intersphinx",
"sphinx_copybutton",
"myst_parser",
"sphinx_design",
]

templates_path = ['_templates']
exclude_patterns = []
# https://myst-parser.readthedocs.io/en/latest/syntax/optional.html
myst_enable_extensions = ["colon_fence", "dollarmath"]
myst_heading_anchors = 4

html_theme = 'pydata_sphinx_theme'
html_static_path = ['_static']
html_logo = "images/rcs_logo_multiline.svg"
html_favicon = "images/favicon.ico"
exclude_patterns = ["README.md"]

templates_path = ["_templates"]

html_theme = "pydata_sphinx_theme"
html_logo = "_static/rcs_logo_multiline.svg"
html_favicon = "_static/favicon.ico"

html_theme_options = {
"github_url": "https://github.com/RobotControlStack/robot-control-stack",
"use_edit_page_button": True,
"show_prev_next": False,
"navbar_start": ["navbar-logo"], # ensures the logo is shown
"icon_links": [
{
"name": "GitHub",
"url": "https://github.com/RobotControlStack/robot-control-stack",
"icon": "fa-brands fa-github",
},
],
"logo": {
"image_light": "images/rcs_logo_multiline.svg", # your PNG
"image_dark": "images/rcs_logo_multiline.svg", # can be same or a dark-mode version
"image_dark": "_static/rcs_logo_multiline.svg",
},
"navbar_center": ["version-switcher", "navbar-nav"],
"show_version_warning_banner": False,
"switcher": {
"json_url": "/_static/version_switcher.json",
"version_match": "latest",
},

}

html_context = {
"display_github": True,
"github_user": "RobotControlStack",
"github_repo": "robot-control-stack",
"github_version": "main", # branch name
"doc_path": "docs", # relative path in the repo where your docs live
"github_version": "main",
"conf_py_path": "/docs/",
}

html_static_path = ['_static']

# autodoc configs
autosummary_generate = True
autodoc_typehints = "description"
autodoc_member_order = "groupwise"

myst_enable_extensions = [
"colon_fence",
"deflist",
"linkify",
]
# Intersphinx mapping
intersphinx_mapping = {'gymnasium': ('https://gymnasium.farama.org/', None)}
1 change: 0 additions & 1 deletion docs/contributing.md

This file was deleted.

Loading