orogen-wbc
wbc::CartesianStateToRbsTask Class Reference

The task context provides and requires services. It uses an ExecutionEngine to perform its functions. Essential interfaces are operations, data flow ports and properties. These interfaces have been defined using the oroGen specification. In order to modify the interfaces you should (re)use oroGen and rely on the associated workflow. More...

#include <CartesianStateToRbsTask.hpp>

Inheritance diagram for wbc::CartesianStateToRbsTask:

Public Member Functions

 CartesianStateToRbsTask (std::string const &name="wbc::CartesianStateToRbsTask")
 
 ~CartesianStateToRbsTask ()
 
bool configureHook ()
 
bool startHook ()
 
void updateHook ()
 
void errorHook ()
 
void stopHook ()
 
void cleanupHook ()
 

Protected Types

typedef RTT::InputPort< base::samples::RigidBodyStateSE3 > CartesianStateInputPort
 
typedef std::shared_ptr< RTT::InputPort< base::samples::RigidBodyStateSE3 > > CartesianStateInputPortPtr
 
typedef RTT::OutputPort< base::samples::RigidBodyState > RbsOutputPort
 
typedef std::shared_ptr< RTT::OutputPort< base::samples::RigidBodyState > > RbsOutputPortPtr
 
typedef std::map< std::string, CartesianStateInputPortPtrCartesianStateInputPortMap
 
typedef std::map< std::string, RbsOutputPortPtrRbsOutputPortMap
 

Protected Member Functions

base::samples::RigidBodyState toRigidBodyState (const base::samples::RigidBodyStateSE3 &in)
 

Protected Attributes

CartesianStateInputPortMap input_port_map
 
RbsOutputPortMap output_port_map
 

Friends

class CartesianStateToRbsTaskBase
 

Detailed Description

The task context provides and requires services. It uses an ExecutionEngine to perform its functions. Essential interfaces are operations, data flow ports and properties. These interfaces have been defined using the oroGen specification. In order to modify the interfaces you should (re)use oroGen and rely on the associated workflow.

Convert samples of type base/samples/RigidBodyState to type base/samples/CartesianState

   \details
   The name of a TaskContext is primarily defined via:
 \verbatim
 deployment 'deployment_name'
     task('custom_task_name','wbc::CartesianStateToRbsTask')
 end
 \endverbatim
    It can be dynamically adapted when the deployment is called with a prefix argument.

Member Typedef Documentation

◆ CartesianStateInputPort

typedef RTT::InputPort<base::samples::RigidBodyStateSE3> wbc::CartesianStateToRbsTask::CartesianStateInputPort
protected

◆ CartesianStateInputPortMap

◆ CartesianStateInputPortPtr

typedef std::shared_ptr< RTT::InputPort<base::samples::RigidBodyStateSE3> > wbc::CartesianStateToRbsTask::CartesianStateInputPortPtr
protected

◆ RbsOutputPort

typedef RTT::OutputPort<base::samples::RigidBodyState> wbc::CartesianStateToRbsTask::RbsOutputPort
protected

◆ RbsOutputPortMap

typedef std::map<std::string, RbsOutputPortPtr> wbc::CartesianStateToRbsTask::RbsOutputPortMap
protected

◆ RbsOutputPortPtr

typedef std::shared_ptr< RTT::OutputPort<base::samples::RigidBodyState> > wbc::CartesianStateToRbsTask::RbsOutputPortPtr
protected

Constructor & Destructor Documentation

◆ CartesianStateToRbsTask()

CartesianStateToRbsTask::CartesianStateToRbsTask ( std::string const & name = "wbc::CartesianStateToRbsTask")

TaskContext constructor for CartesianStateToRbsTask

Parameters
nameName of the task. This name needs to be unique to make it identifiable via nameservices.
initial_stateThe initial TaskState of the TaskContext. Default is Stopped state.

◆ ~CartesianStateToRbsTask()

CartesianStateToRbsTask::~CartesianStateToRbsTask ( )

Default deconstructor of CartesianStateToRbsTask

Member Function Documentation

◆ cleanupHook()

void CartesianStateToRbsTask::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.

◆ configureHook()

bool CartesianStateToRbsTask::configureHook ( )

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

It is meaningful only if the #needs_configuration has been specified in the task context definition with (for example):

task_context "TaskName" do
  needs_configuration
  ...
end

◆ errorHook()

void CartesianStateToRbsTask::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 CartesianStateToRbsTask::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.

◆ stopHook()

void CartesianStateToRbsTask::stopHook ( )

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

◆ toRigidBodyState()

base::samples::RigidBodyState CartesianStateToRbsTask::toRigidBodyState ( const base::samples::RigidBodyStateSE3 & in)
protected

◆ updateHook()

void CartesianStateToRbsTask::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 Symbol Documentation

◆ CartesianStateToRbsTaskBase

friend class CartesianStateToRbsTaskBase
friend

Member Data Documentation

◆ input_port_map

CartesianStateInputPortMap wbc::CartesianStateToRbsTask::input_port_map
protected

◆ output_port_map

RbsOutputPortMap wbc::CartesianStateToRbsTask::output_port_map
protected

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