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

rust
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, &params, 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_curveJerk-limited 7-segment profile. Smooth acceleration, gentler on mechanics. Needs jerk limits for full effect: with infinite jerk it reduces to trapezoidal.
minimum_jerkQuintic polynomial per segment with zero end accelerations, honouring waypoint velocities. Very smooth, human-like.
cubicCubic 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_velocitiesPer joint, typed. Positive and finite for every movable joint.
max_accelerationsPer joint, typed. Positive and finite.
max_jerksOptional (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: exactly len − 1 durations. The total is their exact sum. A duration shorter than the limits allow is InvalidInput.
  • waypoint_velocities: a velocity at every waypoint, for the cubic and minimum_jerk profiles, to pass through waypoints without stopping. Non-zero velocities under a rest-to-rest profile are InvalidInput.

Status: CuTimingStatus

SuccessWritten, ending at the final waypoint.
EmptyPathNo waypoints.
InvalidInputA limit, duration, velocity or sample period is non-positive, non-finite, of the wrong kind, or inconsistent with the profile.
CapacityExceededMAX_POINTS filled before the end: raise capacity or sample_period.

The Cartesian statuses (Collision, ZoneExceeded, NoContinuousMotion, UnexpectedStop) come only from Cartesian path timing.

API reference