Files | |
| file | bindings/c/include/copp/copp3.h |
| COPP3-SOCP solver APIs. | |
Data Structures | |
| struct | Copp3SocpResult |
| Compact COPP3-SOCP expert result returned to C. More... | |
Functions | |
| enum CoppStatus | copp3_socp (struct Copp3Problem problem, struct CoppClarabelOptions options, struct CoppProfile3rd *out_profile) |
| Solve a COPP3-SOCP problem. | |
| enum CoppStatus | copp3_socp_expert (struct Copp3Problem problem, struct CoppClarabelOptions options, struct Copp3SocpResult *out_result) |
| Solve a COPP3-SOCP problem and always return Clarabel diagnostics. | |
| void | copp3_socp_result_free (struct Copp3SocpResult result) |
| Release memory owned by a Copp3SocpResult. | |
| enum CoppStatus copp3_socp | ( | struct Copp3Problem | problem, |
| struct CoppClarabelOptions | options, | ||
| struct CoppProfile3rd * | out_profile ) |
Solve a COPP3-SOCP problem.
This C ABI builds an internal COPP3 problem from the borrowed Copp3Problem, forwards options to the Clarabel backend, and returns only the accepted third-order profile.
Supported objective kinds are Time, Linear, ThermalEnergy, and TotalVariationTorque. Torque objectives use the robot's stored inverse-dynamics callback when provided, otherwise point dynamics (tau = ddq) is used.
On success, out_profile owns COPP-allocated a and b vectors and must be released with copp_profile_3rd_free.
The example below solves COPP3-SOCP with Clarabel options and releases the accepted third-order profile.
| enum CoppStatus copp3_socp_expert | ( | struct Copp3Problem | problem, |
| struct CoppClarabelOptions | options, | ||
| struct Copp3SocpResult * | out_result ) |
Solve a COPP3-SOCP problem and always return Clarabel diagnostics.
This expert entry follows the advanced-diagnostics convention: true runtime failures still return a non-OK CoppStatus, but non-accepted Clarabel statuses are reported inside out_result with has_profile == false and the function returns COPP_STATUS_OK.
Use the same advanced-diagnostics pattern as copp2_socp_expert. The result type is Copp3SocpResult, and has_profile replaces has_a.
| void copp3_socp_result_free | ( | struct Copp3SocpResult | result | ) |
Release memory owned by a Copp3SocpResult.
Passing an already-freed result is invalid. Prefer freeing the full result with this function instead of freeing result.profile manually.