Trajectory API
skelarm.trajectory
Reference trajectories for motion planning.
A :class:Trajectory moves a vector from start to end over a fixed
duration following a smooth time-scaling schedule s(t), returning position,
velocity, and acceleration samples. It is dimension-agnostic, so the same class
produces task-space endpoint references p_r(t) and joint-space references
q_r(t).
Trajectory
A smooth point-to-point reference for a vector quantity.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
start
|
ArrayLike
|
The initial and final vectors (same shape). |
required |
end
|
ArrayLike
|
The initial and final vectors (same shape). |
required |
duration
|
float
|
Motion duration; must be positive. |
required |
schedule
|
str
|
The time-scaling schedule (see :data: |
'quintic'
|
Source code in src/skelarm/trajectory.py
__init__(start, end, duration, schedule='quintic')
Initialize the trajectory and validate its schedule and duration.
Source code in src/skelarm/trajectory.py
sample(t)
Return (y, dy, ddy) at time t (position, velocity, acceleration).
Source code in src/skelarm/trajectory.py
evaluate_schedule(name, t, duration)
Evaluate a time-scaling schedule and its time derivatives.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
One of :data: |
required |
t
|
float
|
Time. Values outside |
required |
duration
|
float
|
Total motion duration; must be positive. |
required |
Returns:
| Type | Description |
|---|---|
tuple[float, float, float]
|
The progress |
Raises:
| Type | Description |
|---|---|
ValueError
|
If |