Skip to content

ThrustAllocation

ROS implementation of the thrust allocation. Receives forces applied to the vehicle and calculates the desired forces to each thruster based on the pseudo inverse of the thrust allocation matrix.

#include <thruster_allocation.h>

Public Functions

Name
ThrustAllocation(ros::NodeHandle & nh)
Thrust Allocation class constructor.
void initializeSubscribers(ros::NodeHandle & nh)
Function to initialize subscribers.
void initializePublishers(ros::NodeHandle & nh)
Function to initialize publishers.
void loadParams(ros::NodeHandle & nh)
Function to read parameters. Reads the thruster allocation matrix and computes its pseudo inverse.
void saturateVector(Eigen::VectorXd & thr_thrust)
Given a force vector for each thruster, saturate the norm of the vector based on the maximum force of the thruster.
void readTAM(ros::NodeHandle & nh)
Function to read a thruster allocation matrix and compute its pseudo inverse.
void readCT(ros::NodeHandle & nh)
Function to read the ct parameters (conversion from thrust to RPM and vice versa)
void readRPMGain(ros::NodeHandle & nh)
Function to read the actuators gain (RPM max value / 100).
void thrusterAllocation(const auv_msgs::BodyForceRequest & msg)
Callback function of the topic with the tau (force request)

Public Functions Documentation

function ThrustAllocation

ThrustAllocation(
    ros::NodeHandle & nh
)

Thrust Allocation class constructor.

Parameters:

  • nh ROS nodehandle to publish, subscribe and read relevant parameters

function initializeSubscribers

void initializeSubscribers(
    ros::NodeHandle & nh
)

Function to initialize subscribers.

Parameters:

  • nh ROS nodehandle to publish, subscribe and read relevant

function initializePublishers

void initializePublishers(
    ros::NodeHandle & nh
)

Function to initialize publishers.

Parameters:

  • nh ROS nodehandle to publish, subscribe and read relevant

function loadParams

void loadParams(
    ros::NodeHandle & nh
)

Function to read parameters. Reads the thruster allocation matrix and computes its pseudo inverse.

Parameters:

  • nh ROS nodehandle to publish, subscribe and read relevant

function saturateVector

void saturateVector(
    Eigen::VectorXd & thr_thrust
)

Given a force vector for each thruster, saturate the norm of the vector based on the maximum force of the thruster.

function readTAM

void readTAM(
    ros::NodeHandle & nh
)

Function to read a thruster allocation matrix and compute its pseudo inverse.

Parameters:

  • nh

function readCT

void readCT(
    ros::NodeHandle & nh
)

Function to read the ct parameters (conversion from thrust to RPM and vice versa)

Parameters:

  • nh

function readRPMGain

void readRPMGain(
    ros::NodeHandle & nh
)

Function to read the actuators gain (RPM max value / 100).

Parameters:

  • nh

function thrusterAllocation

void thrusterAllocation(
    const auv_msgs::BodyForceRequest & msg
)

Callback function of the topic with the tau (force request)

Parameters:

  • msg Variable containing the force request

Updated on 2024-03-07 at 10:30:50 +0000


Last update: March 7, 2024