https://github.com/neurobionics/opensourceleg
An open-source SDK for developing and testing algorithms on commonly used robotic hardware.
https://github.com/neurobionics/opensourceleg
control-systems prostheses prosthetic-limbs prosthetics python python3 robotics
Last synced: 8 months ago
JSON representation
An open-source SDK for developing and testing algorithms on commonly used robotic hardware.
- Host: GitHub
- URL: https://github.com/neurobionics/opensourceleg
- Owner: neurobionics
- License: lgpl-2.1
- Created: 2022-04-15T18:50:21.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-05-03T20:54:04.000Z (8 months ago)
- Last Synced: 2025-05-07T17:14:21.138Z (8 months ago)
- Topics: control-systems, prostheses, prosthetic-limbs, prosthetics, python, python3, robotics
- Language: Python
- Homepage: https://neurobionics.github.io/opensourceleg/
- Size: 36.4 MB
- Stars: 44
- Watchers: 3
- Forks: 45
- Open Issues: 23
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# opensourceleg
[](https://github.com/neurobionics/opensourceleg/actions/workflows/main.yml)
[](https://neurobionics.github.io/opensourceleg/)
[](https://pypi.org/project/opensourceleg/)
[](https://github.com/neurobionics/opensourceleg/pulls?utf8=%E2%9C%93&q=is%3Apr%20author%3Aapp%2Fdependabot)
[](https://github.com/psf/black)
[](https://github.com/PyCQA/bandit)
[](https://github.com/neurobionics/opensourceleg/blob/main/.pre-commit-config.yaml)
[](https://github.com/neurobionics/opensourceleg/blob/main/LICENSE)
[](https://github.com/neurobionics/opensourceleg/actions/workflows/main.yml)
An open-source SDK for developing and testing algorithms on commonly used robotic hardware. Originally developed for the [Open-Source Leg](https://www.opensourceleg.org/) project, this library provides a comprehensive framework for interfacing with various actuators and sensors in robotic systems. While initially designed for prosthetic leg applications, the `opensourceleg` library's modular architecture makes it versatile for use with any robotic platform utilizing similar components.

## ๐ฏ Key Features
This library solves common challenges in developing, testing, and deploying robotic algorithms:
| Feature | Description |
| ------------------------------- | ------------------------------------------------------------------- |
| ๐ฆ Standardized Interfaces | Provides consistent interfaces for common actuators and sensors |
| ๐ Ready-to-Use Implementations | Offers ready-to-use implementations for popular hardware components |
| ๐ Extensible Architecture | Allows for easy integration of custom components |
| ๐งช Comprehensive Benchmarks | Includes comprehensive benchmarks for popular hardware components |
## ๐ฅ Ideal for Roboticists Who
- Want to develop robotic algorithms for the Open-Source Leg platform or any other robotic platform
- Need a reliable and extensible framework for interfacing with various actuators and sensors
- Are working on a robotic project and need a flexible and powerful software development kit
- Are looking for benchmarks to pick the best hardware for their robotic project
## ๐ Available Hardware Interfaces
The library currently supports the following hardware components:
| Sensors | Unit Tests | Hardware Tests | Benchmarks | Documentation |
| -------------------- | ---------- | -------------- | ---------- | ------------- |
| AS5048B Encoder | โ
| โ
| โ | โ
|
| Lord Microstrain IMU | โ
| โ
| โ | โ
|
| SRI Loadcell | โ
| โ
| โ | โ
|
| Actuators | Unit Tests | Hardware Tests | Benchmarks | Documentation |
| ------------- | ---------- | -------------- | ---------- | ------------- |
| Dephy Actpack | โ ๏ธ | โ
| โ ๏ธ | โ
|
| Moteus | โ ๏ธ | โ ๏ธ | โ ๏ธ | โ
|
| TMotor | โ | โ ๏ธ | โ | โ |
> Legend: โ
Complete/Available; โ ๏ธ Partial/In Progress; โ Not Yet Available;
Hardware tests indicate successful testing on physical devices.
Benchmarks include performance metrics such as response time and accuracy measurements.
Documentation includes API reference and usage examples.
## ๐ฆ Installation
The library is available on PyPI and can be installed using pip:
```bash
pip install opensourceleg
```
### Hardware-Specific Dependencies
To keep your installation lightweight, you can install only the dependencies needed for your specific hardware:
```bash
# For Dephy actuators
pip install opensourceleg[dephy]
# For Moteus actuators
pip install opensourceleg[moteus]
# For I2C communication
pip install opensourceleg[communication]
```
| Extra | Dependencies |
| --------------- | ------------------------------------ |
| `dephy` | flexsea |
| `moteus` | moteus, moteus-pi3hat |
| `communication` | smbus2 |
| `messaging` | grpcio, grpcio-tools, types-protobuf |
For more details on the installation process, please refer to the [installation guide](https://neurobionics.github.io/opensourceleg/installation).
## ๐ Usage
Once the library is installed, you can import it in your projects and start using the modules:
```python
from opensourceleg.actuators.dephy import DephyActuator
from opensourceleg.sensors.encoder import AS5048B
...
```
For more details on available modules, tutorials, and examples, please refer to the [documentation](https://neurobionics.github.io/opensourceleg/tutorials/sensors/getting_started).
## ๐ License
The `opensourceleg` library is licensed under the terms of the [LGPL-v2.1 license](https://github.com/neurobionics/opensourceleg/raw/main/LICENSE). This license grants users a number of freedoms:
- You are free to use the `opensourceleg` library for any purpose.
- You are free to modify the `opensourceleg` library to suit your needs.
- You can study how the `opensourceleg` library works and change it.
- You can distribute modified versions of the `opensourceleg` library.
The LGPL license ensures that all these freedoms are protected, now and in the future, requiring everyone to share their modifications when they also share the library in public.
## ๐ค Contributing
Contributions are welcome, and they are greatly appreciated! For more details, read our [contribution guidelines](https://github.com/neurobionics/opensourceleg/blob/main/CONTRIBUTING.md).