uwv_dynamic_model
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
uwv_dynamic_model::Task 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 <Task.hpp>

Inheritance diagram for uwv_dynamic_model::Task:

Public Member Functions

 Task (std::string const &name="uwv_dynamic_model::Task", ModelSimulator simulator=DYNAMIC_KINEMATIC)
 
 Task (std::string const &name, RTT::ExecutionEngine *engine, ModelSimulator simulator=DYNAMIC_KINEMATIC)
 
 ~Task ()
 
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

bool checkInput (const base::LinearAngular6DCommand &control_input)
 
base::samples::RigidBodyState toRBS (const PoseVelocityState &states)
 
PoseVelocityState fromRBS (const base::samples::RigidBodyState &states)
 
base::Vector6d toVector6d (const base::LinearAngular6DCommand &control_input)
 
SecondaryStates getSecondaryStates (const base::LinearAngular6DCommand &control_input, const AccelerationState &acceleration)
 
void setUncertainty (base::samples::RigidBodyState &states)
 
void setSimulator (ModelSimulator simulator)
 
virtual void handleStates (const base::samples::RigidBodyState &state, const base::LinearAngular6DCommand &control_input)
 
virtual void setRuntimeState ()
 
virtual void resetStates (void)
 
virtual void setStates (::base::samples::RigidBodyState const &pose_state)
 

Protected Attributes

ModelSimulation * model_simulation
 
ModelSimulator simulator
 
base::Time last_control_input
 

Friends

class TaskBase
 

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.

The name of a TaskContext is primarily defined via:

deployment 'deployment_name'
    task('custom_task_name','uwv_dynamic_model::Task')
end

It can be dynamically adapted when the deployment is called with a prefix argument.

Constructor & Destructor Documentation

Task::Task ( std::string const &  name = "uwv_dynamic_model::Task",
ModelSimulator  simulator = DYNAMIC_KINEMATIC 
)
Task::Task ( std::string const &  name,
RTT::ExecutionEngine *  engine,
ModelSimulator  simulator = DYNAMIC_KINEMATIC 
)
Task::~Task ( )

Member Function Documentation

bool Task::checkInput ( const base::LinearAngular6DCommand &  control_input)
protected

Check controlInput for NaN and repeated timestamp.

void Task::cleanupHook ( )
bool Task::configureHook ( )

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

void Task::errorHook ( )
PoseVelocityState Task::fromRBS ( const base::samples::RigidBodyState &  states)
protected

Convert RigidBodyState representation to PoseVelocityState

SecondaryStates Task::getSecondaryStates ( const base::LinearAngular6DCommand &  control_input,
const AccelerationState &  acceleration 
)
protected

Get secondary states

void Task::handleStates ( const base::samples::RigidBodyState &  state,
const base::LinearAngular6DCommand &  control_input 
)
protectedvirtual

Do something with data in derived class

Parameters
posestate
effortcontrol_input
void Task::resetStates ( void  )
protectedvirtual

Resets the states of the model (position and velocity)

void Task::setRuntimeState ( void  )
protectedvirtual

Set Runtime component state independently Default: SIMULATING

void Task::setSimulator ( ModelSimulator  simulator)
protected

Sets the simulator used.

void Task::setStates ( ::base::samples::RigidBodyState const &  pose_state)
protectedvirtual

Set the model's states to pose_state

Parameters
pose_state,theposition, orientation and velocities states used to set the model
void Task::setUncertainty ( base::samples::RigidBodyState &  states)
protected

Sets the uncertainty value for pose and velocity

bool Task::startHook ( )
void Task::stopHook ( )
base::samples::RigidBodyState Task::toRBS ( const PoseVelocityState &  states)
protected

Convert PoseVelocityState representation to RigidBodyState

base::Vector6d Task::toVector6d ( const base::LinearAngular6DCommand &  control_input)
protected

Convert LinearAngular6DCommand representation to Vector6d

void Task::updateHook ( )

Friends And Related Function Documentation

friend class TaskBase
friend

Member Data Documentation

base::Time uwv_dynamic_model::Task::last_control_input
protected
ModelSimulation* uwv_dynamic_model::Task::model_simulation
protected
ModelSimulator uwv_dynamic_model::Task::simulator
protected

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