Skip to content

Latest commit

 

History

History
75 lines (69 loc) · 2.01 KB

File metadata and controls

75 lines (69 loc) · 2.01 KB

Robot Control Stack

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

The package includes a command line interface which define useful commands to handle the hardware robot. To list all available subcommands use:

python -m rcsss --help

A sample config can be generated via the following CLI command.

python -m rcsss sample-config

The command will produce a config.yaml file with sample values. See config.py for a description of the config fields.

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

To build the documentation locally

cd docs
sphinx-build -M html ./source/ ./build

docs/build/html/index.html will the final document