#include <FieldObject.h>
Inheritance diagram for Object:
Public Member Functions | |
Object () | |
Constructor. | |
Object (const std::string &name, ObjectType objectType) | |
Constructor. | |
virtual | ~Object () |
Destructor. | |
virtual double | computeChargeAt (const PfPose &otherPose) |
Computes the impact of an object at a given pose. | |
virtual PfVec | computeAbsFieldVecAt (const PfPose &otherPose) |
Computes the gradient of an object at a given pose. | |
Object * | createInstance (const std::string &instanceName) |
Creates a copy of this object and changes the name of the copied object. | |
void | operator= (const Object &other) |
Copy operator. | |
virtual Object * | getCopy () |
Polymorph copy function. | |
void | getMinimalCopyFrom (Object *other) |
Get new data from other object. | |
std::string | getName () const |
Returns the name of the object. | |
PfPose | getPose () const |
Returns the pose of the object. | |
virtual PfPose | getPose (const PfPose &robotPose) |
Returns the pose of the object in reference to the robot pose (used for getting a pose from formation objects). | |
void | setPose (const PfPose &pose) |
Sets the pose of the object and updates the absolute geometry. | |
void | setActivation (const bool &active) |
Sets the state of the object. | |
virtual bool | isActive () const |
Returns whether the object is active or not. | |
ObjectType | getType () const |
Returns the type of the object. | |
void | setStatic (const bool &isStatic, unsigned int dynamicPoseId=0) |
Sets the static/dynamic state of the object. | |
virtual bool | isStatic () const |
Return whether the object is static or not. | |
void | setFunction (PotentialfieldFunction *function) |
Sets the function of the object. | |
void | setField (FieldType type) |
Sets the field type of the object. | |
void | setField (FieldType type, const Sector §or) |
Sets the field type of the object. | |
void | setTangentialField (TangentialField tangentialField) |
Sets the type of the tangential field. | |
void | setGeometry (PfieldGeometricObject *geometry) |
Sets the geometry of the object. | |
virtual PfieldGeometricObject * | getGeometry () const |
Returns a pointer to the geometry of the object. | |
virtual PfieldGeometricObject * | getAbsGeometry () const |
Returns a pointer to the absolute geometry of the object. | |
void | setPfieldCompositionRef (PotentialfieldComposition *ref) |
Sets the reference to the PotentialfieldComposition. | |
virtual void | updateData () |
Gets new data (pose/activation), if dynamic. | |
void | computeAbsGeometry () |
Computes the absolute geometry. | |
Protected Member Functions | |
double | computeChargeForSinglePose (const PfPose &objectPose, const PfPose &position) const |
Computes the charge at a pose. | |
PfVec | computeGradientVecForSinglePose (const PfPose &objectPose, const PfPose &position) const |
Computes the gradient at a pose. | |
Protected Attributes | |
PfPose | pose |
The pose of the object. | |
std::string | name |
The name of the object. | |
bool | active |
Flag, determines if object is active. | |
bool | isStaticVar |
Flag, determines if object is static/dynamic. | |
TangentialField | tangentialField |
Flag, determines, if the field has a tangential direction. | |
FieldType | fieldType |
The type of the potential field. | |
PotentialfieldFunction * | function |
The function of this object. | |
ObjectType | objectType |
The type of the object (attractive/repulsive). | |
PfieldGeometricObject * | geometry |
The description of the object's geometry. | |
PfieldGeometricObject * | absGeometry |
The description of the object's geometry in absolute coordinates. | |
Sector | sector |
The sector of the potential field (if fieldType==SECTOR_FIELD). | |
PotentialfieldComposition * | refToPfieldComposition |
A pointer to the PotentialfieldComposition. | |
unsigned int | dynamicPoseId |
The id of the dynamic pose (if used). |
Definition at line 29 of file FieldObject.h.
|
Constructor.
Definition at line 14 of file FieldObject.cpp. References absGeometry, function, geometry, NO_TANGENTIALFIELD, refToPfieldComposition, and tangentialField. Referenced by createInstance(), and getCopy(). |
|
Constructor.
Definition at line 24 of file FieldObject.cpp. References absGeometry, function, geometry, NO_TANGENTIALFIELD, refToPfieldComposition, and tangentialField. |
|
Destructor.
Definition at line 37 of file FieldObject.cpp. References absGeometry, function, and geometry. |
|
Computes the impact of an object at a given pose.
Reimplemented in FormationObject. Definition at line 145 of file FieldObject.cpp. References computeChargeForSinglePose(), PfPose::hasProbabilityDistribution, PfPose::probability, and PfPose::probabilityDistribution. Referenced by SingleFormation::getCharge(), and PotentialfieldAStarNode::setValueAtPos(). |
Here is the call graph for this function:
|
Computes the gradient of an object at a given pose.
Reimplemented in FormationObject. Definition at line 194 of file FieldObject.cpp. References CLOCKWISE, computeGradientVecForSinglePose(), COUNTER_CLOCKWISE, PfPose::hasProbabilityDistribution, objectType, pi_2, PfPose::probability, PfPose::probabilityDistribution, REPULSIVE, PfVec::rotate(), and tangentialField. Referenced by SingleFormation::getVec(). |
Here is the call graph for this function:
|
Creates a copy of this object and changes the name of the copied object.
Definition at line 54 of file FieldObject.cpp. |
Here is the call graph for this function:
|
Copy operator.
Definition at line 63 of file FieldObject.cpp. References absGeometry, active, dynamicPoseId, fieldType, function, geometry, isStaticVar, name, objectType, pose, refToPfieldComposition, sector, SECTOR_FIELD, setActivation(), setField(), setFunction(), setGeometry(), setPfieldCompositionRef(), setPose(), setStatic(), setTangentialField(), and tangentialField. |
Here is the call graph for this function:
|
Polymorph copy function.
Reimplemented in FormationObject. Definition at line 98 of file FieldObject.cpp. References Object(). |
Here is the call graph for this function:
|
Get new data from other object. It is assumed that a full copy had been done before. Only changing data (e.g. the pose) is copied.
Definition at line 106 of file FieldObject.cpp. References getPose(), isActive(), setActivation(), and setPose(). |
Here is the call graph for this function:
|
Returns the name of the object.
Definition at line 81 of file FieldObject.h. Referenced by PotentialfieldComposition::addObject(), and Parser::parseAndInsertObject(). |
|
Returns the pose of the object.
Definition at line 87 of file FieldObject.h. Referenced by FutureWorldModelGenerator::executeSingleTransformation(), and getMinimalCopyFrom(). |
|
Returns the pose of the object in reference to the robot pose (used for getting a pose from formation objects).
Reimplemented in FormationObject. Definition at line 95 of file FieldObject.h. |
|
Sets the pose of the object and updates the absolute geometry.
Definition at line 135 of file FieldObject.cpp. References absGeometry, geometry, and PfieldGeometricObject::setAbsoluteFromOther(). Referenced by Motionfield::getFieldVecFromAStarSearch(), getMinimalCopyFrom(), operator=(), Parser::parseInstance(), and updateData(). |
Here is the call graph for this function:
|
Sets the state of the object.
Definition at line 106 of file FieldObject.h. Referenced by getMinimalCopyFrom(), operator=(), and Parser::parseInstance(). |
|
Returns whether the object is active or not.
Reimplemented in FormationObject. Definition at line 112 of file FieldObject.h. Referenced by getMinimalCopyFrom(). |
|
Returns the type of the object.
Definition at line 118 of file FieldObject.h. References ObjectType. |
|
Sets the static/dynamic state of the object.
Definition at line 125 of file FieldObject.h. References isStaticVar. Referenced by operator=(), and Parser::parseInstance(). |
|
Return whether the object is static or not.
Reimplemented in FormationObject. Definition at line 134 of file FieldObject.h. References isStaticVar. Referenced by Actionfield::addObject(). |
|
Sets the function of the object.
Definition at line 301 of file FieldObject.cpp. References PotentialfieldFunction::clone(). Referenced by operator=(), Parser::parseObject(), and SingleFormation::setFunction(). |
Here is the call graph for this function:
|
Sets the field type of the object.
Definition at line 315 of file FieldObject.cpp. References fieldType. Referenced by operator=(), Parser::parseObject(), and SingleFormation::SingleFormation(). |
|
Sets the field type of the object.
Definition at line 321 of file FieldObject.cpp. References PotentialfieldFunction::clone(), Sector::crossFunction, and fieldType. |
Here is the call graph for this function:
|
Sets the type of the tangential field.
Definition at line 156 of file FieldObject.h. Referenced by operator=(), and Parser::parseObject(). |
|
Sets the geometry of the object.
Definition at line 120 of file FieldObject.cpp. References absGeometry, PfieldGeometricObject::clone(), and PfieldGeometricObject::getAbs(). Referenced by AmongFormation::AmongFormation(), BetweenFormation::BetweenFormation(), operator=(), Parser::parseObject(), and RelativeFormation::RelativeFormation(). |
Here is the call graph for this function:
|
Returns a pointer to the geometry of the object.
Reimplemented in FormationObject. Definition at line 167 of file FieldObject.h. References geometry. Referenced by SingleFormation::getDistanceToFormation(), SingleFormation::getPosition(), AmongFormation::positionInsideFormation(), BetweenFormation::positionInsideFormation(), RelativeFormation::updateGeometry(), AmongFormation::updateGeometry(), and BetweenFormation::updateGeometry(). |
|
Returns a pointer to the absolute geometry of the object.
Reimplemented in FormationObject. Definition at line 173 of file FieldObject.h. References absGeometry. |
|
Sets the reference to the PotentialfieldComposition.
Definition at line 179 of file FieldObject.h. References refToPfieldComposition. Referenced by operator=(), and Parser::parseObject(). |
|
Gets new data (pose/activation), if dynamic.
Reimplemented in FormationObject. Definition at line 329 of file FieldObject.cpp. References dynamicPoseId, PotentialfieldComposition::getDescriptionFromId(), ObjectStateDescription::isActive, ObjectStateDescription::pose, refToPfieldComposition, and setPose(). |
Here is the call graph for this function:
|
Computes the absolute geometry.
Definition at line 338 of file FieldObject.cpp. References absGeometry, geometry, and PfieldGeometricObject::setAbsoluteFromOther(). |
Here is the call graph for this function:
|
Computes the charge at a pose.
Definition at line 265 of file FieldObject.cpp. References computeChargeForPointfield(), computeChargeForSectorfield(), computeChargeForShapefield(), fieldType, function, geometry, POINT_FIELD, sector, SECTOR_FIELD, and SHAPE_FIELD. Referenced by computeChargeAt(). |
Here is the call graph for this function:
|
Computes the gradient at a pose.
Definition at line 282 of file FieldObject.cpp. References computeGradientForPointfield(), computeGradientForSectorfield(), computeGradientForShapefield(), fieldType, function, geometry, objectType, POINT_FIELD, sector, SECTOR_FIELD, and SHAPE_FIELD. Referenced by computeAbsFieldVecAt(). |
Here is the call graph for this function:
|
The pose of the object.
Definition at line 190 of file FieldObject.h. Referenced by operator=(). |
|
The name of the object.
Definition at line 192 of file FieldObject.h. Referenced by createInstance(), and operator=(). |
|
Flag, determines if object is active.
Definition at line 194 of file FieldObject.h. Referenced by operator=(). |
|
Flag, determines if object is static/dynamic.
Definition at line 196 of file FieldObject.h. Referenced by isStatic(), operator=(), and setStatic(). |
|
Flag, determines, if the field has a tangential direction.
Definition at line 198 of file FieldObject.h. Referenced by computeAbsFieldVecAt(), Object(), and operator=(). |
|
The type of the potential field.
Definition at line 200 of file FieldObject.h. Referenced by computeChargeForSinglePose(), computeGradientVecForSinglePose(), operator=(), and setField(). |
|
The function of this object.
Definition at line 202 of file FieldObject.h. Referenced by computeChargeForSinglePose(), computeGradientVecForSinglePose(), Object(), operator=(), and ~Object(). |
|
The type of the object (attractive/repulsive).
Definition at line 204 of file FieldObject.h. Referenced by computeAbsFieldVecAt(), computeGradientVecForSinglePose(), and operator=(). |
|
The description of the object's geometry.
Definition at line 206 of file FieldObject.h. Referenced by computeAbsGeometry(), computeChargeForSinglePose(), computeGradientVecForSinglePose(), getGeometry(), Object(), operator=(), setPose(), and ~Object(). |
|
The description of the object's geometry in absolute coordinates.
Definition at line 208 of file FieldObject.h. Referenced by computeAbsGeometry(), getAbsGeometry(), Object(), operator=(), setGeometry(), setPose(), and ~Object(). |
|
The sector of the potential field (if fieldType==SECTOR_FIELD).
Definition at line 210 of file FieldObject.h. Referenced by computeChargeForSinglePose(), computeGradientVecForSinglePose(), and operator=(). |
|
A pointer to the PotentialfieldComposition.
Definition at line 212 of file FieldObject.h. Referenced by Object(), operator=(), setPfieldCompositionRef(), and updateData(). |
|
The id of the dynamic pose (if used).
Definition at line 214 of file FieldObject.h. Referenced by operator=(), and updateData(). |