Skip to main content

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

  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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

trajectory_executor-0.1.0.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

trajectory_executor-0.1.0-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

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

Hashes for trajectory_executor-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6477e85d5c09929bcf14ff06cca517c34b238dbc17d9f138071b358ad9ab438b
MD5 a6c9f055acdf6a559b2788cd0d5745fb
BLAKE2b-256 0b5f249fa62ca536a57f0e915d1dcc14db484e046367206ae095622f48fd2bb6

See more details on using hashes here.

File details

Details for the file trajectory_executor-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for trajectory_executor-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 63aa292c07cd6d816a65993068861682b65805bed607d3e35c20724aa75c8856
MD5 a76337bde0fc235959cd588c00ef3261
BLAKE2b-256 358d9b229ee0b5cde4dad2885724d619559a6beb4ac81bb687b7d87b360f4132

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page