Expand description
Motion profiles: the jerk-limited seven-segment S-curve, the sin² profile (Bestehorn), the polynomial motion laws 3-4-5 and 4-5-6-7 of VDI 2143, braking slower or faster than speeding up, and synchronised multi-axis moves.
A profile goes from rest to rest over a distance. The S-curve and the sin² profile speed up on a ramp, cruise and
brake on a ramp of their own (Profile::Ramps), each ramp within its own acceleration limit; the polynomial laws
run the whole distance in one law with no cruise. Any profile can be stretched in time (Profile::stretched):
speed, acceleration and jerk limits scaled by 1/k, 1/k^2 and 1/k^3 give the same shape k times as long, which is how
a planner synchronises moves to a common duration.
Structs§
- Limits
- The limits of a profile: speed, acceleration while speeding up, deceleration while braking (both positive), jerk.
- Motion
Law - How the moves of a machine are shaped: the shape, the braking limit as a share of the acceleration limit
(
profile.deceleration_ratio), and an axis that lifts against gravity (profile.vertical_axis): its index, the sign of up along it, and the share of its acceleration limit it has upwards (profile.up_acceleration_ratio). And where the tool’s orientation is a rotation vector rx, ry, rz whose flange has limits of its own (an arm in tool space, the checks “tool-angular-speed” and “tool-angular-acceleration”): the flange’s angular speed (rad/s) and acceleration (rad/s^2), which the move keeps beside the axes’ limits on the rotation vector (spin_rates). - Move
- A straight-line move of all axes that start and finish together. One profile runs the path from 0 to 1; its limits are the tightest of all axes.
- Ramp
- A ramp from rest to a speed
speedintime: an S-curve’s (jerk fortj, constant acceleration, jerk back fortj) or a sin²’s. It covers speed * time / 2 (both are symmetric about their middle). - SCurve
- Seven-segment S-curve over a distance, from rest to rest: jerk up, constant acceleration, jerk down, cruise, and the mirror image.
Enums§
- Profile
- A move from rest to rest over
distin one of the shapes. - Shape
- The shape of a move from rest to rest (
profile.shape, orshapeof a[[cycle.segment]]).
Functions§
- spin_
rates - Of a move whose rotation vector runs straight from
frombydelta(rad, over its share s from 0 to 1): the most |w| per unit of ds/dt and the most |dw/ds| per unit of (ds/dt)^2 anywhere on it, w the flange’s angular velocity (w = J(r) r’, J the rotation vector’s Jacobian, which is not 1 away from no turn: at r = (0, pi/2, 0) a rate of 1 rad/s on rz alone spins it at 2 sqrt(2) / pi = 0.900 rad/s). So |w| <= g1 ds/dt and |dw/dt| <= g1 |d2s/dt2| + g2 (ds/dt)^2. At 65 places along the move (the largest between them a rounding above), byspin_at.