robot_frames
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
robot_frames::ChainPublisher Class Reference

#include <ChainPublisher.hpp>

Inheritance diagram for robot_frames::ChainPublisher:

Public Member Functions

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

Protected Member Functions

void clear_and_resize_vectors ()
 
bool unpack_joints (const base::samples::Joints &joint_state, const std::vector< std::string > &involved_joints, KDL::JntArray &joint_array)
 

Protected Attributes

std::vector< KDL::Chain > chains_
 
std::vector< std::string > chain_names_
 
std::vector< KDL::ChainFkSolverPos_recursive * > pos_solvers_
 
std::vector< KDL::Frame > kdl_frames_
 
std::vector< base::samples::RigidBodyState > bt_frames_
 
std::vector< KDL::JntArray > joint_arrays_
 
std::vector< std::vector< std::string > > involved_active_joints_
 
base::samples::Joints joint_state_
 
KDL::Tree tree_
 
int n_defined_chains_
 
std::vector< RTT::OutputPort< base::samples::RigidBodyState > * > out_ports_
 

Friends

class ChainPublisherBase
 

Constructor & Destructor Documentation

ChainPublisher::ChainPublisher ( std::string const &  name = "robot_frames::ChainPublisher")
ChainPublisher::ChainPublisher ( std::string const &  name,
RTT::ExecutionEngine *  engine 
)
ChainPublisher::~ChainPublisher ( )

Member Function Documentation

void ChainPublisher::cleanupHook ( )

This hook is called by Orocos when the state machine transitions from Stopped to PreOperational, requiring the call to configureHook() before calling start() again.

void ChainPublisher::clear_and_resize_vectors ( )
protected
bool ChainPublisher::configureHook ( )

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

void ChainPublisher::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 ChainPublisher::startHook ( )

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 ChainPublisher::stopHook ( )

This hook is called by Orocos when the state machine transitions from Running to Stopped after stop() has been called.

bool ChainPublisher::unpack_joints ( const base::samples::Joints &  joint_state,
const std::vector< std::string > &  involved_joints,
KDL::JntArray &  joint_array 
)
protected
void ChainPublisher::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 ChainPublisherBase
friend

Member Data Documentation

std::vector<base::samples::RigidBodyState> robot_frames::ChainPublisher::bt_frames_
protected
std::vector<std::string> robot_frames::ChainPublisher::chain_names_
protected
std::vector<KDL::Chain> robot_frames::ChainPublisher::chains_
protected
std::vector<std::vector<std::string> > robot_frames::ChainPublisher::involved_active_joints_
protected
std::vector<KDL::JntArray> robot_frames::ChainPublisher::joint_arrays_
protected
base::samples::Joints robot_frames::ChainPublisher::joint_state_
protected
std::vector<KDL::Frame> robot_frames::ChainPublisher::kdl_frames_
protected
int robot_frames::ChainPublisher::n_defined_chains_
protected
std::vector<RTT::OutputPort<base::samples::RigidBodyState>*> robot_frames::ChainPublisher::out_ports_
protected
std::vector<KDL::ChainFkSolverPos_recursive*> robot_frames::ChainPublisher::pos_solvers_
protected
KDL::Tree robot_frames::ChainPublisher::tree_
protected

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