robot
A copp.Robot object containing sampled path data, limits, and constraints.
P = copp.solver.topp3.Problem(ROBOT, A_LINEARIZATION)
small a_linearization(k) leaves a(k) <= 3*a_linearization(k).
profile = copp.solver.topp3_lp.solve(problem)
refined = copp.solver.topp3_lp.Problem(robot, max(profile.a, 0)
This descriptor is shared by solver.topp3_lp, solver.topp3_socp, and COPP3 facades that inherit from it. Solver-specific Problem classes are convenience facades for readability; they are not strict namespace gates. The shared descriptor stores a borrowed Robot reference, an owned a-linearization profile, and boundary/stationary metadata. The constructor only validates and copies MATLAB data; it does not linearize third-order constraints.
Shape convention: a_linearization may be a row or column vector but is stored as an s_len-by-1 column. The optional b_linearization is stored the same way, or as a 0-by-1 column when empty. a_boundary and b_boundary are \(1 \times 2\) vectors. num_stationary_max is a scalar or \(1 \times 2\) vector [start, end]. TOPP3 and COPP3 solve() functions return Profile3rd objects whose a and b fields are s_len-by-1 double columns.
Lazy linearization: TOPP3-LP/SOCP solve() calls pass this descriptor to the native solver. The native solver linearizes third-order constraints at solve time and mutates the Robot's internal third-order linearized-constraint cache. Reusing the same Robot with a different a_linearization is valid, but the most recent solve determines the native cache contents.
robotA copp.Robot object containing sampled path data, limits, and constraints.
a_linearizationSeed a(s) profile used to linearize third-order constraints.
idx_s_start1-based start station for third-order problems. The covered interval runs from this station through the stored profile length. Default: 1
a_boundaryEndpoint squared-speed values [a_start, a_final] for the selected station interval. Default: [0, 0]
b_boundaryEndpoint path-acceleration values [b_start, b_final] for third-order profiles. Default: [0, 0]
num_stationary_maxMaximum number of stationary nodes allowed by the third-order profile descriptor. Default: 1
a_linearization_floorPositive floor applied to a_linearization when forming third-order linearization data. Default: 1.0e-10
b_linearizationOptional b(s) profile paired with a_linearization. Empty selects direct linearization; the a and b of a previously solved third-order profile select adaptive linearization. Default: []
robotReferenced Robot that owns station samples and constraints.
a_linearizationOwned node profile used for third-order linearization.
idx_s_startPublic 1-based first station covered by this problem.
idx_s_finalPublic 1-based final station covered by this problem.
idx_s_intervalClosed 1-based interval [idx_s_start, idx_s_final].
a_boundaryEndpoint values [a_start, a_final].
b_boundaryEndpoint values [b_start, b_final].
num_stationary_max_startStationary-node cap at the start.
num_stationary_max_endStationary-node cap at the end.
num_stationary_maxTwo-element vector [start, end].
a_linearization_floorNative floor used while linearizing a.
b_linearizationOptional owned b profile paired with a_linearization.
s_lenNumber of stations covered by a_linearization.
ProblemConstruct a shared TOPP3 problem descriptor.
ProblemP = copp.solver.topp3.Problem(ROBOT, A_LINEARIZATION)
small a_linearization(k) leaves a(k) <= 3*a_linearization(k).
profile = copp.solver.topp3_lp.solve(problem)
refined = copp.solver.topp3_lp.Problem(robot, max(profile.a, 0)
covers numel(A_LINEARIZATION) stations starting at station 1 and uses zero a/b endpoint values. A_LINEARIZATION may be \(1 \times N\) or \(N \times 1\) and is stored as an \(N \times 1\) column.
Name-value options: idx_s_start: Public 1-based first station. Defaults to 1. a_boundary: \(1 \times 2\) nonnegative endpoint values [a_start, a_final]. b_boundary: \(1 \times 2\) endpoint accelerations [b_start, b_final]. num_stationary_max: Scalar or [start, end] nonnegative integer stationary cap. a_linearization_floor: Positive finite floor forwarded to the native solver. b_linearization: Optional path acceleration profile b(k) paired with A_LINEARIZATION. Empty (the default) linearizes every third-order row of station k at a_linearization(k). A non-empty vector selects adaptive linearization: each row is anchored where it is nearly active at the feasible state (a_linearization, b_linearization), so a slack row is anchored high and a tight one stays near the state. It must have the same length as A_LINEARIZATION; solving raises copp:SolverError otherwise. The pair must be the a and b of one previously solved third-order Profile3rd; the b of a TOPP2 profile is discretized differently and must not be used. Prefer this mode when a spans a wide range, and especially when a approaches zero (about 1e-10): anchoring both rows of an axis at the same small a_linearization(k) leaves a(k) <= 3*a_linearization(k). On profiles well away from zero the direct mode is cheaper and nearly identical.
Example (refine around a previously solved third-order profile): profile = copp.solver.topp3_lp.solve(problem); refined = copp.solver.topp3_lp.Problem(robot, max(profile.a, 0), ... b_linearization=profile.b);
ExampleCommon.setup_path();
ctx = ExampleCommon.third_order_context();
a_seed = ExampleCommon.solve_topp2_seed(ctx.robot, ctx.n);
problem = copp.solver.topp3.Problem( ...
ctx.robot, ...
a_seed, ...
idx_s_start=1, ...
a_boundary=ctx.a_boundary, ...
b_boundary=ctx.b_boundary, ...
num_stationary_max=ctx.num_stationary_max);