A solely NumPy-dependent robotics Python package for basic kinematics, dynamics, and others.
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file robotics_numpy-0.1.0.tar.gz.
File metadata
- Download URL: robotics_numpy-0.1.0.tar.gz
- Upload date:
- Size: 373.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f5ec401c2f906d568193149c175bb6ddc3836be104eb9cccfb0b1be65cd5da1
|
|
| MD5 |
4ebe416da7abd2d2ccb53a08e8ce2509
|
|
| BLAKE2b-256 |
ce88896de841f593f77c18bf4b92788b2b13edc749d8fff95504f94e76a51565
|
File details
Details for the file robotics_numpy-0.1.0-py3-none-any.whl.
File metadata
- Download URL: robotics_numpy-0.1.0-py3-none-any.whl
- Upload date:
- Size: 42.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bc5eadd444acd697cb746f76dd82050028ea9e682574a722841dd1bfbf9543bf
|
|
| MD5 |
c7b6294fe3a2f4965688a6ff165bfede
|
|
| BLAKE2b-256 |
1cf2091ceee3780b237534918f11d3030936440d59b7efe716a159d600d6bc20
|