Skip to content

Latest commit

 

History

History
78 lines (73 loc) · 2.6 KB

File metadata and controls

78 lines (73 loc) · 2.6 KB

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.

Requirements

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

Installation

  1. Install the system dependencies:
sudo apt install $(cat debian_deps.txt)
  1. Create, activate and configure a Python virtual environment:
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements_dev.txt
pip config --site set global.no-build-isolation false

2.5 (optional) include UTN models if you have an access token

pip config --site set install.config-settings "cmake.args=-DINCLUDE_UTN_MODELS=ON;-DGITLAB_MODELS_TOKEN=<token>"
  1. Build and install RCS:
pip install -ve .

Usage

The python package is called rcsss (sss because of the sound of a snake). Import the library in python:

import rcsss

Checkout the python examples that we provide in python/examples:

  • fr3.py shows direct robot control with RCS's python bindings
  • env_joint_control.py and env_cartesian_control.py demonstrates RCS's high level gymnasium interface both for joint- and end effector space control All of these examples work both in the MuJoCo simulation as well as on your hardware FR3. Just switch between the following settings in the example script
ROBOT_INSTANCE = RobotInstance.SIMULATION
# ROBOT_INSTANCE = RobotInstance.HARDWARE

and add your robot credentials to a .env file like this:

DESK_USERNAME=...
DESK_PASSWORD=...

Command Line Interface

The package includes a command line interface which define useful commands to handle the FR3 robot without the need to use the Desk Website. To list all available subcommands use:

python -m rcsss --help

Development

# check for c++ formatting errors
make cppcheckformat
# fix them
make cppformat
# Linting with clang tidy
make cpplint
# check for python formatting errors
make pycheckformat
# fix them
make pyformat
# Linting with ruff and mypy
make pylint
# Testing
make pytest

Stub Files for Python Bindings

We use autogenerated python stub files (.pyi) in the _core folder to show our linters the expected types of the C++ Python bindings. If the python bindings in the C++ code have changed you might need to regenerate them by using:

make stubgen