giskardpy.qp.solvers.qp_solver_piqp#
Classes#
Module Contents#
- class giskardpy.qp.solvers.qp_solver_piqp.QPSolverPIQP#
Bases:
giskardpy.qp.solvers.qp_solver.QPSolver[giskardpy.qp.qp_data.QPDataExplicit]- solver: piqp.SparseSolver#
The solver object of piqp.
- fraction_to_boundary: float = 0.95#
Fraction of the distance to the nearest constraint that piqp is allowed to step.
Our problems regularly put a constraint right where the solution lies: a joint braking at its position limit, or a box collapsed to almost nothing. At piqp’s default of 0.99 the iterates then press against that constraint and stop improving, and the solve ends at the iteration limit with a dual residual it can no longer reduce. Keeping the steps further inside the feasible region leaves the iterates room to move along such a constraint instead. Every value from 0.8 to 0.98 solves all of the problems recorded from the test suites; 0.95 sits in the middle of that range and costs about a sixth more iterations than 0.99 on the problems that converge either way.
- infeasibility_threshold: float = 100.0#
How far piqp’s multipliers may drift from their last accepted values, scaled by the regularization, before piqp declares the problem infeasible.
Our problems cannot be infeasible, but tasks that cannot be reached push heavily weighted slack variables far from zero, and their multipliers legitimately grow to about 1e6. At piqp’s default of 0.9 that drift already counts as infeasibility after a few iterations. 100 solves every problem recorded from the test suites at any fraction to boundary from 0.8 to 0.99; 10 is not enough.
- big_ball_mode: bool = False#
If the QP is known to be feasible, ignore non-SOLVED solver statuses and return the (possibly suboptimal) solution instead of raising.
Warning
This is unsafe because it might lead to instability if the QP was actually infeasible. Only enable it when you are certain the problem is feasible.
- solver_call_explicit_interface(qp_data: giskardpy.qp.qp_data.QPDataExplicit) numpy.ndarray#
min_x 0.5 x^T H x + g^T x s.t.
lb <= x <= ub (box constraints) Ex <= bE (equality constraints) lbA <= Ax <= ubA (lower/upper inequality constraints)
- solver_call#