Files | |
| file | bindings/c/include/copp/robot.h |
| Robot handles, path sampling, derivative input, constraints, and limits. | |
Typedefs | |
| typedef struct CoppRobot | CoppRobot |
| Opaque C handle for a library-owned robot and constraint buffer. | |
| typedef enum CoppStatus(* | CoppInverseDynamicsFn) (void *user_data, size_t dim, const double *q, const double *dq, const double *ddq, double *tau) |
| C callback for inverse dynamics. | |
Functions | |
| enum CoppStatus | copp_robot_create (size_t dim, size_t capacity, struct CoppRobot **out_robot) |
| Create a library-owned robot handle for C callers. | |
| enum CoppStatus | copp_robot_set_inverse_dynamics (struct CoppRobot *robot, CoppInverseDynamicsFn inverse_dynamics, void *inverse_dynamics_user_data) |
| Store an inverse-dynamics callback in a robot handle. | |
| enum CoppStatus | copp_robot_clear_inverse_dynamics (struct CoppRobot *robot) |
| Clear the inverse-dynamics callback stored in a robot handle. | |
| enum CoppStatus | copp_robot_append_s (struct CoppRobot *robot, struct CoppSliceF64 s) |
| Append strictly increasing station samples to a robot. | |
| enum CoppStatus | copp_robot_amax_substitute (struct CoppRobot *robot, struct CoppSliceF64 amax, size_t idx_s) |
| Overwrite first-order bounds from a profile. | |
| enum CoppStatus | copp_robot_dim (const struct CoppRobot *robot, size_t *out_dim) |
| Return the robot/path dimension stored in a robot handle. | |
| enum CoppStatus | copp_robot_len (const struct CoppRobot *robot, size_t *out_len) |
| Return the current number of logical station samples stored in a robot. | |
| enum CoppStatus | copp_robot_capacity (const struct CoppRobot *robot, size_t *out_capacity) |
| Return the allocated station capacity of the robot constraint buffer. | |
| enum CoppStatus | copp_robot_is_empty (const struct CoppRobot *robot, bool *out_is_empty) |
| Report whether the robot constraint buffer currently has no stations. | |
| enum CoppStatus | copp_robot_idx_s_start (const struct CoppRobot *robot, size_t *out_idx_s_start) |
| Return the first global station index currently stored in the robot. | |
| enum CoppStatus | copp_robot_idx_s_end (const struct CoppRobot *robot, size_t *out_idx_s_end) |
| Return the exclusive global station end index currently stored in the robot. | |
| enum CoppStatus | copp_robot_constraint_rows (const struct CoppRobot *robot, size_t *out_amax_rows, size_t *out_acc_rows, size_t *out_jerk_rows) |
| Return the allocated row counts for first-, second-, and third-order constraints. | |
| enum CoppStatus | copp_robot_get_s (const struct CoppRobot *robot, size_t idx_s, double *out_s) |
| Read one station value s[idx_s] from the robot constraint buffer. | |
| enum CoppStatus | copp_robot_get_amax (const struct CoppRobot *robot, size_t idx_s, double *out_amax) |
| Read one first-order upper bound amax[idx_s] from the robot. | |
| enum CoppStatus | copp_robot_s_vec (const struct CoppRobot *robot, size_t idx_s_from, size_t idx_s_to, struct CoppVecF64 *out_s) |
| Export station values over [idx_s_from, idx_s_to). | |
| enum CoppStatus | copp_robot_amax_vec (const struct CoppRobot *robot, size_t idx_s_from, size_t idx_s_to, struct CoppVecF64 *out_amax) |
| Export first-order upper bounds over [idx_s_from, idx_s_to). | |
| enum CoppStatus | copp_robot_acc_constraints_at (const struct CoppRobot *robot, size_t idx_s, struct CoppMatrixF64 *out_acc_a, struct CoppMatrixF64 *out_acc_b, struct CoppMatrixF64 *out_acc_max) |
| Export second-order constraint rows at one station. | |
| enum CoppStatus | copp_robot_jerk_constraints_at (const struct CoppRobot *robot, size_t idx_s, struct CoppMatrixF64 *out_jerk_a, struct CoppMatrixF64 *out_jerk_b, struct CoppMatrixF64 *out_jerk_c, struct CoppMatrixF64 *out_jerk_d, struct CoppMatrixF64 *out_jerk_max) |
| Export nonlinear third-order constraint rows at one station. | |
| enum CoppStatus | copp_robot_jerk_linear_constraints_at (const struct CoppRobot *robot, size_t idx_s, struct CoppMatrixF64 *out_jerk_a_linear, struct CoppMatrixF64 *out_jerk_b, struct CoppMatrixF64 *out_jerk_c, struct CoppMatrixF64 *out_jerk_max_linear) |
| Export linearized third-order constraint rows at one station. | |
| enum CoppStatus | copp_robot_clear_constraints (struct CoppRobot *robot, bool keep_idx_s) |
| Clear all logical constraints stored in the robot. | |
| enum CoppStatus | copp_robot_pop_front_n (struct CoppRobot *robot, size_t n_cols) |
| Remove n_cols logical stations from the front of the robot buffer. | |
| enum CoppStatus | copp_robot_pop_back_n (struct CoppRobot *robot, size_t n_cols) |
| Remove n_cols logical stations from the back of the robot buffer. | |
| enum CoppStatus | copp_robot_pop_front_until (struct CoppRobot *robot, size_t idx_s_cut) |
| Remove front stations so the kept window starts at idx_s_cut or later. | |
| enum CoppStatus | copp_robot_pop_back_until (struct CoppRobot *robot, size_t idx_s_cut) |
| Remove back stations so the kept window ends before idx_s_cut. | |
| enum CoppStatus | copp_robot_sample_path_2nd (struct CoppRobot *robot, const struct CoppPath *path, size_t idx_s_from, size_t idx_s_to) |
| Sample a path over an existing robot station interval and store second-order derivatives. | |
| enum CoppStatus | copp_robot_sample_path_3rd (struct CoppRobot *robot, const struct CoppPath *path, size_t idx_s_from, size_t idx_s_to) |
| Sample a path over an existing robot station interval and store third-order derivatives. | |
| enum CoppStatus | copp_robot_set_q_2nd (struct CoppRobot *robot, size_t idx_s, struct CoppMatrixViewF64 q, struct CoppMatrixViewF64 dq, struct CoppMatrixViewF64 ddq) |
| Write second-order path derivatives into an existing robot station interval. | |
| enum CoppStatus | copp_robot_set_q_3rd (struct CoppRobot *robot, size_t idx_s, struct CoppMatrixViewF64 q, struct CoppMatrixViewF64 dq, struct CoppMatrixViewF64 ddq, struct CoppMatrixViewF64 dddq) |
| Write third-order path derivatives into an existing robot station interval. | |
| enum CoppStatus | copp_add_raw_constraint_1st (struct CoppRobot *robot, size_t idx_s, struct CoppMatrixViewF64 amax) |
| Add raw first-order constraints over an existing robot station interval. | |
| enum CoppStatus | copp_add_raw_constraint_2nd (struct CoppRobot *robot, size_t idx_s, struct CoppMatrixViewF64 acc_a, struct CoppMatrixViewF64 acc_b, struct CoppMatrixViewF64 acc_max) |
| Add raw second-order inequality rows over a station interval. | |
| enum CoppStatus | copp_add_raw_constraint_3rd (struct CoppRobot *robot, size_t idx_s, struct CoppMatrixViewF64 jerk_a, struct CoppMatrixViewF64 jerk_b, struct CoppMatrixViewF64 jerk_c, struct CoppMatrixViewF64 jerk_d, struct CoppMatrixViewF64 jerk_max) |
| Add raw third-order nonlinear inequality rows over a station interval. | |
| enum CoppStatus | copp_add_axial_velocity_limits (struct CoppRobot *robot, size_t start_idx_s, size_t len, struct CoppSliceF64 velocity_max, struct CoppSliceF64 velocity_min) |
| Add broadcast axial velocity limits over an existing robot station interval. | |
| enum CoppStatus | copp_add_axial_velocity_limits_matrix (struct CoppRobot *robot, size_t start_idx_s, struct CoppMatrixViewF64 velocity_max, struct CoppMatrixViewF64 velocity_min) |
| Add station-varying axial velocity limits over an existing robot interval. | |
| enum CoppStatus | copp_add_axial_acceleration_limits (struct CoppRobot *robot, size_t start_idx_s, size_t len, struct CoppSliceF64 acceleration_max, struct CoppSliceF64 acceleration_min) |
| Add broadcast axial acceleration limits over an existing robot station interval. | |
| enum CoppStatus | copp_add_axial_acceleration_limits_matrix (struct CoppRobot *robot, size_t start_idx_s, struct CoppMatrixViewF64 acceleration_max, struct CoppMatrixViewF64 acceleration_min) |
| Add station-varying axial acceleration limits over an existing robot interval. | |
| enum CoppStatus | copp_add_axial_torque_limits (struct CoppRobot *robot, size_t start_idx_s, size_t len, struct CoppSliceF64 torque_max, struct CoppSliceF64 torque_min) |
| Add broadcast axial torque limits over an existing robot station interval. | |
| enum CoppStatus | copp_add_axial_torque_limits_matrix (struct CoppRobot *robot, size_t start_idx_s, struct CoppMatrixViewF64 torque_max, struct CoppMatrixViewF64 torque_min) |
| Add station-varying axial torque limits over an existing robot interval. | |
| enum CoppStatus | copp_add_axial_jerk_limits (struct CoppRobot *robot, size_t start_idx_s, size_t len, struct CoppSliceF64 jerk_max, struct CoppSliceF64 jerk_min) |
| Add broadcast axial jerk limits over an existing robot station interval. | |
| enum CoppStatus | copp_add_axial_jerk_limits_matrix (struct CoppRobot *robot, size_t start_idx_s, struct CoppMatrixViewF64 jerk_max, struct CoppMatrixViewF64 jerk_min) |
| Add station-varying axial jerk limits over an existing robot interval. | |
| void | copp_robot_free (struct CoppRobot *robot) |
| Release a robot handle created by copp_robot_create. | |
Opaque C handle for a library-owned robot and constraint buffer.
Create with copp_robot_create and release exactly once with copp_robot_free. C callers must not inspect or allocate this type directly.
| typedef enum CoppStatus(* CoppInverseDynamicsFn) (void *user_data, size_t dim, const double *q, const double *dq, const double *ddq, double *tau) |
C callback for inverse dynamics.
The callback receives dim-element vectors q, dq, ddq, and must write dim torque/force values into tau before returning COPP_STATUS_OK. The tau buffer may contain old values on entry, so callbacks should overwrite every entry directly. On failure, return a non-OK status; outer COPP APIs report it as a robot dynamics error.
| enum CoppStatus copp_robot_create | ( | size_t | dim, |
| size_t | capacity, | ||
| struct CoppRobot ** | out_robot ) |
Create a library-owned robot handle for C callers.
On success, *out_robot receives a non-null handle that must be released with copp_robot_free.
| enum CoppStatus copp_robot_set_inverse_dynamics | ( | struct CoppRobot * | robot, |
| CoppInverseDynamicsFn | inverse_dynamics, | ||
| void * | inverse_dynamics_user_data ) |
Store an inverse-dynamics callback in a robot handle.
Passing a null inverse_dynamics pointer clears the callback and restores default point dynamics (tau = ddq). When non-null, the callback and inverse_dynamics_user_data must remain valid until replaced, cleared, or the robot is freed.
The example below installs point dynamics explicitly as the robot's inverse-dynamics callback.
| enum CoppStatus copp_robot_clear_inverse_dynamics | ( | struct CoppRobot * | robot | ) |
Clear the inverse-dynamics callback stored in a robot handle.
After this call, torque-related operations use default point dynamics (tau = ddq).
| enum CoppStatus copp_robot_append_s | ( | struct CoppRobot * | robot, |
| struct CoppSliceF64 | s ) |
Append strictly increasing station samples to a robot.
Empty input is accepted as a no-op. Non-empty input must be strictly increasing and must start after the current last stored station.
| enum CoppStatus copp_robot_amax_substitute | ( | struct CoppRobot * | robot, |
| struct CoppSliceF64 | amax, | ||
| size_t | idx_s ) |
Overwrite first-order bounds from a profile.
amax must contain one value per station to update. The values replace the robot's stored first-order bound over [idx_s, idx_s + amax.len). This is useful before TOPP3 solvers when a TOPP2 profile is used as a tighter linearization/reachability seed.
| enum CoppStatus copp_robot_dim | ( | const struct CoppRobot * | robot, |
| size_t * | out_dim ) |
Return the robot/path dimension stored in a robot handle.
| enum CoppStatus copp_robot_len | ( | const struct CoppRobot * | robot, |
| size_t * | out_len ) |
Return the current number of logical station samples stored in a robot.
| enum CoppStatus copp_robot_capacity | ( | const struct CoppRobot * | robot, |
| size_t * | out_capacity ) |
Return the allocated station capacity of the robot constraint buffer.
| enum CoppStatus copp_robot_is_empty | ( | const struct CoppRobot * | robot, |
| bool * | out_is_empty ) |
Report whether the robot constraint buffer currently has no stations.
| enum CoppStatus copp_robot_idx_s_start | ( | const struct CoppRobot * | robot, |
| size_t * | out_idx_s_start ) |
Return the first global station index currently stored in the robot.
The active station window is [idx_s_start, idx_s_end).
| enum CoppStatus copp_robot_idx_s_end | ( | const struct CoppRobot * | robot, |
| size_t * | out_idx_s_end ) |
Return the exclusive global station end index currently stored in the robot.
The active station window is [idx_s_start, idx_s_end).
| enum CoppStatus copp_robot_constraint_rows | ( | const struct CoppRobot * | robot, |
| size_t * | out_amax_rows, | ||
| size_t * | out_acc_rows, | ||
| size_t * | out_jerk_rows ) |
Return the allocated row counts for first-, second-, and third-order constraints.
| enum CoppStatus copp_robot_get_s | ( | const struct CoppRobot * | robot, |
| size_t | idx_s, | ||
| double * | out_s ) |
Read one station value s[idx_s] from the robot constraint buffer.
| enum CoppStatus copp_robot_get_amax | ( | const struct CoppRobot * | robot, |
| size_t | idx_s, | ||
| double * | out_amax ) |
Read one first-order upper bound amax[idx_s] from the robot.
| enum CoppStatus copp_robot_s_vec | ( | const struct CoppRobot * | robot, |
| size_t | idx_s_from, | ||
| size_t | idx_s_to, | ||
| struct CoppVecF64 * | out_s ) |
Export station values over [idx_s_from, idx_s_to).
On success, out_s owns a COPP-allocated vector and must be released with copp_vec_f64_free.
| enum CoppStatus copp_robot_amax_vec | ( | const struct CoppRobot * | robot, |
| size_t | idx_s_from, | ||
| size_t | idx_s_to, | ||
| struct CoppVecF64 * | out_amax ) |
Export first-order upper bounds over [idx_s_from, idx_s_to).
On success, out_amax owns a COPP-allocated vector and must be released with copp_vec_f64_free.
| enum CoppStatus copp_robot_acc_constraints_at | ( | const struct CoppRobot * | robot, |
| size_t | idx_s, | ||
| struct CoppMatrixF64 * | out_acc_a, | ||
| struct CoppMatrixF64 * | out_acc_b, | ||
| struct CoppMatrixF64 * | out_acc_max ) |
Export second-order constraint rows at one station.
On success, the three output matrices are valid_rows x 1 column-major matrices and must each be released with copp_matrix_f64_free.
| enum CoppStatus copp_robot_jerk_constraints_at | ( | const struct CoppRobot * | robot, |
| size_t | idx_s, | ||
| struct CoppMatrixF64 * | out_jerk_a, | ||
| struct CoppMatrixF64 * | out_jerk_b, | ||
| struct CoppMatrixF64 * | out_jerk_c, | ||
| struct CoppMatrixF64 * | out_jerk_d, | ||
| struct CoppMatrixF64 * | out_jerk_max ) |
Export nonlinear third-order constraint rows at one station.
On success, the five output matrices are valid_rows x 1 column-major matrices and must each be released with copp_matrix_f64_free.
| enum CoppStatus copp_robot_jerk_linear_constraints_at | ( | const struct CoppRobot * | robot, |
| size_t | idx_s, | ||
| struct CoppMatrixF64 * | out_jerk_a_linear, | ||
| struct CoppMatrixF64 * | out_jerk_b, | ||
| struct CoppMatrixF64 * | out_jerk_c, | ||
| struct CoppMatrixF64 * | out_jerk_max_linear ) |
Export linearized third-order constraint rows at one station.
The robot must already have been used to build a TOPP3/COPP3 problem with a linearization interval covering idx_s. On success, the four output matrices are valid_rows x 1 column-major matrices and must each be released with copp_matrix_f64_free.
| enum CoppStatus copp_robot_clear_constraints | ( | struct CoppRobot * | robot, |
| bool | keep_idx_s ) |
Clear all logical constraints stored in the robot.
When keep_idx_s is true, the current global station origin is preserved; otherwise the origin is reset to zero.
| enum CoppStatus copp_robot_pop_front_n | ( | struct CoppRobot * | robot, |
| size_t | n_cols ) |
Remove n_cols logical stations from the front of the robot buffer.
| enum CoppStatus copp_robot_pop_back_n | ( | struct CoppRobot * | robot, |
| size_t | n_cols ) |
Remove n_cols logical stations from the back of the robot buffer.
| enum CoppStatus copp_robot_pop_front_until | ( | struct CoppRobot * | robot, |
| size_t | idx_s_cut ) |
Remove front stations so the kept window starts at idx_s_cut or later.
| enum CoppStatus copp_robot_pop_back_until | ( | struct CoppRobot * | robot, |
| size_t | idx_s_cut ) |
Remove back stations so the kept window ends before idx_s_cut.
| enum CoppStatus copp_robot_sample_path_2nd | ( | struct CoppRobot * | robot, |
| const struct CoppPath * | path, | ||
| size_t | idx_s_from, | ||
| size_t | idx_s_to ) |
Sample a path over an existing robot station interval and store second-order derivatives.
The interval is [idx_s_from, idx_s_to). The station values must already have been appended to the robot.
The example below appends a station grid and samples second-order path derivatives into the robot constraint storage.
| enum CoppStatus copp_robot_sample_path_3rd | ( | struct CoppRobot * | robot, |
| const struct CoppPath * | path, | ||
| size_t | idx_s_from, | ||
| size_t | idx_s_to ) |
Sample a path over an existing robot station interval and store third-order derivatives.
The interval is [idx_s_from, idx_s_to). The station values must already have been appended to the robot.
The example below samples third-order path derivatives over the current robot station grid.
| enum CoppStatus copp_robot_set_q_2nd | ( | struct CoppRobot * | robot, |
| size_t | idx_s, | ||
| struct CoppMatrixViewF64 | q, | ||
| struct CoppMatrixViewF64 | dq, | ||
| struct CoppMatrixViewF64 | ddq ) |
Write second-order path derivatives into an existing robot station interval.
The matrices must have shape dim x N, where dim is the robot dimension and N is the number of station samples to update. Contiguous column-major input is the fast path; other valid CoppMatrixViewF64 layouts are copied once into column-major temporary storage.
This function clears any existing third-derivative data over the same interval. Use copp_robot_set_q_3rd when third-order derivative data is needed.
| enum CoppStatus copp_robot_set_q_3rd | ( | struct CoppRobot * | robot, |
| size_t | idx_s, | ||
| struct CoppMatrixViewF64 | q, | ||
| struct CoppMatrixViewF64 | dq, | ||
| struct CoppMatrixViewF64 | ddq, | ||
| struct CoppMatrixViewF64 | dddq ) |
Write third-order path derivatives into an existing robot station interval.
The matrices must have shape dim x N, where dim is the robot dimension and N is the number of station samples to update. Contiguous column-major input is the fast path; other valid CoppMatrixViewF64 layouts are copied once into column-major temporary storage.
| enum CoppStatus copp_add_raw_constraint_1st | ( | struct CoppRobot * | robot, |
| size_t | idx_s, | ||
| struct CoppMatrixViewF64 | amax ) |
Add raw first-order constraints over an existing robot station interval.
amax must be a matrix view with shape R x N. For each station column, COPP reduces all R rows to their minimum and tightens the stored first-order bound: a <= min_r amax[r, station]. Contiguous column-major input is the fast path; other valid layouts are copied once into column-major temporary storage.
| enum CoppStatus copp_add_raw_constraint_2nd | ( | struct CoppRobot * | robot, |
| size_t | idx_s, | ||
| struct CoppMatrixViewF64 | acc_a, | ||
| struct CoppMatrixViewF64 | acc_b, | ||
| struct CoppMatrixViewF64 | acc_max ) |
Add raw second-order inequality rows over a station interval.
All matrices must have the same shape R x N. Each row stores one inequality: acc_a * a + acc_b * b <= acc_max. Lower bounds should be provided by negating the row on the C side. Contiguous column-major input is the fast path; other valid layouts are copied once into column-major temporary storage.
| enum CoppStatus copp_add_raw_constraint_3rd | ( | struct CoppRobot * | robot, |
| size_t | idx_s, | ||
| struct CoppMatrixViewF64 | jerk_a, | ||
| struct CoppMatrixViewF64 | jerk_b, | ||
| struct CoppMatrixViewF64 | jerk_c, | ||
| struct CoppMatrixViewF64 | jerk_d, | ||
| struct CoppMatrixViewF64 | jerk_max ) |
Add raw third-order nonlinear inequality rows over a station interval.
All matrices must have the same shape R x N. Each row stores one inequality: sqrt(a) * (jerk_a*a + jerk_b*b + jerk_c*c + jerk_d) <= jerk_max. Lower bounds should be provided by negating the row on the C side. Contiguous column-major input is the fast path; other valid layouts are copied once into column-major temporary storage.
| enum CoppStatus copp_add_axial_velocity_limits | ( | struct CoppRobot * | robot, |
| size_t | start_idx_s, | ||
| size_t | len, | ||
| struct CoppSliceF64 | velocity_max, | ||
| struct CoppSliceF64 | velocity_min ) |
Add broadcast axial velocity limits over an existing robot station interval.
velocity_max and velocity_min must both have length equal to the robot dimension. The same per-axis limits are applied to every station in [start_idx_s, start_idx_s + len). len == 0 is accepted as a no-op.
The example below applies the same per-axis velocity box to every station in an interval.
| enum CoppStatus copp_add_axial_velocity_limits_matrix | ( | struct CoppRobot * | robot, |
| size_t | start_idx_s, | ||
| struct CoppMatrixViewF64 | velocity_max, | ||
| struct CoppMatrixViewF64 | velocity_min ) |
Add station-varying axial velocity limits over an existing robot interval.
velocity_max and velocity_min must be matrix views with shape dim x N. Column j is applied to station start_idx_s + j. N == 0 is accepted as a no-op when both matrices have shape dim x 0. Contiguous column-major input is the fast path; other valid layouts are copied once into column-major temporary storage.
| enum CoppStatus copp_add_axial_acceleration_limits | ( | struct CoppRobot * | robot, |
| size_t | start_idx_s, | ||
| size_t | len, | ||
| struct CoppSliceF64 | acceleration_max, | ||
| struct CoppSliceF64 | acceleration_min ) |
Add broadcast axial acceleration limits over an existing robot station interval.
acceleration_max and acceleration_min must both have length equal to the robot dimension. The same per-axis limits are applied to every station in [start_idx_s, start_idx_s + len). len == 0 is accepted as a no-op.
| enum CoppStatus copp_add_axial_acceleration_limits_matrix | ( | struct CoppRobot * | robot, |
| size_t | start_idx_s, | ||
| struct CoppMatrixViewF64 | acceleration_max, | ||
| struct CoppMatrixViewF64 | acceleration_min ) |
Add station-varying axial acceleration limits over an existing robot interval.
acceleration_max and acceleration_min must be matrix views with shape dim x N. Column j is applied to station start_idx_s + j. N == 0 is accepted as a no-op when both matrices have shape dim x 0. Contiguous column-major input is the fast path; other valid layouts are copied once into column-major temporary storage.
| enum CoppStatus copp_add_axial_torque_limits | ( | struct CoppRobot * | robot, |
| size_t | start_idx_s, | ||
| size_t | len, | ||
| struct CoppSliceF64 | torque_max, | ||
| struct CoppSliceF64 | torque_min ) |
Add broadcast axial torque limits over an existing robot station interval.
torque_max and torque_min must both have length equal to the robot dimension. The same per-axis limits are applied to every station in [start_idx_s, start_idx_s + len). len == 0 is accepted as a no-op.
The robot must already contain second-order path derivative data over the same interval, for example via copp_robot_set_q_2nd or copp_robot_sample_path_2nd.
If the robot has no stored inverse-dynamics callback, point dynamics (tau = ddq) is used.
The example below applies broadcast torque limits over an interval that already has second-order path derivative data.
| enum CoppStatus copp_add_axial_torque_limits_matrix | ( | struct CoppRobot * | robot, |
| size_t | start_idx_s, | ||
| struct CoppMatrixViewF64 | torque_max, | ||
| struct CoppMatrixViewF64 | torque_min ) |
Add station-varying axial torque limits over an existing robot interval.
torque_max and torque_min must be matrix views with shape dim x N. Column j is applied to station start_idx_s + j. N == 0 is accepted as a no-op when both matrices have shape dim x 0. Contiguous column-major input is the fast path; other valid layouts are copied once into column-major temporary storage.
The robot must already contain second-order path derivative data over the same interval, for example via copp_robot_set_q_2nd or copp_robot_sample_path_2nd.
If the robot has no stored inverse-dynamics callback, point dynamics (tau = ddq) is used.
| enum CoppStatus copp_add_axial_jerk_limits | ( | struct CoppRobot * | robot, |
| size_t | start_idx_s, | ||
| size_t | len, | ||
| struct CoppSliceF64 | jerk_max, | ||
| struct CoppSliceF64 | jerk_min ) |
Add broadcast axial jerk limits over an existing robot station interval.
jerk_max and jerk_min must both have length equal to the robot dimension. The same per-axis limits are applied to every station in [start_idx_s, start_idx_s + len). len == 0 is accepted as a no-op.
The robot must already contain third-order path derivative data over the same interval, for example via copp_robot_set_q_3rd or copp_robot_sample_path_3rd.
The example below applies broadcast jerk limits after third-order path derivative data has been stored.
| enum CoppStatus copp_add_axial_jerk_limits_matrix | ( | struct CoppRobot * | robot, |
| size_t | start_idx_s, | ||
| struct CoppMatrixViewF64 | jerk_max, | ||
| struct CoppMatrixViewF64 | jerk_min ) |
Add station-varying axial jerk limits over an existing robot interval.
jerk_max and jerk_min must be matrix views with shape dim x N. Column j is applied to station start_idx_s + j. N == 0 is accepted as a no-op when both matrices have shape dim x 0. Contiguous column-major input is the fast path; other valid layouts are copied once into column-major temporary storage.
The robot must already contain third-order path derivative data over the same interval, for example via copp_robot_set_q_3rd or copp_robot_sample_path_3rd.
| void copp_robot_free | ( | struct CoppRobot * | robot | ) |
Release a robot handle created by copp_robot_create.
Passing null is allowed and has no effect.