#include <ObstaclesModel.h>
Public Types | |
enum | Directions { back, backRight, right, frontRight, front, frontLeft, left, backLeft, numberOfDirections } |
enum | SearchDirections { searchLeft, searchLeftAndRight, searchRight } |
enum | { numOfSectors = 90, maxDistance = 1500 } |
enum | { ownGoal = 0, opponentGoal = 1 } |
Public Member Functions | |
ObstaclesModel () | |
~ObstaclesModel () | |
void | operator= (const ObstaclesModel &other) |
copies another ObstaclesModel to this one | |
void | setFrameNumber (unsigned long frameNumber) |
double | getDistanceInCorridor (double angle, double width) const |
returns the distance to the closest obstacle in the corridor specified by angle and width | |
double | getAngleOfNextFreeSector (double sizeOfSector, double angle, int minDistance) const |
returns the angle of the closest free sector with angle sizeOfSector relative to angle. | |
double | getAngleOfNextFreeSectorLeft (double sizeOfSector, double angle, int minDistance) const |
returns the angle of the closest free with angle sizeOfSector relative to angle. | |
double | getAngleOfNextFreeSectorRight (double sizeOfSector, double angle, int minDistance) const |
int | getDistanceInMajorDirection (Directions direction) const |
returns the distance to the closest obstacle in one of the major directions defined above | |
int | getDistanceInDirection (double direction, double openingAngle) const |
return the distance to the closest obstacle in a given direction and a given opening angle | |
double | getTotalFreeSpaceInSector (double direction, double openingAngle, double maxDist) const |
sums up all distances in a sector specified by direction and opening angle; the maxDist(ance) specifies what the maximum distance should be when adding up (you don't want really big single values to distort the sum) | |
int | getMinimalDistanceInRange (double centerAngle, double openingAngle, double &angleWithMinimalDistance) const |
Calculates the angle with the closest distance to an obstacle. | |
int | getMinimalDistanceInRange (double centerAngle, double openingAngle, double &angleWithMinimalDistance, ObstaclesPercept::ObstacleType obstacleType) const |
Calculates the angle with the closest distance to an obstacle of a certain obstacle type. | |
double | getPercentageOfLowDistanceObstaclesInRange (double centerAngle, double openingAngle, int maxDistance) const |
Calculates the percentage of sectors with obstacles that are closer than the specified distance in the specified range. | |
double | getAngleOfLargeGapInRange (double centerAngle, double openingAngle, SearchDirections searchDirection) const |
Calculates the angle with the farsest distance to an obstacle. | |
double | getAngleOfLargeGapInRange2 (double centerAngle, double openingAngle, SearchDirections searchDirection) const |
Calculates the angle with the farsest distance to an obstacle. | |
Static Public Member Functions | |
double | getAngleOfSector (int sector) |
return the center angle of a given sector | |
int | getSectorFromAngle (double angle) |
return the corresponding sector to a given angle | |
Public Attributes | |
unsigned long | frameNumber |
the frame number when perceived | |
int | distance [numOfSectors] |
the distance to the closest obstacle in an angular sector | |
ObstaclesPercept::ObstacleType | obstacleType [numOfSectors] |
int | corridorInFront |
the distance to the closest obstacle in a rectangular corridor in front of the robot | |
bool | angleToFreePartOfGoalWasDetermined [2] |
double | angleToFreePartOfGoal [2] |
double | widthOfFreePartOfGoal [2] |
double | distanceToFreePartOfGoal [2] |
bool | angleToNextFreeTeammateWasDetermined |
double | angleToNextFreeTeammate |
double | distanceToNextFreeTeammate |
double | bodyPSD |
last value of the body psd sensor (if present) |
Definition at line 21 of file ObstaclesModel.h.
|
Definition at line 30 of file ObstaclesModel.h. |
|
Definition at line 31 of file ObstaclesModel.h. |
|
Definition at line 32 of file ObstaclesModel.h. |
|
Definition at line 131 of file ObstaclesModel.h. |
|
Definition at line 13 of file ObstaclesModel.cpp. References angleToFreePartOfGoalWasDetermined, angleToNextFreeTeammateWasDetermined, bodyPSD, corridorInFront, distance, maxDistance, and numOfSectors. |
|
Definition at line 26 of file ObstaclesModel.cpp. |
|
copies another ObstaclesModel to this one
Definition at line 494 of file ObstaclesModel.cpp. References corridorInFront, distance, numOfSectors, and obstacleType. |
|
return the center angle of a given sector
Definition at line 37 of file ObstaclesModel.h. References numOfSectors, pi, and pi2. Referenced by getAngleOfLargeGapInRange(), getAngleOfLargeGapInRange2(), getAngleOfNextFreeSector(), getAngleOfNextFreeSectorLeft(), getAngleOfNextFreeSectorRight(), and getDistanceInCorridor(). |
|
Definition at line 53 of file ObstaclesModel.h. Referenced by GT2004ObstaclesLocator::execute(). |
|
returns the distance to the closest obstacle in the corridor specified by angle and width
Definition at line 87 of file ObstaclesModel.cpp. References Geometry::Line::base, Geometry::Line::direction, distance, getAngleOfSector(), getSectorFromAngle(), LINE, maxDistance, numOfSectors, pi_2, point, Vector2< int >::x, Vector2< double >::x, Vector2< int >::y, and Vector2< double >::y. Referenced by GT2004BasicBehaviorGoToPointAndAvoidObstacles::execute(), and GT2004ConfigurationSymbols::update(). |
Here is the call graph for this function:
|
returns the angle of the closest free sector with angle sizeOfSector relative to angle. Free means free up to minDistance Definition at line 237 of file ObstaclesModel.cpp. References distance, getAngleOfSector(), getSectorFromAngle(), numOfSectors, and pi2. Referenced by GT2004BasicBehaviorGoToPointAndAvoidObstacles::execute(). |
Here is the call graph for this function:
|
returns the angle of the closest free with angle sizeOfSector relative to angle. Free means free up to minDistance Definition at line 143 of file ObstaclesModel.cpp. References distance, getAngleOfSector(), getSectorFromAngle(), numOfSectors, and pi2. Referenced by AngleSymbols::calculateCombinedAngles(). |
Here is the call graph for this function:
|
Definition at line 191 of file ObstaclesModel.cpp. References distance, getAngleOfSector(), getSectorFromAngle(), numOfSectors, and pi2. Referenced by AngleSymbols::calculateCombinedAngles(). |
Here is the call graph for this function:
|
returns the distance to the closest obstacle in one of the major directions defined above
Definition at line 30 of file ObstaclesModel.cpp. References distance, maxDistance, numberOfDirections, and numOfSectors. |
|
return the distance to the closest obstacle in a given direction and a given opening angle
Definition at line 51 of file ObstaclesModel.cpp. References distance, getSectorFromAngle(), maxDistance, and numOfSectors. Referenced by GTStandardConverter::setData(), and GT2004ConfigurationSymbols::update(). |
Here is the call graph for this function:
|
sums up all distances in a sector specified by direction and opening angle; the maxDist(ance) specifies what the maximum distance should be when adding up (you don't want really big single values to distort the sum)
Definition at line 68 of file ObstaclesModel.cpp. References distance, getSectorFromAngle(), and numOfSectors. Referenced by GT2004BasicBehaviorGoToPointAndAvoidObstacles::execute(). |
Here is the call graph for this function:
|
Calculates the angle with the closest distance to an obstacle. Returns the distance. Definition at line 296 of file ObstaclesModel.cpp. Referenced by ObstaclesSymbols::update(). |
|
Calculates the angle with the closest distance to an obstacle of a certain obstacle type. Returns the distance. Definition at line 326 of file ObstaclesModel.cpp. |
|
Calculates the percentage of sectors with obstacles that are closer than the specified distance in the specified range.
Definition at line 357 of file ObstaclesModel.cpp. Referenced by ObstaclesSymbols::update(). |
|
Calculates the angle with the farsest distance to an obstacle. Returns the angle. Definition at line 379 of file ObstaclesModel.cpp. References RingBufferWithSum< n >::add(), distance, getAngleOfSector(), getSectorFromAngle(), RingBufferWithSum< n >::getSum(), min, searchLeft, and searchRight. |
Here is the call graph for this function:
|
Calculates the angle with the farsest distance to an obstacle. Returns the angle. Definition at line 436 of file ObstaclesModel.cpp. References RingBufferWithSum< n >::add(), distance, getAngleOfSector(), RingBufferWithSum< n >::getMinimum(), getSectorFromAngle(), RingBufferWithSum< n >::getSum(), min, searchLeft, and searchRight. |
Here is the call graph for this function:
|
return the corresponding sector to a given angle
Definition at line 126 of file ObstaclesModel.h. References normalize(), numOfSectors, pi, and pi2. Referenced by GT2004ObstaclesLocator::addObstaclePoint(), GT2004ObstaclesLocator::addObstaclePoints(), GT2004ObstaclesLocator::addPSDPercept(), GT2004ObstaclesLocator::determineNextFreeTeammate(), getAngleOfLargeGapInRange(), getAngleOfLargeGapInRange2(), getAngleOfNextFreeSector(), getAngleOfNextFreeSectorLeft(), getAngleOfNextFreeSectorRight(), getDistanceInCorridor(), getDistanceInDirection(), getTotalFreeSpaceInSector(), GT2004ObstaclesLocator::moveObstaclesByOdometry(), and GT2004ObstaclesLocator::setObstaclesModel(). |
Here is the call graph for this function:
|
the frame number when perceived
Definition at line 51 of file ObstaclesModel.h. Referenced by operator<<(), and operator>>(). |
|
the distance to the closest obstacle in an angular sector
Definition at line 56 of file ObstaclesModel.h. Referenced by getAngleOfLargeGapInRange(), getAngleOfLargeGapInRange2(), getAngleOfNextFreeSector(), getAngleOfNextFreeSectorLeft(), getAngleOfNextFreeSectorRight(), getDistanceInCorridor(), getDistanceInDirection(), getDistanceInMajorDirection(), getTotalFreeSpaceInSector(), ObstaclesModel(), operator=(), and GT2004ObstaclesLocator::setObstaclesModel(). |
|
Definition at line 59 of file ObstaclesModel.h. Referenced by operator=(), and GT2004ObstaclesLocator::setObstaclesModel(). |
|
the distance to the closest obstacle in a rectangular corridor in front of the robot
Definition at line 62 of file ObstaclesModel.h. Referenced by ObstaclesModel(), operator=(), and GT2004ObstaclesLocator::setObstaclesModel(). |
|
Definition at line 132 of file ObstaclesModel.h. Referenced by AngleSymbols::calculateCombinedAngles(), GT2004ObstaclesLocator::determineFreePartsOfGoals(), and ObstaclesModel(). |
|
Definition at line 133 of file ObstaclesModel.h. Referenced by AngleSymbols::calculateCombinedAngles(), AngleSymbols::calculateVisionBasedAngles(), and GT2004ObstaclesLocator::determineFreePartsOfGoals(). |
|
Definition at line 134 of file ObstaclesModel.h. Referenced by GT2004ObstaclesLocator::determineFreePartsOfGoals(). |
|
Definition at line 135 of file ObstaclesModel.h. Referenced by GT2004ObstaclesLocator::determineFreePartsOfGoals(). |
|
Definition at line 137 of file ObstaclesModel.h. Referenced by GT2004ObstaclesLocator::determineNextFreeTeammate(), and ObstaclesModel(). |
|
Definition at line 138 of file ObstaclesModel.h. Referenced by GT2004ObstaclesLocator::determineNextFreeTeammate(). |
|
Definition at line 139 of file ObstaclesModel.h. Referenced by GT2004ObstaclesLocator::determineNextFreeTeammate(). |
|
last value of the body psd sensor (if present)
Definition at line 144 of file ObstaclesModel.h. Referenced by ObstaclesModel(), and GT2004ObstaclesLocator::setObstaclesModel(). |