mars
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
mars::ForceApplier Class Reference

#include <ForceApplier.hpp>

Inheritance diagram for mars::ForceApplier:

Public Member Functions

 ForceApplier (std::string const &name="mars::ForceApplier")
 
 ForceApplier (std::string const &name, RTT::ExecutionEngine *engine)
 
 ~ForceApplier ()
 
bool startHook ()
 The following lines are template definitions for the various state machine. More...
 
void updateHook ()
 
void errorHook ()
 

Protected Member Functions

void update (double time)
 

Protected Attributes

unsigned long vehicle_id
 
unsigned int amount_of_actuators
 
std::vector< double > maximum_thruster_force
 
std::vector< mars::utils::Vector > thruster_position
 
std::vector< mars::utils::Vector > thruster_direction
 
std::vector< mars::interfaces::sReal > thruster_force
 
pthread_mutex_t node_update_mutex
 
unsigned int RATE
 
base::commands::Joints command
 

Friends

class ForceApplierBase
 

Constructor & Destructor Documentation

◆ ForceApplier() [1/2]

ForceApplier::ForceApplier ( std::string const &  name = "mars::ForceApplier")

◆ ForceApplier() [2/2]

ForceApplier::ForceApplier ( std::string const &  name,
RTT::ExecutionEngine *  engine 
)

◆ ~ForceApplier()

ForceApplier::~ForceApplier ( )

Member Function Documentation

◆ errorHook()

void ForceApplier::errorHook ( )

This hook is called by Orocos when the component is in the RunTimeError state, at each activity step. See the discussion in updateHook() about triggering options.

Call recover() to go back in the Runtime state.

◆ startHook()

bool ForceApplier::startHook ( )

The following lines are template definitions for the various state machine.

This hook is called by Orocos when the state machine transitions from Stopped to Running. If it returns false, then the component will stay in Stopped. Otherwise, it goes into Running and updateHook() will be called.

◆ update()

void ForceApplier::update ( double  time)
protected

◆ updateHook()

void ForceApplier::updateHook ( )

This hook is called by Orocos when the component is in the Running state, at each activity step. Here, the activity gives the "ticks" when the hook should be called.

The error(), exception() and fatal() calls, when called in this hook, allow to get into the associated RunTimeError, Exception and FatalError states.

In the first case, updateHook() is still called, and recover() allows you to go back into the Running state. In the second case, the errorHook() will be called instead of updateHook(). In Exception, the component is stopped and recover() needs to be called before starting it again. Finally, FatalError cannot be recovered.

Friends And Related Function Documentation

◆ ForceApplierBase

friend class ForceApplierBase
friend

Member Data Documentation

◆ amount_of_actuators

unsigned int mars::ForceApplier::amount_of_actuators
protected

◆ command

base::commands::Joints mars::ForceApplier::command
protected

◆ maximum_thruster_force

std::vector<double> mars::ForceApplier::maximum_thruster_force
protected

◆ node_update_mutex

pthread_mutex_t mars::ForceApplier::node_update_mutex
protected

◆ RATE

unsigned int mars::ForceApplier::RATE
protected

◆ thruster_direction

std::vector<mars::utils::Vector> mars::ForceApplier::thruster_direction
protected

◆ thruster_force

std::vector<mars::interfaces::sReal> mars::ForceApplier::thruster_force
protected

◆ thruster_position

std::vector<mars::utils::Vector> mars::ForceApplier::thruster_position
protected

◆ vehicle_id

unsigned long mars::ForceApplier::vehicle_id
protected

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