|
controls
3.0.0
|
Abstract interface for quadratic-programming thrust allocation solvers. More...
#include <ThrustAllocationSolverInterface.h>
Public Member Functions | |
| virtual | ~ThrustAllocationSolverInterface ()=default |
| virtual void | build (const ThrusterLayout &layout)=0 |
| Builds or rebuilds all internal QP matrices from a thruster layout. More... | |
| virtual VectorXd | allocate (const Vector6d &tau)=0 |
| Solves the QP and returns per-thruster force magnitudes. More... | |
| virtual Vector6d | getBodyForce (const VectorXd &thrusterForces)=0 |
| Reconstructs the achieved body force from per-thruster forces. More... | |
| virtual void | setQ (double val, uint8_t axis)=0 |
| Sets the slack-variable penalty weight for a given body axis. More... | |
| virtual void | updateLimits (float min_force, float max_force)=0 |
| Updates the per-thruster force bounds used in the QP inequality constraints. More... | |
Abstract interface for quadratic-programming thrust allocation solvers.
Concrete solvers implement force allocation for a specific DOF subset (3DOF or 6DOF) by solving a QP that minimises thruster effort while satisfying the desired body force equality constraints subject to per-thruster force bounds.
|
virtualdefault |
|
pure virtual |
Solves the QP and returns per-thruster force magnitudes.
| tau | [in] Desired 6DOF body force/torque vector in N and Nm |
Implemented in ThrustAllocation6DOFQPSolver, and ThrustAllocation3DOFQPSolver.
|
pure virtual |
Builds or rebuilds all internal QP matrices from a thruster layout.
Must be called before allocate() whenever the thruster configuration changes.
| layout | [in] Thruster layout describing positions and force directions |
Implemented in ThrustAllocation6DOFQPSolver, and ThrustAllocation3DOFQPSolver.
|
pure virtual |
Reconstructs the achieved body force from per-thruster forces.
| thrusterForces | [in] Nx1 vector of per-thruster forces in Newtons |
Implemented in ThrustAllocation6DOFQPSolver, and ThrustAllocation3DOFQPSolver.
|
pure virtual |
Sets the slack-variable penalty weight for a given body axis.
The diagonal QP weight entry is set to 10^val, so larger values penalise force deficit on that axis more heavily.
| val | [in] Exponent for the weight (weight = 10^val) |
| axis | [in] Body axis index: 0=X, 1=Y, 2=Z, 3=Roll, 4=Pitch, 5=Yaw |
Implemented in ThrustAllocation6DOFQPSolver, and ThrustAllocation3DOFQPSolver.
|
pure virtual |
Updates the per-thruster force bounds used in the QP inequality constraints.
| min_force | [in] Minimum (most negative) thruster force in Newtons |
| max_force | [in] Maximum thruster force in Newtons |
Implemented in ThrustAllocation6DOFQPSolver, and ThrustAllocation3DOFQPSolver.