#include <Motionfield.h>
Inheritance diagram for Motionfield:


Public Member Functions | |
| Motionfield (const std::string &name) | |
| Constructor. | |
| virtual | ~Motionfield () |
| Destructor. | |
| void | execute (const PfPose &pose, PotentialfieldResult &result) |
| Computes the result of a field. | |
| void | disableDegreesOfFreedom (bool translation, bool rotation) |
| Activates or deactivates the degrees of freedom of the field. | |
| void | setAccelerationLimits (double maxAccel, double maxGradientDifference) |
| Sets the acceleration limits. | |
| void | addRandomMotionGenerator (RandomMotionGenerator *randomMotionGenerator) |
| Adds a random device to this field. | |
| void | addPathPlanner (PfieldAStarSearch *pathPlanner, bool useAlways, Object *goal, const PotentialfieldAStarParameterSet ¶meterSet, double maxGradientLength) |
| Adds a path planner to this a field. | |
| PfVec | getRandomVector () |
| Computes a random vector. | |
| BehaviorFieldType | getBehaviorFieldType () const |
| Returns the type of the field. | |
Protected Member Functions | |
| PfVec | getFieldVecFromAStarSearch (const PfPose &pose) |
| Computes a motion vector using A* search. | |
| bool | reachedLocalMinimum (double currentGradientLength) |
| Checks if the field has reached a local minimum. | |
| bool | pathPlanningStillNeeded (const PfPose &pose) |
| Checks if the path planner may be turned off. | |
| void | correctMotionVector (PfVec &motionVec) const |
| Corrects computed motion vector considering maximum acceleration values. | |
Protected Attributes | |
| bool | translationDisabled |
| Flag: translation is disabled or not. | |
| bool | rotationDisabled |
| Flag: rotation is disabled or not. | |
| double | maxAccel |
| Maximum acceleration in vector lengths per square second. | |
| double | maxGradientDifference |
| Maximum difference to last gradient in radiant per second. | |
| RandomMotionGenerator * | randomMotionGenerator |
| A pointer to a random motion generator. | |
| PfieldAStarSearch * | pathPlanner |
| A pointer to an A* path planner. | |
| PotentialfieldAStarParameterSet | aStarParameterSet |
| The parameter set for path planning. | |
| bool | alwaysUsePathPlanner |
| Flag, true, if the pathPlanner is always used. | |
| bool | pathPlannerActive |
| Flag, true if the pathPlanner is currently used. | |
| Object * | goal |
| The goal for planning. | |
| double | plannedPathLengthToGoal |
| The length of the path generated by the planner. | |
| double | maxGradientLengthForLocalMinimum |
| The upper limit for the gradient length to detect a local minimum. | |
| PfVec | lastMotionVector |
| The last computed motion vector. | |
Definition at line 28 of file Motionfield.h.
|
|
Constructor.
Definition at line 21 of file Motionfield.cpp. References alwaysUsePathPlanner, lastMotionVector, pathPlanner, pathPlannerActive, randomMotionGenerator, rotationDisabled, translationDisabled, PfVec::x, and PfVec::y. |
|
|
Destructor.
Definition at line 35 of file Motionfield.cpp. References aStarParameterSet, pathPlanner, randomMotionGenerator, and PotentialfieldAStarParameterSet::stabilizationObject. |
|
||||||||||||
|
Computes the result of a field.
Implements Potentialfield. Definition at line 52 of file Motionfield.cpp. References PotentialfieldResult::actionPossible, alwaysUsePathPlanner, correctMotionVector(), CRITERION_CONST, CRITERION_GRADIENT, Potentialfield::getFieldVecAt(), getFieldVecFromAStarSearch(), lastMotionVector, PfVec::length(), PotentialfieldResult::motion, PfVec::normalize(), pathPlanner, pathPlannerActive, pathPlanningStillNeeded(), PfPose::pos, reachedLocalMinimum(), PfVec::rotate(), PfPose::rotation, rotationDisabled, PfPose::speed, PotentialfieldResult::subAction, translationDisabled, PotentialfieldResult::value, PfVec::x, and PfVec::y. |
Here is the call graph for this function:

|
||||||||||||
|
Activates or deactivates the degrees of freedom of the field.
Definition at line 47 of file Motionfield.h. References rotationDisabled, and translationDisabled. Referenced by Parser::parseMotionfield(). |
|
||||||||||||
|
Sets the acceleration limits.
Definition at line 54 of file Motionfield.h. Referenced by Parser::parseMotionfield(). |
|
|
Adds a random device to this field.
Definition at line 60 of file Motionfield.h. Referenced by Parser::parseMotionfield(). |
|
||||||||||||||||||||||||
|
Adds a path planner to this a field.
Definition at line 70 of file Motionfield.h. References alwaysUsePathPlanner, aStarParameterSet, PotentialfieldAStarParameterSet::field, and maxGradientLengthForLocalMinimum. Referenced by Parser::parseMotionfield(). |
|
|
Computes a random vector.
Definition at line 85 of file Motionfield.h. References RandomMotionGenerator::getMotionVector(), and randomMotionGenerator. |
Here is the call graph for this function:

