robotics-numpy
A lightweight, high-performance robotics library inspired by Peter Corke's robotics-toolbox-python, offering similar functionality with a strict NumPy-only dependency.
Core Principles & Goals
- Inspired by
robotics-toolbox-python: Mimics API, function usage, and overall approach for a familiar user experience. - NumPy-centric: All core functionality relies solely on NumPy for minimal dependencies.
- Simple: Clean, intuitive API for easy learning.
Ideal for education, research, and applications where dependency management is critical.
Quick Start
Installation
# Core library (NumPy only)
pip install robotics-numpy
# With visualization support (requires Plotly)
pip install robotics-numpy[visualization]
Basic Usage: Transformations
import robotics_numpy as rn
import numpy as np
# Create transformations (mimicking robotics-toolbox API)
T1 = rn.SE3.Trans(1, 2, 3) # Translation
T2 = rn.SE3.RPY(0.1, 0.2, 0.3) # Rotation from RPY
T3 = T1 * T2 # Compose transformations
# Transform points
point = [0, 0, 0]
transformed_point = T3 * point
print(f"Transformed point: {transformed_point}")
Basic Usage: Robot Kinematics (v0.2.0)
import robotics_numpy as rn
import numpy as np
# Define a simple 2-DOF robot (similar to robotics-toolbox syntax)
robot = rn.models.DHRobot([
rn.models.RevoluteDH(d=0.1, a=0.2, alpha=0, qlim=[-np.pi, np.pi]),
rn.models.PrismaticDH(theta=0, a=0.1, alpha=0, qlim=[0, 0.5]),
])
# Forward kinematics
q = [np.pi / 4, 0.3]
pose = robot.fkine(q)
print(f"End-effector pose: {pose}")
# Jacobian
jacobian = robot.jacob0(q)
print(f"Jacobian:\n{jacobian}")
Performance Comparison
This table benchmarks key operations, comparing robotics-numpy (NumPy-based) against roboticstoolbox-python.
================================================================================
Performance Comparison Table
================================================================================
| Feature | robotics-numpy | rtb | Difference (%) |
|---------------------|------------------------|------------------------|----------------|
| Forward Kinematics | 0.870 ms | 0.026 ms | +3189.61% |
| | 2.441 ms | 0.054 ms | +4432.86% |
| Jacobian | 1.997 ms | 0.074 ms | +2599.14% |
| | 5.520 ms | 0.158 ms | +3397.66% |
| Manipulability | 5.482 ms | 0.330 ms | +1559.99% |
================================================================================
Contributing
We welcome contributions! Our focus is on:
- Readability: Clear algorithms over complex optimizations.
- Testability: Comprehensive unit and integration tests.
- Documentation: Well-documented code and examples.
# Development setup
git clone https://github.com/chaoyue/robotics-numpy
cd robotics-numpy
pip install -e .[dev] # Or use uv for dependency management
# Run tests
pytest
# Check code quality
ruff check .
mypy src/
License
MIT License - see LICENSE for details.
Acknowledgments
Inspired by Peter Corke's Robotics Toolbox, with a focus on minimal dependencies.
Metadata
Release files for robotics-numpy 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| robotics_numpy-0.1.0.tar.gz | 373.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| robotics_numpy-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 415.9 kB
Release files / robotics_numpy-0.1.0.tar.gz
| Download URL | robotics_numpy-0.1.0.tar.gz |
|---|---|
| Size | 373.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7f5ec401c2f906d568193149c175bb6ddc3836be104eb9cccfb0b1be65cd5da1
|
|
BLAKE2b-256 checksum How to use checksums |
ce88896de841f593f77c18bf4b92788b2b13edc749d8fff95504f94e76a51565
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.15
|
Release files / robotics_numpy-0.1.0-py3-none-any.whl
| Download URL | robotics_numpy-0.1.0-py3-none-any.whl |
|---|---|
| Size | 42.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bc5eadd444acd697cb746f76dd82050028ea9e682574a722841dd1bfbf9543bf
|
|
BLAKE2b-256 checksum How to use checksums |
1cf2091ceee3780b237534918f11d3030936440d59b7efe716a159d600d6bc20
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.15
|