Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pollen-robotics/reachy2-sdk
Reachy 2 Python SDK
https://github.com/pollen-robotics/reachy2-sdk
pollen-robotics reachy sdk
Last synced: 3 months ago
JSON representation
Reachy 2 Python SDK
- Host: GitHub
- URL: https://github.com/pollen-robotics/reachy2-sdk
- Owner: pollen-robotics
- License: apache-2.0
- Created: 2023-08-10T13:11:11.000Z (over 1 year ago)
- Default Branch: develop
- Last Pushed: 2024-10-29T17:35:55.000Z (3 months ago)
- Last Synced: 2024-10-29T18:57:39.287Z (3 months ago)
- Topics: pollen-robotics, reachy, sdk
- Language: Python
- Homepage: https://www.pollen-robotics.com
- Size: 3.82 MB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 31
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Python SDK for Reachy 2
[![Licence](https://img.shields.io/badge/licence-Apache%202.0-blue)](LICENSE)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
![linter](https://github.com/pollen-robotics/reachy2-sdk/actions/workflows/lint.yml/badge.svg)
![pytest](https://github.com/pollen-robotics/reachy2-sdk/actions/workflows/unit_tests.yml/badge.svg)
![coverage](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/FabienDanieau/92452aca5c894f95fb934dc2a7a6815f/raw/covbadge.json)
![Docs](https://github.com/pollen-robotics/python-template/actions/workflows/docs.yml/badge.svg)## Install
Use the following command to install:
```console
$ pip install -e .[dev]
```The *[dev]* option includes tools for developers.
## Usage
Check out the [examples](src/examples/) folder for jupyter notebooks and example scripts.
## Documentation
Documentation is generated via pdoc, and it's available at [https://pollen-robotics.github.io/reachy2-sdk/reachy2_sdk.html](https://pollen-robotics.github.io/reachy2-sdk/reachy2_sdk.html)
It can be generated locally with:
```console
pdoc reachy2_sdk --output-dir docs --logo "https://pollen-robotics.github.io/reachy2-sdk/pollen_logo.png" --logo-link "https://www.pollen-robotics.com" --docformat google
```The documentation relies on the provided docstrings with the google style. pydocstyle is used to enforced this style.
```console
pydocstyle src/ --convention google --count
```## Unit tests
To ensure everything is functioning correctly, run the unit tests. There are two groups of tests: offline and online. Offline tests check internal functions using mock objects. Online tests require a connection to a simulated robot (e.g., in rviz), and the virtual robot should exhibit movement during these tests.
To execute the tests, use pytest with an optional category:
```console
$ pytest [-m offline|online]
```Note that only **offline tests** are executed by the Continuous Integration/Continuous Deployment (CI/CD) pipeline, as they don't require a gRPC connection.
### Camera tests
Camera tests have their own marks because it requires the cameras to be plugged to the sdk server
```console
$ pytest -m cameras
```## Logs
The SDK relies on the [python logging system](https://docs.python.org/3/howto/logging.html). Set the desired debug level to see messages from the SDK.
```python
import logging
logging.basicConfig(level=logging.DEBUG)
```