A lightweight executor for offline, time-based joint trajectories in robotic applications. Supports smooth interpolation between waypoints, callback-based control, and optional feedback monitoring.
- 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
pip install trajectory-executoror
git clone https://github.com/bxtbold/trajectory-executor.git
cd trajectory-executor
pip install -e .- Python 3.10+
numpy(>=1.20.0)loop-rate-limiters(>=0.1.0)
Explore usage examples integrated with different systems:
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)Run the test suite with pytest:
pip install pytest
pytest tests/test_robot_arm_trajectory-executor.py -v- 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
MIT License. See the LICENSE file.