controls  3.0.0
ThrustAllocationSolverInterface.h
Go to the documentation of this file.
1 #ifndef CONTROLS_ALLOCATOR_SOLVER_THRUST_ALLOCATION_SOLVER_INTERFACE_H
2 #define CONTROLS_ALLOCATOR_SOLVER_THRUST_ALLOCATION_SOLVER_INTERFACE_H
3 
4 #include <utils/Types.h>
5 
6 class ThrusterLayout;
7 
16 public:
17  virtual ~ThrustAllocationSolverInterface() = default;
18 
26  virtual void build(const ThrusterLayout& layout) = 0;
27 
35  virtual VectorXd allocate(const Vector6d& tau) = 0;
36 
44  virtual Vector6d getBodyForce(const VectorXd& thrusterForces) = 0;
45 
55  virtual void setQ(double val, uint8_t axis) = 0;
56 
63  virtual void updateLimits(float min_force, float max_force) = 0;
64 };
65 
66 #endif // CONTROLS_ALLOCATOR_SOLVER_THRUST_ALLOCATION_SOLVER_INTERFACE_H
Eigen::Matrix< double, 6, 1 > Vector6d
Definition: Types.h:29
Abstract interface for quadratic-programming thrust allocation solvers.
Definition: ThrustAllocationSolverInterface.h:15
virtual void build(const ThrusterLayout &layout)=0
Builds or rebuilds all internal QP matrices from a thruster layout.
virtual ~ThrustAllocationSolverInterface()=default
virtual void updateLimits(float min_force, float max_force)=0
Updates the per-thruster force bounds used in the QP inequality constraints.
virtual VectorXd allocate(const Vector6d &tau)=0
Solves the QP and returns per-thruster force magnitudes.
virtual void setQ(double val, uint8_t axis)=0
Sets the slack-variable penalty weight for a given body axis.
virtual Vector6d getBodyForce(const VectorXd &thrusterForces)=0
Reconstructs the achieved body force from per-thruster forces.
Manages a collection of Thruster objects and builds the allocation matrix.
Definition: ThrusterLayout.h:11