Metadata-Version: 2.4
Name: trajectory-executor
Version: 0.1.0
Summary: Execute time-based joint trajectories for robot arms with rate-limited, thread-safe updates
Author-email: bxtbold <bxtbold@protonmail.com>
License: MIT License
Project-URL: Homepage, https://github.com/bxtbold/trajectory-executor
Project-URL: Documentation, https://bxtbold.github.io/trajectory-executor
Project-URL: Repository, https://github.com/bxtbold/trajectory-executor
Project-URL: Issues, https://github.com/bxtbold/trajectory-executor/issues
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Framework :: Robot Framework :: Tool
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: loop-rate-limiters>=1.1.0
Requires-Dist: numpy>=1.26.4
Provides-Extra: test
Requires-Dist: pytest>=8.0.0; extra == "test"
Requires-Dist: pytest-mock>=3.14.0; extra == "test"
Requires-Dist: pytest-cov>=5.0.0; extra == "test"
Requires-Dist: mujoco>=3.2.4; extra == "test"
Requires-Dist: torch; extra == "test"
Requires-Dist: genesis-world==0.2.1; extra == "test"
Provides-Extra: dev
Requires-Dist: black>=24.8.0; extra == "dev"
Requires-Dist: flake8>=7.1.1; extra == "dev"
Requires-Dist: pre-commit>=3.8.0; extra == "dev"
Requires-Dist: trajectory-executor[test]; extra == "dev"
Dynamic: license-file

# trajectory-executor

<!-- [![Build](https://img.shields.io/github/actions/workflow/status/bxtbold/trajectory-executor/ci.yml?branch=main)](https://github.com/bxtbold/trajectory-executor/actions) -->
<!-- [![PyPI version](https://img.shields.io/pypi/v/trajectory-executor)](https://pypi.org/project/trajectory-executor/) -->
<!-- [![Documentation](https://img.shields.io/github/actions/workflow/status/bxtbold/trajectory-executor/docs.yml?branch=main&label=docs)](https://bxtbold.github.io/trajectory-executor/) -->

Execute time-based joint trajectories for robot arms with rate-limited, thread-safe updates.

## Installation

```console
pip install trajectory-executor
```

or

```console
git clone https://github.com/bxtbold/trajectory-executor.git
cd trajectory-executor
pip install -e .
```

### Dependencies

- Python 3.10+
- `numpy` (>=1.20.0)
- `loop-rate-limiters` (>=0.1.0)

## Usage

The `RobotArmTrajectoryExecutor` class executes joint trajectories for a robot arm with specified degrees of freedom (DOF). It interpolates positions, sends commands via a callback, and supports optional feedback processing.

```python
import numpy as np
from trajectory-executor import RobotArmTrajectoryExecutor

def update_callback(joints: np.ndarray):
    print(f"Joint command: {joints}")

executor = RobotArmTrajectoryExecutor(dof=3, update_callback=update_callback)
points = np.array([[0.0, 0.0, 0.0], [1.0, 1.0, 1.0]])
times = np.array([0.0, 1.0])
executor.execute(points, times)
```

## Testing

Run the test suite with `pytest`:

```console
pip install pytest
pytest tests/test_robot_arm_trajectory-executor.py -v
```

## Contributing

1. Fork and clone: `git clone https://github.com/bxtbold/trajectory-executor.git`
2. Create a branch: `git checkout -b feature/your-feature`
3. Add changes and tests in `tests/`
4. Run tests: `pytest`
5. Submit a pull request

## License

MIT License. See the [LICENSE](LICENSE) file.
