Public Member Functions | Protected Types | Protected Attributes
ActionExecutorActionlib< Action, ActionGoal, ActionResult > Class Template Reference

Templated base class for creating action executors for actionlib actions using SimpleActionClient. More...

#include <actionExecutorActionlib.hpp>

Inheritance diagram for ActionExecutorActionlib< Action, ActionGoal, ActionResult >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 ActionExecutorActionlib ()
virtual void cancelAction ()
 just cancelAllGoals
virtual bool canExecute (const DurativeAction &a, const SymbolicState &current) const
 Determine if the action can be executed by this implementation.
virtual bool executeBlocking (const DurativeAction &a, SymbolicState &current)
 Executes the action using SimpleActionClient.
virtual bool fillGoal (ActionGoal &goal, const DurativeAction &a, const SymbolicState &current)=0
 Fill the goal to execute this action.
virtual void initialize (const std::deque< std::string > &arguments)
 Initialize the executor by creating the ActionClient.
virtual void updateState (const actionlib::SimpleClientGoalState &actionReturnState, const ActionResult &result, const DurativeAction &a, SymbolicState &current)
 Update the state after an action was executed.
 ~ActionExecutorActionlib ()

Protected Types

typedef
actionlib::SimpleActionClient
< Action > 
ActionClient

Protected Attributes

ActionClient_actionClient
std::string _actionName

Detailed Description

template<class Action, class ActionGoal, class ActionResult>
class ActionExecutorActionlib< Action, ActionGoal, ActionResult >

Templated base class for creating action executors for actionlib actions using SimpleActionClient.

The class is templated over the action (e.g. move_base_msgs::MoveBaseAction), the corresponding goal (e.g. move_base_msgs::MoveBaseGoal) and the matching result.

A minimal implementation should derive from this class (instantiating the template properly) and implement fillGoal.

canExecute can be overridden to test more specific than just the name. updateState can be used to update the planner state upon execution depending on the result of the execution.

Definition at line 21 of file actionExecutorActionlib.hpp.


Member Typedef Documentation

template<class Action , class ActionGoal , class ActionResult >
typedef actionlib::SimpleActionClient<Action> ActionExecutorActionlib< Action, ActionGoal, ActionResult >::ActionClient [protected]

Definition at line 66 of file actionExecutorActionlib.hpp.


Constructor & Destructor Documentation

template<class Action , class ActionGoal , class ActionResult >
ActionExecutorActionlib< Action, ActionGoal, ActionResult >::ActionExecutorActionlib ( )

Definition at line 74 of file actionExecutorActionlib.hpp.

template<class Action , class ActionGoal , class ActionResult >
ActionExecutorActionlib< Action, ActionGoal, ActionResult >::~ActionExecutorActionlib ( )

Definition at line 79 of file actionExecutorActionlib.hpp.


Member Function Documentation

template<class Action , class ActionGoal , class ActionResult >
void ActionExecutorActionlib< Action, ActionGoal, ActionResult >::cancelAction ( ) [virtual]

just cancelAllGoals

Implements continual_planning_executive::ActionExecutorInterface.

Definition at line 139 of file actionExecutorActionlib.hpp.

template<class Action , class ActionGoal , class ActionResult >
bool ActionExecutorActionlib< Action, ActionGoal, ActionResult >::canExecute ( const DurativeAction a,
const SymbolicState current 
) const [virtual]

Determine if the action can be executed by this implementation.

Default implementation only compares _actionName with the name of the DurativeAction.

Implements continual_planning_executive::ActionExecutorInterface.

Definition at line 106 of file actionExecutorActionlib.hpp.

template<class Action , class ActionGoal , class ActionResult >
bool ActionExecutorActionlib< Action, ActionGoal, ActionResult >::executeBlocking ( const DurativeAction a,
SymbolicState current 
) [virtual]

Executes the action using SimpleActionClient.

Implements continual_planning_executive::ActionExecutorInterface.

Definition at line 113 of file actionExecutorActionlib.hpp.

template<class Action , class ActionGoal , class ActionResult >
virtual bool ActionExecutorActionlib< Action, ActionGoal, ActionResult >::fillGoal ( ActionGoal &  goal,
const DurativeAction a,
const SymbolicState current 
) [pure virtual]

Fill the goal to execute this action.

Parameters:
[out]goalthe ActionGoal to be filled.
[in]athe DurativeAction that is to be executed.
[in]currentthe current state where a should be executd.
template<class Action , class ActionGoal , class ActionResult >
void ActionExecutorActionlib< Action, ActionGoal, ActionResult >::initialize ( const std::deque< std::string > &  arguments) [virtual]

Initialize the executor by creating the ActionClient.

Parameters:
[in]argumentsshould be name of action (as in the plan), and the name of the action server to connect to, e.g. "driveBase move_base"

Reimplemented from continual_planning_executive::ActionExecutorInterface.

Definition at line 88 of file actionExecutorActionlib.hpp.

template<class Action , class ActionGoal , class ActionResult >
virtual void ActionExecutorActionlib< Action, ActionGoal, ActionResult >::updateState ( const actionlib::SimpleClientGoalState actionReturnState,
const ActionResult &  result,
const DurativeAction a,
SymbolicState current 
) [inline, virtual]

Update the state after an action was executed.

Parameters:
[in]actionReturnStatethe state of the executed action
[in]resultthe result returned by the action
[in,out]currentthe current planner state to be updated

Definition at line 59 of file actionExecutorActionlib.hpp.


Member Data Documentation

template<class Action , class ActionGoal , class ActionResult >
ActionClient* ActionExecutorActionlib< Action, ActionGoal, ActionResult >::_actionClient [protected]

Definition at line 67 of file actionExecutorActionlib.hpp.

template<class Action , class ActionGoal , class ActionResult >
std::string ActionExecutorActionlib< Action, ActionGoal, ActionResult >::_actionName [protected]

Definition at line 69 of file actionExecutorActionlib.hpp.


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


continual_planning_executive
Author(s): Christian Dornhege
autogenerated on Mon Oct 6 2014 07:51:56