Skip to content

bxtbold/trajectory-executor

Repository files navigation

trajectory-executor

Build PyPI version

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

  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 file.

About

A lightweight executor for offline, time-based joint trajectories in robotic applications.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages