A lightweight executor for offline, time-based joint trajectories in robotic applications.
Project description
trajectory-executor
A lightweight executor for offline, time-based joint trajectories in robotic applications. Supports smooth interpolation between waypoints, callback-based control, and optional feedback monitoring.
Features
- Time-parameterized trajectory execution
- Linear interpolation between joint waypoints
- Rate-limited command publishing
- Thread-safe callbacks for sending commands and receiving feedback
- Minimal dependencies, easy to integrate
Installation
pip install trajectory-executor
or
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)
Examples
Explore usage examples integrated with different systems:
Usage
The TrajectoryExecutor 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.
import numpy as np
from trajectory_executor import TrajectoryExecutor
def update_callback(joints: np.ndarray):
print(f"Joint command: {joints}")
executor = TrajectoryExecutor(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:
pip install pytest
pytest tests/test_robot_arm_trajectory-executor.py -v
Contributing
- Fork and clone:
git clone https://github.com/bxtbold/trajectory-executor.git - Create a branch:
git checkout -b feature/your-feature - Add changes and tests in
tests/ - Run tests:
pytest - Submit a pull request
License
MIT License. See the LICENSE file.
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 trajectory_executor-0.2.0.tar.gz.
File metadata
- Download URL: trajectory_executor-0.2.0.tar.gz
- Upload date:
- Size: 8.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
40062ecbc92a90e691f39bdbcfcbb38ed0d5e47d615c4098ba53399df9e221d0
|
|
| MD5 |
e2d7fcaac5aa06fcb263eb404c89f313
|
|
| BLAKE2b-256 |
c25283bffbcede6eaf0c3fbe1012cbce545dca8c751edd4d23a385339bf1320e
|
File details
Details for the file trajectory_executor-0.2.0-py3-none-any.whl.
File metadata
- Download URL: trajectory_executor-0.2.0-py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9e6a8511ce2c20f48ac3b94084579791224c680b08f146fb6b84b4908b534b54
|
|
| MD5 |
c7ebc2d8330ae89713a0e3aaed524555
|
|
| BLAKE2b-256 |
bbfff7ee05f016e7a339fbb9c190a474a57b032c42f189d3dd83ce8ffd9c93be
|