Merge dev with main See merge request ics/sp/2025/n25b/pepperplus-ri!27
PepperPlus-RI
The robot interface is a high-level API for controlling the robot. It implements the API as designed: https://utrechtuniversity.youtrack.cloud/articles/N25B-A-14/RI-CB-Communication.
This is an implementation for the Pepper robot, using the Pepper SDK and Python 2.7 as required by the SDK.
Installation
Git Hooks
To activate automatic linting, formatting, branch name checks and commit message checks, run (after installing requirements):
pre-commit install
pre-commit install --hook-type commit-msg
Usage
On Linux and macOS:
PYTHONPATH=src python -m robot_interface.main
On Windows:
$env:PYTHONPATH="src"; python -m robot_interface.main
Program Arguments
If you want to connect to the actual robot (or simulator), pass the --qi-url argument.
There's also a --microphone argument that can be used to choose a microphone to use. If not given, the program will try the default microphone. If you don't know the name of the microphone, pass the argument with any value, and it will list the names of available microphones.
Environment Variables
You may use environment variables to change settings. Make a copy of the .env.example file, name it .env and put it in the root directory. The file itself describes how to do the configuration.
Testing
To run the unit tests, on Linux and macOS:
PYTHONPATH=src pytest test/
On Windows:
$env:PYTHONPATH="src"; pytest test/
Coverage
For coverage, add --cov=robot_interface as an argument to pytest.
Documentation
Generate documentation web pages using:
Linux & macOS
PYTHONPATH=src sphinx-apidoc -F -o docs src/robot_interface
Windows
$env:PYTHONPATH="src"; sphinx-apidoc -F -o docs src/control_backend
Optionally, in the conf.py file in the new docs folder, change preferences.
In the docs folder:
Linux & macOS
make html
Windows
.\make.bat html