#include <ThrustAllocation.hpp>
Public Member Functions | |
void | allocate (const labust::simulation::vector &tauIn, labust::simulation::vector &tauOut) |
const Eigen::VectorXi & | getCoercion () |
const Eigen::VectorXd & | getThrusterForces () |
template<class AllocMatrix , class DOFMatrix , class ThrusterGroups > | |
void | init (int alloc_type, const AllocMatrix &alloc, const DOFMatrix &use_dofs, const ThrusterGroups &thrust_groups) |
void | setThrusterMinMax (double min, double max) |
ThrustAllocator () | |
Protected Member Functions | |
void | scale_alloc () |
void | simple_alloc () |
Protected Attributes | |
Eigen::MatrixXd | B |
Eigen::MatrixXd | Binv |
Eigen::VectorXi | coercion |
std::vector< int > | dofs |
std::vector< double > | group_scales |
std::vector< std::vector< int > > | groups |
int | num_thrusters |
Eigen::VectorXd | tdes |
double | tmax |
double | tmin |
int | type |
Private Types | |
enum | { NoAlloc = 0, SimpleAlloc = 1, ScaleAlloc = 2 } |
Performs thrust allocation based on configuration. Added support for thruster grouping to support multi-scaling allocation.
Add ability to register an external allocation algorithm when the need arises
Is it better to have a bunch of preprogramed simple allocation types that have static alllocation data ?
Split into a compilable cpp when more than one larger class exists for vehicle support
Remove the ROS_ERROR debug messages and any ROS dependencies
Add the windup indication for groups of scaled allocations
Definition at line 59 of file ThrustAllocation.hpp.
anonymous enum [private] |
Definition at line 61 of file ThrustAllocation.hpp.
labust::vehicles::ThrustAllocator::ThrustAllocator | ( | ) | [inline] |
Main constructor.
Definition at line 66 of file ThrustAllocation.hpp.
void labust::vehicles::ThrustAllocator::allocate | ( | const labust::simulation::vector & | tauIn, |
labust::simulation::vector & | tauOut | ||
) | [inline] |
Performs allocation and necessary conversions.
Definition at line 80 of file ThrustAllocation.hpp.
const Eigen::VectorXi& labust::vehicles::ThrustAllocator::getCoercion | ( | ) | [inline] |
Definition at line 220 of file ThrustAllocation.hpp.
const Eigen::VectorXd& labust::vehicles::ThrustAllocator::getThrusterForces | ( | ) | [inline] |
Definition at line 218 of file ThrustAllocation.hpp.
void labust::vehicles::ThrustAllocator::init | ( | int | alloc_type, |
const AllocMatrix & | alloc, | ||
const DOFMatrix & | use_dofs, | ||
const ThrusterGroups & | thrust_groups | ||
) | [inline] |
Definition at line 158 of file ThrustAllocation.hpp.
void labust::vehicles::ThrustAllocator::scale_alloc | ( | ) | [inline, protected] |
Do scaled allocation.
Definition at line 237 of file ThrustAllocation.hpp.
void labust::vehicles::ThrustAllocator::setThrusterMinMax | ( | double | min, |
double | max | ||
) | [inline] |
The method sets the thruster maximum and minimum force.
Definition at line 212 of file ThrustAllocation.hpp.
void labust::vehicles::ThrustAllocator::simple_alloc | ( | ) | [inline, protected] |
Do simple allocation.
Definition at line 226 of file ThrustAllocation.hpp.
Eigen::MatrixXd labust::vehicles::ThrustAllocator::B [protected] |
The allocation matrix.
Definition at line 280 of file ThrustAllocation.hpp.
Eigen::MatrixXd labust::vehicles::ThrustAllocator::Binv [protected] |
Definition at line 280 of file ThrustAllocation.hpp.
Eigen::VectorXi labust::vehicles::ThrustAllocator::coercion [protected] |
The coercion vector.
Definition at line 292 of file ThrustAllocation.hpp.
std::vector<int> labust::vehicles::ThrustAllocator::dofs [protected] |
Desired dofs.
Definition at line 267 of file ThrustAllocation.hpp.
std::vector<double> labust::vehicles::ThrustAllocator::group_scales [protected] |
The scales per group.
Definition at line 275 of file ThrustAllocation.hpp.
std::vector< std::vector<int> > labust::vehicles::ThrustAllocator::groups [protected] |
Thruster groups.
Definition at line 271 of file ThrustAllocation.hpp.
int labust::vehicles::ThrustAllocator::num_thrusters [protected] |
Definition at line 296 of file ThrustAllocation.hpp.
Eigen::VectorXd labust::vehicles::ThrustAllocator::tdes [protected] |
The allocated thrusters.
Definition at line 288 of file ThrustAllocation.hpp.
double labust::vehicles::ThrustAllocator::tmax [protected] |
The maximum and minimum thrust.
Definition at line 284 of file ThrustAllocation.hpp.
double labust::vehicles::ThrustAllocator::tmin [protected] |
Definition at line 284 of file ThrustAllocation.hpp.
int labust::vehicles::ThrustAllocator::type [protected] |
Allocation type, number of thrusters.
Definition at line 296 of file ThrustAllocation.hpp.