We build and test RCS on the latest Debian and on the latest Ubuntu LTS.
- Install the system dependencies:
sudo apt install $(cat debian_deps.txt)- 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 false2.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>"- Build and install RCS:
pip install -ve .The python package is called rcsss (sss because of the sound of a snake).
Import the library in python:
import rcsssThe package includes a command line interface which define useful commands to handle the hardware robot. To list all available subcommands use:
python -m rcsss --helpA sample config can be generated via the following CLI command.
python -m rcsss sample-configThe command will produce a config.yaml file with sample values.
See config.py for a description of the config fields.
# 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 pytestWe 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 stubgencd docs
sphinx-build -M html ./source/ ./build
docs/build/html/index.html will the final document