Execute time-based joint trajectories for robot arms with rate-limited, thread-safe updates
Project description
trajectory-executor
Execute time-based joint trajectories for robot arms with rate-limited, thread-safe updates.
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)
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.
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:
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.1.0.tar.gz.
File metadata
- Download URL: trajectory_executor-0.1.0.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6477e85d5c09929bcf14ff06cca517c34b238dbc17d9f138071b358ad9ab438b
|
|
| MD5 |
a6c9f055acdf6a559b2788cd0d5745fb
|
|
| BLAKE2b-256 |
0b5f249fa62ca536a57f0e915d1dcc14db484e046367206ae095622f48fd2bb6
|
File details
Details for the file trajectory_executor-0.1.0-py3-none-any.whl.
File metadata
- Download URL: trajectory_executor-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.4 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 |
63aa292c07cd6d816a65993068861682b65805bed607d3e35c20724aa75c8856
|
|
| MD5 |
a76337bde0fc235959cd588c00ef3261
|
|
| BLAKE2b-256 |
358d9b229ee0b5cde4dad2885724d619559a6beb4ac81bb687b7d87b360f4132
|