Trajectory · repose-trajectory
Timing joint paths
parameterize turns a list of joint waypoints into a trajectory that stops at each waypoint (by default), moves all joints in sync, and stays inside every joint's limits.
Call
let params = CuTimingParams {
limits: CuJointTrajectoryLimits::new(max_vel, max_acc), // [CuJointVelocity; N], [CuJointAcceleration; N]
profile: CuTrajectoryProfile::SCurve,
sample_period: Time::new::<second>(0.01),
};
let mut traj = CuTrajectoryPayload::<6, 1024>::new();
let status = parameterize(&waypoints, ¶ms, CuTimingOverrides::default(), &mut traj)?;
assert!(status.is_success());Profiles
trapezoidal (default) | Accelerate at the limit, cruise, decelerate. Triangular when there's no room to cruise. Fastest; acceleration jumps. |
s_curve | Jerk-limited 7-segment profile. Smooth acceleration, gentler on mechanics. Needs jerk limits for full effect: with infinite jerk it reduces to trapezoidal. |
minimum_jerk | Quintic polynomial per segment with zero end accelerations, honouring waypoint velocities. Very smooth, human-like. |
cubic | Cubic Hermite per segment through the given waypoint velocities. Use with overrides for fly-through motion. |
Configure a move
Set a one-joint move, choose its limits, and add a stop halfway. Compare the trajectory generated by parameterize with the starting configuration.
Loading trajectory calculator…
Computed by Repose 0.7.1 in your browser using parameterize with a 10 ms sample period and default rest-to-rest overrides. The charts show 201 calls to sample per trajectory.
Per segment, every joint's duration under its own limits is computed, and the slowest joint sets the segment time. Faster joints are slowed to match, so all joints start and stop together and the joint-space path stays a straight line. For S-curves, slowing scales velocity by s, acceleration by s² and jerk by s³, so every bound still holds.
Limits: CuJointTrajectoryLimits
max_velocities | Per joint, typed. Positive and finite for every movable joint. |
max_accelerations | Per joint, typed. Positive and finite. |
max_jerks | Optional (with_jerks). Positive, may be infinite. None = unbounded. |
The entry kinds must match the joint kinds (revolute values for revolute joints). These are your motion limits and are usually well below the robot's hardware maxima. Start slow.
Overrides
CuTimingOverrides changes the default rest-to-rest timing per call:
segment_durations: exactlylen − 1durations. The total is their exact sum. A duration shorter than the limits allow isInvalidInput.waypoint_velocities: a velocity at every waypoint, for thecubicandminimum_jerkprofiles, to pass through waypoints without stopping. Non-zero velocities under a rest-to-rest profile areInvalidInput.
Status: CuTimingStatus
Success | Written, ending at the final waypoint. |
EmptyPath | No waypoints. |
InvalidInput | A limit, duration, velocity or sample period is non-positive, non-finite, of the wrong kind, or inconsistent with the profile. |
CapacityExceeded | MAX_POINTS filled before the end: raise capacity or sample_period. |
The Cartesian statuses (Collision, ZoneExceeded, NoContinuousMotion, UnexpectedStop) come only from Cartesian path timing.