|
|
Returns the type of the field.
Implements Potentialfield. Definition at line 96 of file Motionfield.h. References BehaviorFieldType, and MOTION_FIELD. |
|
|
Computes a motion vector using A* search.
Definition at line 108 of file Motionfield.cpp. References aStarParameterSet, PotentialfieldAStarNode::getPose(), goal, PfPose::hasProbabilityDistribution, lastMotionVector, PfVec::normalize(), PotentialfieldAStarParameterSet::numberOfCalls, pathPlanner, plannedPathLengthToGoal, PfPose::pos, PfPose::probabilityDistribution, PfPose::rotation, AStarSearch< N, P, U >::search(), PotentialfieldAStarNode::setFunctionValues(), Object::setPose(), PotentialfieldAStarNode::setPose(), PotentialfieldAStarNode::setValueAtPos(), PotentialfieldAStarParameterSet::stabilizationDistance, PotentialfieldAStarParameterSet::stabilizationObject, PotentialfieldAStarParameterSet::standardGradientLength, PotentialfieldAStarParameterSet::startPosition, PotentialfieldAStarParameterSet::useStabilization, PfVec::x, and PfVec::y. Referenced by execute(). |
Here is the call graph for this function:

|
|
Checks if the field has reached a local minimum.
Definition at line 142 of file Motionfield.cpp. References maxGradientLengthForLocalMinimum. Referenced by execute(). |
|
|
Checks if the path planner may be turned off.
Definition at line 148 of file Motionfield.cpp. References PfPose::addAbsVector(), aStarParameterSet, DEBUG_DRAWING_FINISHED, PotentialfieldAStarParameterSet::distanceToGoal, Potentialfield::getFieldVecAt(), PotentialfieldAStarParameterSet::minExpansionRadius, PfVec::normalize(), PotentialfieldAStarParameterSet::numberOfCalls, plannedPathLengthToGoal, and PfPose::pos. Referenced by execute(). |
Here is the call graph for this function:

|
|
Corrects computed motion vector considering maximum acceleration values.
Definition at line 176 of file Motionfield.cpp. References getSystemTime(), lastMotionVector, PfVec::length(), maxAccel, PfVec::normalize(), and PotentialfieldResult::timeStamp. Referenced by execute(). |
Here is the call graph for this function:

|
|
Flag: translation is disabled or not.
Definition at line 101 of file Motionfield.h. Referenced by disableDegreesOfFreedom(), execute(), and Motionfield(). |
|
|
Flag: rotation is disabled or not.
Definition at line 103 of file Motionfield.h. Referenced by disableDegreesOfFreedom(), execute(), and Motionfield(). |
|
|
Maximum acceleration in vector lengths per square second.
Definition at line 105 of file Motionfield.h. Referenced by correctMotionVector(). |
|
|
Maximum difference to last gradient in radiant per second.
Definition at line 107 of file Motionfield.h. |
|
|
A pointer to a random motion generator.
Definition at line 109 of file Motionfield.h. Referenced by getRandomVector(), Motionfield(), and ~Motionfield(). |
|
|
A pointer to an A* path planner.
Definition at line 111 of file Motionfield.h. Referenced by execute(), getFieldVecFromAStarSearch(), Motionfield(), and ~Motionfield(). |
|
|
The parameter set for path planning.
Definition at line 113 of file Motionfield.h. Referenced by addPathPlanner(), getFieldVecFromAStarSearch(), pathPlanningStillNeeded(), and ~Motionfield(). |
|
|
Flag, true, if the pathPlanner is always used.
Definition at line 115 of file Motionfield.h. Referenced by addPathPlanner(), execute(), and Motionfield(). |
|
|
Flag, true if the pathPlanner is currently used.
Definition at line 117 of file Motionfield.h. Referenced by execute(), and Motionfield(). |
|
|
The goal for planning.
Definition at line 119 of file Motionfield.h. Referenced by getFieldVecFromAStarSearch(). |
|
|
The length of the path generated by the planner.
Definition at line 121 of file Motionfield.h. Referenced by getFieldVecFromAStarSearch(), and pathPlanningStillNeeded(). |
|
|
The upper limit for the gradient length to detect a local minimum.
Definition at line 123 of file Motionfield.h. Referenced by addPathPlanner(), and reachedLocalMinimum(). |
|
|
The last computed motion vector.
Definition at line 125 of file Motionfield.h. Referenced by correctMotionVector(), execute(), getFieldVecFromAStarSearch(), and Motionfield(). |
1.3.6