#include <PerceptionGrid.h>
Public Member Functions | |
void | print () |
Prints the state. | |
PerceptionCell () | |
Default constructor. | |
PerceptionCell (Decimal) | |
Decimal constructor. | |
~PerceptionCell () | |
Destructor. | |
PerceptionCell (const PerceptionCell &c) | |
Copy constructor. | |
PerceptionCell (Decimal size, Position center, int vectorIndex, DubInt indexes, int cone, int frame, Position reading=Position(0.0, 0.0)) | |
Main Constructor. | |
PerceptionCell & | operator= (const PerceptionCell &c) |
= operator. | |
void | setState (bool unknown, int thirdType, bool local, bool exploredOnce) |
Method to set the state. | |
void | setLocal () |
Sets the state of the cell to local. | |
void | setNotLocal () |
Sets the state of the cell to not local. | |
void | setPoint (Position value) |
Sets PerceptionCell position in meters w.r.t. the center PerceptionCell. | |
void | setCenter (Position value) |
Sets PerceptionCell position in meters w.r.t. the center PerceptionCell. | |
void | setReading (Position value) |
Sets _reading paramenter. | |
void | setIsFrontier () |
Sets the cell state as Frontier. | |
void | setIsObstacle () |
Sets the cell state as Obstacle. | |
void | setIsInternalFree () |
Sets the cell state as Internal Free. | |
void | setIsInternalNonFree () |
Sets the cell state as Internal NonFree. | |
void | setIsUnknown () |
Sets the cell state as Unknown. | |
void | setIsLSRContour () |
Sets the cell state as LSRContour. | |
void | setIsNotLSRContour () |
Sets the cell state as Not LSRContour. | |
bool | wasLocal () |
Tells wether or not the cell was Local. | |
bool | isLRR () |
Tells wether or not the cell is LRR. | |
bool | isFrontier () |
Tells wether or not the cell is Frontier. | |
bool | isLSR () |
Tells wether or not the cell is LSR. | |
bool | isPrevExpl () |
Tells wether or not the cell is Previously Explored. | |
bool | isObstacle () |
Tells wether or not the cell is Obstacle. | |
bool | isInternalFree () |
Tells wether or not the cell is InternalFree. | |
bool | isInternalNonFree () |
Tells wether or not the cell is InternalNonFree. | |
bool | isUnknown () |
Tells wether or not the cell is Unknown. | |
bool | isBoundary () |
Tells wether or not the cell is Boundary. | |
bool | isLRRBoundary () |
Tells wether or not the cell is LRRBoundary. | |
bool | isLSRContour () |
Tells wether or not the cell is LSRContour. | |
void | setVectorIndex (int k) |
void | setIndexes (DubInt k) |
void | unsetIsUnknown () |
void | setIsLSR () |
void | setIsLRR () |
void | setIsBoundary () |
void | setIsLRRBoundary () |
void | unsetIsLRRBoundary () |
void | setIsPerceptionFrontier () |
void | unsetAllFlags () |
bool | isPerceptionFrontier () |
void | setNeighbours (vector< PerceptionCell * > value) |
Sets _neighbours vector with the specified one. | |
void | neighPushBack (PerceptionCell *value) |
Makes public the "push_back()" member of _neighbours. | |
void | setCone (unsigned int value) |
Sets appartenence cone. | |
void | setFrame (unsigned int value) |
Sets appartenence frame. | |
void | setDistLSRBound (int value) |
Sets distance from closest LSR boundary PerceptionCell. | |
Position | point () |
Returns PerceptionCell position in meters w.r.t. the center PerceptionCell. | |
Position | center () |
Returns PerceptionCell position in meters w.r.t. the center PerceptionCell. | |
Position | reading () |
Returns _reading paramenter. | |
DubInt | indexes () |
Returns PerceptionCell indexes in matricial rapresentation. | |
int | vectorIndex () |
Returns PerceptionCell indeces in vector rapresentation. | |
Decimal | side () |
Returns PerceptionCell side in meters. | |
vector< PerceptionCell * > | neighbours () |
Returns _neighbours vector. | |
unsigned int | cone () |
Returns appartenence cone. | |
unsigned int | frame () |
Returns appartenence frame. | |
Decimal | distVP () |
Returns distance of current PerceptionCell from ViewPoint (grid center) in meters. | |
int | distLSRBound () |
Returns distance of current PerceptionCell from closest LSR boundary PerceptionCell. | |
void | merge (PerceptionCell &otherPerceptionCell) |
Merges the PerceptionCell with another PerceptionCell. | |
string | printFlags () |
Prints flags status of the PerceptionCell. | |
Public Attributes | |
vector< int > | perceptionCounter |
Vector containg the times a PerceptionCell has been perceived as obstacle, LRR, etc...(under test). |
Class for the implementation of a cell in a grid representation for robot's sorrounding.
MipBaselib::PerceptionCell::PerceptionCell | ( | ) |
Default constructor.
MipBaselib::PerceptionCell::PerceptionCell | ( | Decimal | side | ) |
MipBaselib::PerceptionCell::~PerceptionCell | ( | ) |
Destructor.
MipBaselib::PerceptionCell::PerceptionCell | ( | const PerceptionCell & | c | ) |
MipBaselib::PerceptionCell::PerceptionCell | ( | Decimal | size, | |
Position | center, | |||
int | vectorIndex, | |||
DubInt | indexes, | |||
int | cone, | |||
int | frame, | |||
Position | reading = Position(0.0,0.0) | |||
) |
Main Constructor.
[in] | size | the size of a cell's side. |
[in] | center | The Position of the center of the cell, |
[in] | vectorIndex | The index of the cell in the vector representation of the set of cells. |
[in] | indexes | The indexes of the cell in the matricial representation of the set of cells |
[in] | frame | The frame of the cell. |
void MipBaselib::PerceptionCell::print | ( | ) | [inline] |
Prints the state.
PerceptionCell & MipBaselib::PerceptionCell::operator= | ( | const PerceptionCell & | c | ) |
void MipBaselib::PerceptionCell::setState | ( | bool | unknown, | |
int | thirdType, | |||
bool | local, | |||
bool | exploredOnce | |||
) | [inline] |
Method to set the state.
[in] | perceptionCellBoundaryType | The "third" type of a PerceptionCell. |
[in] | local | Tells if PerceptionCell is local or global. |
[in] | exploredOnce | Tells if perceptionCell is explored once only or several times. |
void MipBaselib::PerceptionCell::setLocal | ( | ) | [inline] |
Sets the state of the cell to local.
void MipBaselib::PerceptionCell::setNotLocal | ( | ) | [inline] |
Sets the state of the cell to not local.
void MipBaselib::PerceptionCell::setPoint | ( | Position | value | ) | [inline] |
Sets PerceptionCell position in meters w.r.t. the center PerceptionCell.
void MipBaselib::PerceptionCell::setCenter | ( | Position | value | ) | [inline] |
Sets PerceptionCell position in meters w.r.t. the center PerceptionCell.
void MipBaselib::PerceptionCell::setReading | ( | Position | value | ) | [inline] |
Sets _reading paramenter.
void MipBaselib::PerceptionCell::setIsFrontier | ( | ) | [inline] |
Sets the cell state as Frontier.
void MipBaselib::PerceptionCell::setIsObstacle | ( | ) | [inline] |
Sets the cell state as Obstacle.
void MipBaselib::PerceptionCell::setIsInternalFree | ( | ) | [inline] |
Sets the cell state as Internal Free.
void MipBaselib::PerceptionCell::setIsInternalNonFree | ( | ) | [inline] |
Sets the cell state as Internal NonFree.
void MipBaselib::PerceptionCell::setIsUnknown | ( | ) | [inline] |
Sets the cell state as Unknown.
void MipBaselib::PerceptionCell::setIsLSRContour | ( | ) | [inline] |
Sets the cell state as LSRContour.
void MipBaselib::PerceptionCell::setIsNotLSRContour | ( | ) | [inline] |
Sets the cell state as Not LSRContour.
bool MipBaselib::PerceptionCell::wasLocal | ( | ) | [inline] |
Tells wether or not the cell was Local.
bool MipBaselib::PerceptionCell::isLRR | ( | ) | [inline] |
bool MipBaselib::PerceptionCell::isFrontier | ( | ) | [inline] |
bool MipBaselib::PerceptionCell::isLSR | ( | ) | [inline] |
Tells wether or not the cell is LSR.
bool MipBaselib::PerceptionCell::isPrevExpl | ( | ) | [inline] |
Tells wether or not the cell is Previously Explored.
bool MipBaselib::PerceptionCell::isObstacle | ( | ) | [inline] |
Tells wether or not the cell is Obstacle.
bool MipBaselib::PerceptionCell::isInternalFree | ( | ) | [inline] |
Tells wether or not the cell is InternalFree.
bool MipBaselib::PerceptionCell::isInternalNonFree | ( | ) | [inline] |
Tells wether or not the cell is InternalNonFree.
bool MipBaselib::PerceptionCell::isUnknown | ( | ) | [inline] |
Tells wether or not the cell is Unknown.
bool MipBaselib::PerceptionCell::isBoundary | ( | ) | [inline] |
Tells wether or not the cell is Boundary.
bool MipBaselib::PerceptionCell::isLRRBoundary | ( | ) | [inline] |
Tells wether or not the cell is LRRBoundary.
bool MipBaselib::PerceptionCell::isLSRContour | ( | ) | [inline] |
Tells wether or not the cell is LSRContour.
void MipBaselib::PerceptionCell::setVectorIndex | ( | int | k | ) | [inline] |
void MipBaselib::PerceptionCell::setIndexes | ( | DubInt | k | ) | [inline] |
void MipBaselib::PerceptionCell::unsetIsUnknown | ( | ) | [inline] |
void MipBaselib::PerceptionCell::setIsLSR | ( | ) | [inline] |
void MipBaselib::PerceptionCell::setIsLRR | ( | ) | [inline] |
void MipBaselib::PerceptionCell::setIsBoundary | ( | ) | [inline] |
void MipBaselib::PerceptionCell::setIsLRRBoundary | ( | ) | [inline] |
void MipBaselib::PerceptionCell::unsetIsLRRBoundary | ( | ) | [inline] |
void MipBaselib::PerceptionCell::setIsPerceptionFrontier | ( | ) | [inline] |
void MipBaselib::PerceptionCell::unsetAllFlags | ( | ) | [inline] |
bool MipBaselib::PerceptionCell::isPerceptionFrontier | ( | ) | [inline] |
Tells wether a cell is perceptionfrontier or not.
void MipBaselib::PerceptionCell::setNeighbours | ( | vector< PerceptionCell * > | value | ) | [inline] |
Sets _neighbours vector with the specified one.
void MipBaselib::PerceptionCell::neighPushBack | ( | PerceptionCell * | value | ) | [inline] |
Makes public the "push_back()" member of _neighbours.
void MipBaselib::PerceptionCell::setCone | ( | unsigned int | value | ) | [inline] |
Sets appartenence cone.
void MipBaselib::PerceptionCell::setFrame | ( | unsigned int | value | ) | [inline] |
Sets appartenence frame.
void MipBaselib::PerceptionCell::setDistLSRBound | ( | int | value | ) | [inline] |
Sets distance from closest LSR boundary PerceptionCell.
Position MipBaselib::PerceptionCell::point | ( | ) | [inline] |
Returns PerceptionCell position in meters w.r.t. the center PerceptionCell.
Position MipBaselib::PerceptionCell::center | ( | ) | [inline] |
Returns PerceptionCell position in meters w.r.t. the center PerceptionCell.
Position MipBaselib::PerceptionCell::reading | ( | ) | [inline] |
Returns _reading paramenter.
DubInt MipBaselib::PerceptionCell::indexes | ( | ) | [inline] |
Returns PerceptionCell indexes in matricial rapresentation.
int MipBaselib::PerceptionCell::vectorIndex | ( | ) | [inline] |
Returns PerceptionCell indeces in vector rapresentation.
Decimal MipBaselib::PerceptionCell::side | ( | ) | [inline] |
Returns PerceptionCell side in meters.
vector< PerceptionCell * > MipBaselib::PerceptionCell::neighbours | ( | ) | [inline] |
Returns _neighbours vector.
unsigned int MipBaselib::PerceptionCell::cone | ( | ) | [inline] |
Returns appartenence cone.
unsigned int MipBaselib::PerceptionCell::frame | ( | ) | [inline] |
Returns appartenence frame.
Decimal MipBaselib::PerceptionCell::distVP | ( | ) | [inline] |
Returns distance of current PerceptionCell from ViewPoint (grid center) in meters.
int MipBaselib::PerceptionCell::distLSRBound | ( | ) | [inline] |
Returns distance of current PerceptionCell from closest LSR boundary PerceptionCell.
void MipBaselib::PerceptionCell::merge | ( | PerceptionCell & | otherPerceptionCell | ) | [inline] |
Merges the PerceptionCell with another PerceptionCell.
[in] | &anotherGrid | The other PerceptionCell; |
string MipBaselib::PerceptionCell::printFlags | ( | ) | [inline] |
Prints flags status of the PerceptionCell.
vector<int> MipBaselib::PerceptionCell::perceptionCounter |
Vector containg the times a PerceptionCell has been perceived as obstacle, LRR, etc...(under test).