Fork me on GitHub

bolero.datasets.make_minimum_jerk

bolero.datasets.make_minimum_jerk(start, goal, execution_time=1.0, dt=0.01)[source]

Create a minimum jerk trajectory.

A minimum jerk trajectory from \(x_0\) to \(g\) minimizes the third time derivative of the positions:

\[\arg \min_{x_0, \ldots, x_T} \int_{t=0}^T \dddot{x}(t)^2 dt\]

The trajectory will have

n_steps = 1 + execution_time / dt

steps because we start at 0 seconds and end at execution_time seconds.

Parameters:
start : array-like, shape (n_task_dims,)

Initial state

goal : array-like, shape (n_task_dims,)

Goal

execution_time : float, optional (default: 1)

Execution time in seconds

dt : float, optional (default: 0.01)

Time between successive steps in seconds

Returns:
X : array, shape (n_task_dims, n_steps, 1)

The positions of the trajectory

Xd : array, shape (n_task_dims, n_steps, 1)

The velocities of the trajectory

Xdd : array, shape (n_task_dims, n_steps, 1)

The accelerations of the trajectory