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::ForceApplier ( std::string const &  name = "mars::ForceApplier")
ForceApplier::ForceApplier ( std::string const &  name,
RTT::ExecutionEngine *  engine 
)
ForceApplier::~ForceApplier ( )

Member Function Documentation

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.

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.

void ForceApplier::update ( double  time)
protected
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

friend class ForceApplierBase
friend

Member Data Documentation

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

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