Skip to main content

Minimum-jerk trajectory generation and 1-DOF inverse dynamics

Project description

minjerk-dynamics

Minimum-jerk trajectory generation and 1-DOF inverse dynamics.

This is a custom package developed for Task T3.4 of the Neurorobotics EBRAINS 2.0 work package. It is used in three components of the neurocontroller:

  • Mocked planner: generates smooth minimum-jerk reference trajectories for the robot to follow.
  • GLE-based planner: trains a neural planner using minimum-jerk trajectories as targets.
  • E-prop motor cortex: trains an M1 network (using the mocked planner) with inverse-dynamics motor commands as targets.

What it does

  • Minimum-jerk trajectories: 5th-order polynomials for smooth point-to-point movement, with support for padded prep/post phases and M1 delay shifting.
  • Motor commands: computes joint torques via inverse dynamics (torques = I * acc + gravity) from the generated trajectory.

Usage

from minjerk_dynamics.trajectory import generate_trajectory, generate_motor_commands
from minjerk_dynamics.dynamics import inverse_dynamics_1dof

# Trajectory (angles in radians, times in milliseconds)
traj = generate_trajectory(
    init_angle_rad=0.0,
    target_angle_rad=1.0,
    resolution_ms=1.0,
    time_prep_ms=500.0,
    time_move_ms=1000.0,
    time_locked_with_feedback_ms=500.0,
    time_post_ms=200.0,
    m1_delay_ms=50.0,
)

# Motor commands (torques)
torques = generate_motor_commands(
    init_angle_rad=0.0,
    target_angle_rad=1.0,
    resolution_ms=1.0,
    time_prep_ms=500.0,
    time_move_ms=1000.0,
    time_locked_with_feedback_ms=500.0,
    time_post_ms=200.0,
    inertia=0.02,
)

Installation

pip install minjerk-dynamics

Only dependency is numpy. Requires Python >= 3.10.

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

minjerk_dynamics-0.1.1.dev638.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

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

minjerk_dynamics-0.1.1.dev638-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file minjerk_dynamics-0.1.1.dev638.tar.gz.

File metadata

  • Download URL: minjerk_dynamics-0.1.1.dev638.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for minjerk_dynamics-0.1.1.dev638.tar.gz
Algorithm Hash digest
SHA256 7d9c347734da216c2828b1fb82228dc4a51bdbcc4854ee0cee55fe24a29c777a
MD5 3262be230dbe5fafbb8e6dc2f8af2d31
BLAKE2b-256 698b806c531518d97082bf71b78d00955942f37e796b914a14c9c380ef9b4244

See more details on using hashes here.

Provenance

The following attestation bundles were made for minjerk_dynamics-0.1.1.dev638.tar.gz:

Publisher: publish-minjerk.yml on near-nes/controller

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file minjerk_dynamics-0.1.1.dev638-py3-none-any.whl.

File metadata

File hashes

Hashes for minjerk_dynamics-0.1.1.dev638-py3-none-any.whl
Algorithm Hash digest
SHA256 2163e80c83efe9a96ef2892cecce003b3f57b223c604dab7d5248e01c7e25fc5
MD5 780f8a6073a47dfcf5349da8473ed70a
BLAKE2b-256 ce2d67143f7414fd5ac1135fcacb4252400380081839671878d1ab179d578a5f

See more details on using hashes here.

Provenance

The following attestation bundles were made for minjerk_dynamics-0.1.1.dev638-py3-none-any.whl:

Publisher: publish-minjerk.yml on near-nes/controller

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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