#include <Actionfield.h>
Inheritance diagram for Actionfield:
Public Member Functions | |
Actionfield (const std::string &name) | |
Constructor. | |
virtual | ~Actionfield () |
Destructor. | |
virtual void | init () |
Initializes values and / or allocates additional memory for subsequent computations. | |
void | execute (const PfPose &pose, PotentialfieldResult &result) |
Computes the result of a field. | |
virtual void | addObject (Object *object) |
Adds an object to the field. | |
void | addAction (const Action &action) |
Adds an action to the field. | |
void | setActionfieldType (ActionfieldType actionfieldType, bool decreasingValuesOnly=false, unsigned int searchDepth=0) |
Sets the type of the action field. | |
void | setConsiderTime (bool considerTime) |
Sets the value of considerTime. | |
PfVec | getFutureFieldVecAt (const PfPose &pose, const std::vector< Object * > &dynamicObjects, int excludedDynamicObject=-1) |
Computes the gradient at a spezific pose in a field consisting of all static objects and all the other, possibly transformed, objects. | |
BehaviorFieldType | getBehaviorFieldType () const |
Returns the type of the field. | |
Protected Member Functions | |
double | computeValueAtPose (const PfPose &pose, const std::vector< Object * > &dynamicObjects, int excludedDynamicObject=-1) |
Computes the value at a spezific pose in a field consisting of all static objects and all the other, possibly transformed, objects. | |
double | computeActionValue (const Action &action, double time, const PfPose &ownPoseBefore, const PfPose &ownPoseAfter, const std::vector< Object * > &objectsBefore, const std::vector< Object * > &objectsAfter, bool &passedPruningCheck) |
Computes the value of an action considering the criterion. | |
void | addManipulatedObject (Action &action) |
Adds a manipulated object to the object lists (if it has not been added before) and sets the objectIdx member of the action. | |
void | findBestSequence (unsigned int depth, const PfPose &robotPose, std::vector< unsigned int > &actionSequenceList, double time, double previousValue, PotentialfieldResult &result) |
Searches recursively for the best possible action sequence and sets the result. | |
Protected Attributes | |
std::vector< Object * > | staticObjects |
Container for static objects. | |
std::vector< Object * > | dynamicObjects |
Container for dynamic objects. | |
std::vector< std::vector< Object * > > | futureWorldStates |
The future world states. | |
std::vector< PfPose > | futureRobotPoses |
The future poses of the robot. | |
std::vector< Action > | actions |
The actions to be applied. | |
FutureWorldModelGenerator * | futureWorldModelGenerator |
A pointer to the FutureWorldModelGenerator. | |
ActionfieldType | actionfieldType |
The type of this action field. | |
unsigned int | worldStateDepth |
The depth of future world states. | |
bool | decreasingValuesOnly |
Pruning option, accept only sequences with decreasing values. | |
double | maxTolerance |
Pruning option, maximum deviation between two action values. | |
bool | considerTime |
Flag: true, if the time of an action when computing its value is to be considered. |
Definition at line 96 of file Actionfield.h.
|
Constructor.
Definition at line 140 of file Actionfield.cpp. References futureWorldModelGenerator, and FutureWorldModelGenerator::getFutureWorldModelGenerator(). |
Here is the call graph for this function:
|
Destructor.
Definition at line 147 of file Actionfield.cpp. References actions, dynamicObjects, futureWorldStates, and worldStateDepth. |
|
Initializes values and / or allocates additional memory for subsequent computations. This function should be called after all values are set and all objects and actions have been assigned Reimplemented from Potentialfield. Definition at line 162 of file Actionfield.cpp. References actionfieldType, actions, addManipulatedObject(), dynamicObjects, FIXED_SEQUENCE_FIELD, futureRobotPoses, futureWorldStates, MEASURE_OBJECT, MOVE_OBJECT, SINGLE_ACTION_FIELD, and worldStateDepth. |
Here is the call graph for this function:
|
Computes the result of a field.
Implements Potentialfield. Definition at line 236 of file Actionfield.cpp. References actionfieldType, PotentialfieldResult::actionPossible, actions, computeActionValue(), CRITERION_CONST, dynamicObjects, findBestSequence(), FIXED_SEQUENCE_FIELD, futureRobotPoses, futureWorldModelGenerator, futureWorldStates, PotentialfieldResult::motion, SINGLE_ACTION_FIELD, PfPose::speed, staticObjects, PotentialfieldResult::subAction, FutureWorldModelGenerator::transformWorldState(), PotentialfieldResult::value, and worldStateDepth. |
Here is the call graph for this function:
|
Adds an object to the field.
Reimplemented from Potentialfield. Definition at line 200 of file Actionfield.cpp. References Potentialfield::addObject(), dynamicObjects, Object::isStatic(), and staticObjects. |
Here is the call graph for this function:
|
Adds an action to the field.
Definition at line 230 of file Actionfield.cpp. References actions. Referenced by Parser::parseActionfield(). |
|
Sets the type of the action field.
Definition at line 131 of file Actionfield.h. References decreasingValuesOnly, and worldStateDepth. Referenced by Parser::parseActionfield(). |
|
Sets the value of considerTime.
Definition at line 141 of file Actionfield.h. Referenced by Parser::parseActionfield(). |
|
Computes the gradient at a spezific pose in a field consisting of all static objects and all the other, possibly transformed, objects.
Definition at line 403 of file Actionfield.cpp. References staticObjects. Referenced by FutureWorldModelGenerator::executeSingleTransformation(). |
|
Returns the type of the field.
Implements Potentialfield. Definition at line 157 of file Actionfield.h. References ACTION_FIELD, and BehaviorFieldType. |
|
Computes the value at a spezific pose in a field consisting of all static objects and all the other, possibly transformed, objects.
Definition at line 373 of file Actionfield.cpp. References staticObjects. Referenced by computeActionValue(). |
|
Computes the value of an action considering the criterion.
Definition at line 433 of file Actionfield.cpp. References Action::actionType, computeValueAtPose(), considerTime, CRITERION_ABSOLUTE, CRITERION_GAIN, decreasingValuesOnly, EPSILON, MEASURE_OBJECT, MEASURE_SELF, MOVE_OBJECT, MOVE_SELF, and Action::objectIdx. Referenced by execute(), and findBestSequence(). |
Here is the call graph for this function:
|
Adds a manipulated object to the object lists (if it has not been added before) and sets the objectIdx member of the action.
Definition at line 214 of file Actionfield.cpp. References dynamicObjects, Action::manipulatedObject, and Action::objectIdx. Referenced by init(). |
|
Searches recursively for the best possible action sequence and sets the result.
Definition at line 331 of file Actionfield.cpp. References actions, computeActionValue(), dynamicObjects, futureRobotPoses, futureWorldModelGenerator, futureWorldStates, PotentialfieldResult::motion, staticObjects, PotentialfieldResult::subAction, FutureWorldModelGenerator::transformWorldState(), PotentialfieldResult::value, and worldStateDepth. Referenced by execute(). |
Here is the call graph for this function:
|
Container for static objects.
Definition at line 162 of file Actionfield.h. Referenced by addObject(), computeValueAtPose(), execute(), findBestSequence(), and getFutureFieldVecAt(). |
|
Container for dynamic objects.
Definition at line 164 of file Actionfield.h. Referenced by addManipulatedObject(), addObject(), execute(), findBestSequence(), init(), and ~Actionfield(). |
|
The future world states.
Definition at line 166 of file Actionfield.h. Referenced by execute(), findBestSequence(), init(), and ~Actionfield(). |
|
The future poses of the robot.
Definition at line 168 of file Actionfield.h. Referenced by execute(), findBestSequence(), and init(). |
|
The actions to be applied.
Definition at line 170 of file Actionfield.h. Referenced by addAction(), execute(), findBestSequence(), init(), and ~Actionfield(). |
|
A pointer to the FutureWorldModelGenerator.
Definition at line 172 of file Actionfield.h. Referenced by Actionfield(), execute(), and findBestSequence(). |
|
The type of this action field.
Definition at line 174 of file Actionfield.h. |
|
The depth of future world states.
Definition at line 176 of file Actionfield.h. Referenced by execute(), findBestSequence(), init(), setActionfieldType(), and ~Actionfield(). |
|
Pruning option, accept only sequences with decreasing values.
Definition at line 178 of file Actionfield.h. Referenced by computeActionValue(), and setActionfieldType(). |
|
Pruning option, maximum deviation between two action values.
Definition at line 180 of file Actionfield.h. |
|
Flag: true, if the time of an action when computing its value is to be considered.
Definition at line 182 of file Actionfield.h. Referenced by computeActionValue(). |