94 lines
1.9 KiB
Markdown
94 lines
1.9 KiB
Markdown
# 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
|
|
|
|
- [Linux](./docs/installation/linux.md)
|
|
- [macOS](./docs/installation/macos.md)
|
|
- [Windows](./docs/installation/windows.md)
|
|
|
|
|
|
|
|
### Git Hooks
|
|
|
|
To activate automatic linting, formatting, branch name checks and commit message checks, run (after installing requirements):
|
|
|
|
```bash
|
|
pre-commit install
|
|
pre-commit install --hook-type commit-msg
|
|
```
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
On Linux and macOS:
|
|
|
|
```shell
|
|
PYTHONPATH=src python -m robot_interface.main
|
|
```
|
|
|
|
On Windows:
|
|
|
|
```shell
|
|
$env:PYTHONPATH="src"; python -m robot_interface.main
|
|
```
|
|
|
|
With both, 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.
|
|
|
|
|
|
|
|
## Testing
|
|
|
|
To run the unit tests, on Linux and macOS:
|
|
|
|
```shell
|
|
PYTHONPATH=src pytest test/
|
|
```
|
|
|
|
On Windows:
|
|
|
|
```shell
|
|
$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
|
|
```bash
|
|
PYTHONPATH=src sphinx-apidoc -F -o docs src/robot_interface
|
|
```
|
|
|
|
### Windows
|
|
```bash
|
|
$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
|
|
```bash
|
|
make html
|
|
```
|
|
|
|
### Windows
|
|
```bash
|
|
.\make.bat html
|
|
```
|