Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Action Class Reference

A class describing a single action. More...

#include <Actionfield.h>

Collaboration diagram for Action:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Action ()
 Constructor.

 ~Action ()
 Destructor.

 Action (const Action &a)
 Copy-Constructor.

bool canBeApplied (const PfPose &robotPose, const std::vector< Object * > &objects)
 Checks if this Action can be applied.


Public Attributes

std::string name
 The name of the action.

ObjectmanipulatedObject
 The manipulated object.

unsigned int objectIdx
 Index of the manipulated object in a dynamicObjects field (for internal use).

bool joinAction
 Flag, true if the robot joins the action.

std::vector< PolygonimpactAreas
 The impact areas.

std::vector< PotentialfieldTransformation * > transformations
 The transformations.

ActionType actionType
 The type of the action.

PfPose motionParameters
 Motion parameters resulting from some transformations.

double time
 The time this action takes.


Protected Member Functions

bool poseInsideImpactArea (const PfPose &robPose, const PfPose &objPose)
 Checks if a single pose is inside any of the robot's impact areas.


Detailed Description

A class describing a single action.

Definition at line 40 of file Actionfield.h.


Constructor & Destructor Documentation

Action::Action  ) 
 

Constructor.

Definition at line 17 of file Actionfield.cpp.

References manipulatedObject.

Action::~Action  ) 
 

Destructor.

Definition at line 24 of file Actionfield.cpp.

References impactAreas, and transformations.

Action::Action const Action a  ) 
 

Copy-Constructor.

Parameters:
a Another action

Definition at line 36 of file Actionfield.cpp.

References actionType, impactAreas, joinAction, manipulatedObject, name, and transformations.


Member Function Documentation

bool Action::canBeApplied const PfPose robotPose,
const std::vector< Object * > &  objects
 

Checks if this Action can be applied.

Parameters:
robotPose The current pose of the robot
objects A list of objects, containing a current version of the manipulated object

Definition at line 51 of file Actionfield.cpp.

References actionType, PfPose::hasProbabilityDistribution, MEASURE_OBJECT, MEASURE_SELF, MOVE_SELF, objectIdx, poseInsideImpactArea(), and PfPose::probabilityDistribution.

Referenced by FutureWorldModelGenerator::executeSingleTransformation().

Here is the call graph for this function:

bool Action::poseInsideImpactArea const PfPose robPose,
const PfPose objPose
[inline, protected]
 

Checks if a single pose is inside any of the robot's impact areas.

Parameters:
robPose The robot pose
objPose The pose of an object
Returns:
true, if the pose is inside any impact area

Definition at line 122 of file Actionfield.cpp.

References impactAreas, PfPose::pos, PfVec::rotate(), and PfPose::rotation.

Referenced by canBeApplied().

Here is the call graph for this function:


Member Data Documentation

std::string Action::name
 

The name of the action.

Definition at line 44 of file Actionfield.h.

Referenced by Action(), and Parser::parseActionfield().

Object* Action::manipulatedObject
 

The manipulated object.

Definition at line 46 of file Actionfield.h.

Referenced by Action(), Actionfield::addManipulatedObject(), and Parser::parseAction().

unsigned int Action::objectIdx
 

Index of the manipulated object in a dynamicObjects field (for internal use).

Definition at line 48 of file Actionfield.h.

Referenced by Actionfield::addManipulatedObject(), canBeApplied(), Actionfield::computeActionValue(), FutureWorldModelGenerator::executeSingleTransformation(), and FutureWorldModelGenerator::transformWorldState().

bool Action::joinAction
 

Flag, true if the robot joins the action.

Definition at line 50 of file Actionfield.h.

Referenced by Action(), FutureWorldModelGenerator::executeSingleTransformation(), Parser::parseAction(), and FutureWorldModelGenerator::transformWorldState().

std::vector<Polygon> Action::impactAreas
 

The impact areas.

Definition at line 52 of file Actionfield.h.

Referenced by Action(), Parser::parseAction(), poseInsideImpactArea(), and ~Action().

std::vector<PotentialfieldTransformation*> Action::transformations
 

The transformations.

Definition at line 54 of file Actionfield.h.

Referenced by Action(), Parser::parseAction(), FutureWorldModelGenerator::transformWorldState(), and ~Action().

ActionType Action::actionType
 

The type of the action.

Definition at line 56 of file Actionfield.h.

Referenced by Action(), canBeApplied(), Actionfield::computeActionValue(), FutureWorldModelGenerator::executeSingleTransformation(), Parser::parseAction(), and FutureWorldModelGenerator::transformWorldState().

PfPose Action::motionParameters
 

Motion parameters resulting from some transformations.

Definition at line 58 of file Actionfield.h.

Referenced by FutureWorldModelGenerator::executeSingleTransformation().

double Action::time
 

The time this action takes.

Definition at line 60 of file Actionfield.h.

Referenced by FutureWorldModelGenerator::transformWorldState().


The documentation for this class was generated from the following files:
Generated on Thu Sep 23 20:04:07 2004 for GT2004 by doxygen 1.3.6