MipBaselib::PerceptionCell Class Reference

Cell of a grid. More...

#include <PerceptionGrid.h>

List of all members.

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.
PerceptionCelloperator= (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).


Detailed Description

Cell of a grid.

Class for the implementation of a cell in a grid representation for robot's sorrounding.

Author:
Antonio Franchi and Marco Barbalinardo - email:barba82@yahoo.it
Date:
2008/11/14
Todo:
verify, make private camps.
Todo:
add probability
Bug:
none

Constructor & Destructor Documentation

MipBaselib::PerceptionCell::PerceptionCell (  ) 

Default constructor.

Note:
for the moment, nothing can be passed to the constructor ....

MipBaselib::PerceptionCell::PerceptionCell ( Decimal  side  ) 

Decimal constructor.

Todo:
add new booleans

MipBaselib::PerceptionCell::~PerceptionCell (  ) 

Destructor.

MipBaselib::PerceptionCell::PerceptionCell ( const PerceptionCell c  ) 

Copy constructor.

Todo:
add new booleans

MipBaselib::PerceptionCell::PerceptionCell ( Decimal  size,
Position  center,
int  vectorIndex,
DubInt  indexes,
int  cone,
int  frame,
Position  reading = Position(0.0,0.0) 
)

Main Constructor.

Parameters:
[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.

Todo:
check


Member Function Documentation

void MipBaselib::PerceptionCell::print (  )  [inline]

Prints the state.

PerceptionCell & MipBaselib::PerceptionCell::operator= ( const PerceptionCell c  ) 

= operator.

Todo:
add new booleans

void MipBaselib::PerceptionCell::setState ( bool  unknown,
int  thirdType,
bool  local,
bool  exploredOnce 
) [inline]

Method to set the state.

Parameters:
[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.

Note:
Deprecated, used for compatibiliy

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.

Note:
Deprecated, used for compatibiliy

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.

Returns:
true if the cell was Local, false otherwise.

bool MipBaselib::PerceptionCell::isLRR (  )  [inline]

Tells wether or not the cell is LRR.

Returns:
true if the cell is LRR, false otherwise.

bool MipBaselib::PerceptionCell::isFrontier (  )  [inline]

Tells wether or not the cell is Frontier.

Returns:
true if the cell is Frontier, false otherwise.

bool MipBaselib::PerceptionCell::isLSR (  )  [inline]

Tells wether or not the cell is LSR.

Returns:
true if the cell is LSR, false otherwise.

bool MipBaselib::PerceptionCell::isPrevExpl (  )  [inline]

Tells wether or not the cell is Previously Explored.

Returns:
true if the cell is Previously Explored, false otherwise.

bool MipBaselib::PerceptionCell::isObstacle (  )  [inline]

Tells wether or not the cell is Obstacle.

Returns:
true if the cell is Obstacle, false otherwise.

bool MipBaselib::PerceptionCell::isInternalFree (  )  [inline]

Tells wether or not the cell is InternalFree.

Returns:
true if the cell is InternalFree, false otherwise.

bool MipBaselib::PerceptionCell::isInternalNonFree (  )  [inline]

Tells wether or not the cell is InternalNonFree.

Returns:
true if the cell is InternalNonFree, false otherwise.

bool MipBaselib::PerceptionCell::isUnknown (  )  [inline]

Tells wether or not the cell is Unknown.

Returns:
true if the cell is Unknown, false otherwise.

bool MipBaselib::PerceptionCell::isBoundary (  )  [inline]

Tells wether or not the cell is Boundary.

Returns:
true if the cell is Boundary, false otherwise.

bool MipBaselib::PerceptionCell::isLRRBoundary (  )  [inline]

Tells wether or not the cell is LRRBoundary.

Returns:
true if the cell is LRRBoundary, false otherwise.

bool MipBaselib::PerceptionCell::isLSRContour (  )  [inline]

Tells wether or not the cell is LSRContour.

Returns:
true if the cell is LSRContour, false otherwise.

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.

Returns:
true if PerceptionFrontier false otherwise

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.

Parameters:
[in] &anotherGrid The other PerceptionCell;
Todo:
Works only for is obstacle. Extend.

string MipBaselib::PerceptionCell::printFlags (  )  [inline]

Prints flags status of the PerceptionCell.


Member Data Documentation

Vector containg the times a PerceptionCell has been perceived as obstacle, LRR, etc...(under test).

Todo:
Why public ?


The documentation for this class was generated from the following files:

Generated on Mon Feb 20 07:01:11 2017 for MIP by  doxygen 1.5.6