controls  3.0.0
Public Member Functions | List of all members
ThrustAllocationSolverInterface Class Referenceabstract

Abstract interface for quadratic-programming thrust allocation solvers. More...

#include <ThrustAllocationSolverInterface.h>

Inheritance diagram for ThrustAllocationSolverInterface:
ThrustAllocation3DOFQPSolver ThrustAllocation6DOFQPSolver

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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ ~ThrustAllocationSolverInterface()

virtual ThrustAllocationSolverInterface::~ThrustAllocationSolverInterface ( )
virtualdefault

Member Function Documentation

◆ allocate()

virtual VectorXd ThrustAllocationSolverInterface::allocate ( const Vector6d tau)
pure virtual

Solves the QP and returns per-thruster force magnitudes.

Parameters
tau[in] Desired 6DOF body force/torque vector in N and Nm
Returns
Nx1 vector of per-thruster forces in Newtons, indexed by thruster idx

Implemented in ThrustAllocation6DOFQPSolver, and ThrustAllocation3DOFQPSolver.

◆ build()

virtual void ThrustAllocationSolverInterface::build ( const ThrusterLayout layout)
pure virtual

Builds or rebuilds all internal QP matrices from a thruster layout.

Must be called before allocate() whenever the thruster configuration changes.

Parameters
layout[in] Thruster layout describing positions and force directions

Implemented in ThrustAllocation6DOFQPSolver, and ThrustAllocation3DOFQPSolver.

◆ getBodyForce()

virtual Vector6d ThrustAllocationSolverInterface::getBodyForce ( const VectorXd &  thrusterForces)
pure virtual

Reconstructs the achieved body force from per-thruster forces.

Parameters
thrusterForces[in] Nx1 vector of per-thruster forces in Newtons
Returns
6-element achieved body force/torque vector in N and Nm

Implemented in ThrustAllocation6DOFQPSolver, and ThrustAllocation3DOFQPSolver.

◆ setQ()

virtual void ThrustAllocationSolverInterface::setQ ( double  val,
uint8_t  axis 
)
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.

Parameters
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.

◆ updateLimits()

virtual void ThrustAllocationSolverInterface::updateLimits ( float  min_force,
float  max_force 
)
pure virtual

Updates the per-thruster force bounds used in the QP inequality constraints.

Parameters
min_force[in] Minimum (most negative) thruster force in Newtons
max_force[in] Maximum thruster force in Newtons

Implemented in ThrustAllocation6DOFQPSolver, and ThrustAllocation3DOFQPSolver.


The documentation for this class was generated from the following file: