Opensourceleg
An open-source SDK for developing and testing algorithms on commonly used robotic hardware.
Install / Use
/learn @neurobionics/OpensourcelegREADME
opensourceleg: An open-source SDK for developing and testing algorithms on commonly used robotic hardware. Originally developed for the Open-Source Leg 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.
Note: Starting from version
opensourceleg 3.3.0, only Python 3.11 and above are supported. If you need compatibility with Python 3.9, please installopensourceleg 3.2.1:pip install opensourceleg==3.2.1Python 3.10 is not supported.
🎯 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
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.
</details>📦 Installation
The library is available on PyPI and can be installed using pip:
pip install opensourceleg
<details>
<summary>🔧 Hardware-Specific Dependencies</summary>
To keep your installation lightweight, you can install only the dependencies needed for your specific hardware:
# 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.
📚 Usage
Once the library is installed, you can import it in your projects and start using the modules:
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.
/ Community Activity 
Contributors ✨
Thanks to all the wonderful people who have contributed to the project!
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --> <!-- prettier-ignore-start --> <!-- markdownlint-disable --> <table> <tbody> <tr> <td align="center" valign="top" width="20%"><a href="https://senthurayyappan.com"><img src="https://avatars.githubusercontent.com/u/25511437?v=4?s=100" width="100px;" alt="Senthur Ayyappan"/><br /><sub><b>Senthur Ayyappan</b></sub></a><br /><a href="#infra-senthurayyappan" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="#security-senthurayyappan" title="Security">🛡️</a> <a href="#maintenance-senthurayyappan" title="Maintenance">🚧</a> <a href="https://github.com/neurobionics/opensourceleg/commits?author=senthurayyappan" title="Code">💻</a></td> <td align="center" valign="top" width="20%"><a href="http://tkevinbest.github.io"><img src="https://avatars.githubusercontent.com/u/70407790?v=4?s=100" width="100px;" alt="tkevinbest"/><br /><sub><b>tkevinbest</b></sub></a><br /><a href="https://github.com/neurobionics/opensourceleg/issues?q=author%3Atkevinbest" title="Bug reports">🐛</a> <a href="https://github.com/neurobionics/opensourceleg/commits?author=tkevinbest" title="Tests">⚠️</a> <a href="#example-tkevinbest" title="Examples">💡</a> <a href="https://github.com/neurobionics/opensourceleg/commits?author=tkevinbest" title="Code">💻</a></td> <td align="center" valign="top" width="20%"><a href="https://github.com/jderosia"><img src="https://avatars.githubusercontent.com/u/134736683?v=4?s=100" width="100px;" alt="jderosia"/><br /><sub><b>jderosia</b></sub></a><br /><a href="https://github.com/neurobionics/opensourceleg/commits?author=jderosia" title="DocumeRelated Skills
node-connect
343.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
claude-opus-4-5-migration
92.1kMigrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5
frontend-design
92.1kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
model-usage
343.3kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
