a
Second-order node profile. Element a(k) stores the squared path speed \((ds/dt)^2\) at station s(k).
P = copp.Profile3rd(A, B)
P = ...Profile3rd(..., num_stationary=[NS0, NSF])
A Profile3rd stores the two station profiles used by TOPP3/COPP3:
= \((ds/dt)^2\) \(b(k) = d^2s/dt^2\)
The stationary counters describe how many grid points at each end are treated as stationary by the third-order interpolation formulas. Solver outputs are copied into MATLAB-owned double column vectors of length N, so users do not manage native buffers or handles. A and B may be passed as row or column vectors, but obj.a and obj.b are always \(N \times 1\).
aSecond-order node profile. Element a(k) stores the squared path speed \((ds/dt)^2\) at station s(k).
bInterval or edge acceleration profile. For TOPP2 interpolation this is an (N-1)-by-1 column vector.
num_stationaryStationary interval counts [start, end] of a third-order profile. Default: [0, 0]
aNode profile a(s) = \((ds/dt)^2\) as an \(N \times 1\) double column vector.
bNode profile b(s) = \(d^2s/dt^2\) as an \(N \times 1\) double column vector.
num_stationary_startNumber of stationary nodes at the profile start.
num_stationary_endNumber of stationary nodes at the profile end.
lenNumber of station samples in a and b.
num_stationaryTwo-element vector [start, end].
Profile3rdConstruct a MATLAB-owned third-order profile.
lengthNumber of station samples in scalar Profile3rd objects.
force_positive_aAdjust a and b so interpolated a(s) stays positive.
Profile3rdP = copp.Profile3rd(A, B)
P = ...Profile3rd(..., num_stationary=[NS0, NSF])
copies real finite vectors A and B into \(N \times 1\) double column vectors. A and B may be \(1 \times N\) or \(N \times 1\), but they must have the same number of elements. A must be nonnegative because a(k) stores \((ds/dt)^2\).
stores the stationary-node metadata returned by TOPP3 solvers.
lengthvalue = length(obj)
force_positive_a[P, SUCCEEDED] = force_positive_a(P, S)
vector with numel(S) == P.len and at least four stations. The
Returns a copy of profile P whose a and b node values are adjusted so the third-order interpolated a(s) stays strictly positive on every interval of the station grid S. S must be a strictly increasing real finite vector with numel(S) == P.len and at least four stations. The returned object keeps the class of P, including solver-local Profile3rd aliases, and its num_stationary metadata.
SUCCEEDED is false when the adjustment failed for some interval. This is not an error, but other intervals may still have been adjusted, so keep using the original profile in that case. Invalid input raises copp:InvalidArgument: a length mismatch, fewer than four stations, negative a or a_min, non-finite values, non-increasing S, or stationary counts that leave no motion interval.
This is a numerical safety pass for profiles whose a values may touch zero because of finite precision, applied before s_to_t_topp3. It rewrites a and b without knowing the robot limits, so re-check the delivered profile with topp3">Robot.exceed_topp3 afterwards.
Name-value options: a_min: Nonnegative lower target for interpolated a. Defaults to 1e-12.
profile = copp.Profile3rd(ones(3,1), zeros(3,1), ... num_stationary=[0, 0]);