FutureWorldModelGenerator Class Reference

#include <FutureWorldModelGenerator.h>

List of all members.

Public Member Functions

void transformWorldState (const PfPose &poseNow, PfPose &poseThen, Action &action, Actionfield *callingField, std::vector< Object * > &worldStateNow, std::vector< Object * > &worldStateThen, std::vector< Object * > &worldStateStatic)

Static Public Member Functions

static FutureWorldModelGeneratorgetFutureWorldModelGenerator ()

Private Member Functions

 FutureWorldModelGenerator ()
void executeSingleTransformation (PfPose &pose, Action &action, PotentialfieldTransformation *transformation, Actionfield *callingField, std::vector< Object * > &dynamicWorldState, std::vector< Object * > &staticWorldState)
double getMaxTranslationForObject (const PfPose &objectPose, const PfVec &translation, std::vector< Object * > &otherObjects, std::vector< Object * > &otherStaticObjects, int excludedObject=-1)
double getMaxRotationForObject (const PfPose &objectPose, const PfPose &rotationPose, double rotation, std::vector< Object * > &otherObjects, std::vector< Object * > &otherStaticObjects, int excludedObject=-1)


Detailed Description

A class for computing a world model after excuting a specific action.

Definition at line 32 of file FutureWorldModelGenerator.h.


Constructor & Destructor Documentation

FutureWorldModelGenerator::FutureWorldModelGenerator (  )  [inline, private]

Constructor

Definition at line 36 of file FutureWorldModelGenerator.h.


Member Function Documentation

void FutureWorldModelGenerator::executeSingleTransformation ( PfPose pose,
Action action,
PotentialfieldTransformation transformation,
Actionfield callingField,
std::vector< Object * > &  dynamicWorldState,
std::vector< Object * > &  staticWorldState 
) [private]

Executes a transformation

Parameters:
pose The robot pose (may be changed by this function)
action The action to which the transformation is assigned
transformation The transformation to be executed
callingField The potential field using this class
dynamicWorldState All dynamic objects (may be changed by this function)
staticWorldState All static objects

Definition at line 110 of file FutureWorldModelGenerator.cpp.

References Action::actionType, PfPose::addAbsVector(), Translation::alongGradient, Rotation::angle, Action::canBeApplied(), PfVec::distanceTo(), PfVec::getAngle(), Actionfield::getFutureFieldVecAt(), getMaxRotationForObject(), getMaxTranslationForObject(), Object::getPose(), PotentialfieldTransformation::getType(), PfPose::hasProbabilityDistribution, Action::joinAction, PfVec::length(), Translation::maxGradientDeviation, Translation::maxLength, Action::motionParameters, MOVE_OBJECT, PfVec::normalize(), PfPose::normRotation(), Action::objectIdx, PfPose::pos, PfPose::probabilityDistribution, PfVec::rotate(), ROTATION, PfPose::rotation, Rotation::speed, Translation::speed, Translation::stepLength, PotentialfieldTransformation::time, Rotation::toGradient, Rotation::toObject, Translation::toObject, Translation::translation, TRANSLATION, PfVec::x, and PfVec::y.

Referenced by transformWorldState().

static FutureWorldModelGenerator* FutureWorldModelGenerator::getFutureWorldModelGenerator (  )  [inline, static]

Returns a pointer to the class (which is a singleton)

Returns:
The pointer

Definition at line 42 of file FutureWorldModelGenerator.h.

Referenced by Actionfield::Actionfield().

double FutureWorldModelGenerator::getMaxRotationForObject ( const PfPose objectPose,
const PfPose rotationPose,
double  rotation,
std::vector< Object * > &  otherObjects,
std::vector< Object * > &  otherStaticObjects,
int  excludedObject = -1 
) [private]

Checks a planned rotation for collisions

Parameters:
objectPose The pose of the object to be transformed
rotationPose The position to rotate around also including the current rotation
rotation The planned rotation
otherObjects All dynamic objects
otherStaticObjects All static objects
excludedObject The index (in otherObjects) of the object to be checked
Returns:
A value [0.0 .. 1.0] indicated "how much" of the translation may be executed

Definition at line 394 of file FutureWorldModelGenerator.cpp.

References EPSILON, PfPose::getAngleTo(), Circle::initRadiusOfCollisionCircle(), intersectGeometricObjects(), Sector::openingAngle, Sector::pointInside(), PfPose::pos, PfieldGeometricObject::position, and Circle::radius.

Referenced by executeSingleTransformation().

double FutureWorldModelGenerator::getMaxTranslationForObject ( const PfPose objectPose,
const PfVec translation,
std::vector< Object * > &  otherObjects,
std::vector< Object * > &  otherStaticObjects,
int  excludedObject = -1 
) [private]

Checks a planned transformation for collisions

Parameters:
objectPose The pose of the object to be transformed
translation The planned translation
otherObjects All dynamic objects
otherStaticObjects All static objects
excludedObject The index (in otherObjects) of the object to be checked
Returns:
A value [0.0 .. 1.0] indicated "how much" of the translation may be executed

Definition at line 326 of file FutureWorldModelGenerator.cpp.

References dist(), intersectGeometricObjects(), PfVec::length(), Line::p1, Line::p2, PfPose::pos, PfieldGeometricObject::position, and PfieldGeometricObject::radiusOfCollisionCircle.

Referenced by executeSingleTransformation().

void FutureWorldModelGenerator::transformWorldState ( const PfPose poseNow,
PfPose poseThen,
Action action,
Actionfield callingField,
std::vector< Object * > &  worldStateNow,
std::vector< Object * > &  worldStateThen,
std::vector< Object * > &  worldStateStatic 
)

Transforms the world state by applying an action

Parameters:
poseNow The original pose
poseThen The pose after the action
action The action
callingField The potential field calling this function
worldStateNow The state of all objects before the action
worldStateThen The state of all objects after the action
worldStateStatic All static objects (never move, cannot be moved)

Definition at line 19 of file FutureWorldModelGenerator.cpp.

References Action::actionType, d, executeSingleTransformation(), PfPose::hasProbabilityDistribution, Action::joinAction, MEASURE_OBJECT, MEASURE_SELF, MOVE_OBJECT, MOVE_SELF, Action::objectIdx, PfPose::probabilityDistribution, PfPose::setPoseFromSamples(), Action::time, and Action::transformations.

Referenced by Actionfield::execute(), and Actionfield::findBestSequence().


The documentation for this class was generated from the following files:
Generated on Thu Dec 7 01:32:01 2006 for DT2005.panorama by  doxygen 1.4.7