Metadata-Version: 2.4
Name: robotics-numpy
Version: 0.1.0
Summary: A solely NumPy-dependent robotics Python package for basic kinematics, dynamics, and others.
Author-email: Chaoyue Fei <chaoyue.fei@vub.be>
License-Expression: MIT
License-File: LICENSE
Keywords: dynamics,forward-kinematics,inverse-kinematics,kinematics,lightweight,motion-planning,numpy,robot-manipulator,robotics
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Mathematics
Classifier: Topic :: Scientific/Engineering :: Physics
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.9
Requires-Dist: numpy
Provides-Extra: all
Requires-Dist: plotly>=5.0.0; extra == 'all'
Provides-Extra: docs
Requires-Dist: mkdocs-jupyter>=0.24.0; extra == 'docs'
Requires-Dist: mkdocs-material>=9.0.0; extra == 'docs'
Requires-Dist: mkdocstrings[python]>=0.20.0; extra == 'docs'
Provides-Extra: rtb
Requires-Dist: black>=23.0.0; extra == 'rtb'
Requires-Dist: mypy>=1.0.0; extra == 'rtb'
Requires-Dist: plotly; extra == 'rtb'
Requires-Dist: pytest-benchmark>=4.0.0; extra == 'rtb'
Requires-Dist: pytest-cov>=4.0.0; extra == 'rtb'
Requires-Dist: pytest>=7.0.0; extra == 'rtb'
Requires-Dist: roboticstoolbox-python; extra == 'rtb'
Requires-Dist: ruff>=0.1.0; extra == 'rtb'
Provides-Extra: test
Requires-Dist: black; extra == 'test'
Requires-Dist: mypy; extra == 'test'
Requires-Dist: plotly; extra == 'test'
Requires-Dist: pytest; extra == 'test'
Requires-Dist: pytest-benchmark; extra == 'test'
Requires-Dist: pytest-cov; extra == 'test'
Requires-Dist: ruff; extra == 'test'
Provides-Extra: visualization
Requires-Dist: plotly>=5.0.0; extra == 'visualization'
Description-Content-Type: text/markdown

# robotics-numpy

[![PyPI version](https://badge.fury.io/py/robotics-numpy.svg)](https://badge.fury.io/py/robotics-numpy)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Python 3.8+](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/)
[![Powered by the Robotics Toolbox](https://raw.githubusercontent.com/petercorke/robotics-toolbox-python/master/.github/svg/rtb_powered.min.svg)](https://github.com/petercorke/robotics-toolbox-python)

A **lightweight, high-performance robotics library** inspired by Peter Corke's [robotics-toolbox-python](https://github.com/petercorke/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

```bash
# Core library (NumPy only)
pip install robotics-numpy

# With visualization support (requires Plotly)
pip install robotics-numpy[visualization]
```

### Basic Usage: Transformations

```python
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)

```python
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.

```bash
# 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](LICENSE) for details.

## Acknowledgments

Inspired by Peter Corke's [Robotics Toolbox](https://github.com/petercorke/robotics-toolbox-python),
with a focus on minimal dependencies.
