ClearingMobileRobot Class Reference

This class implements a mobile robots that performs clearing and navigates using the SND algorithm. More...

#include <ClearingMobileRobot.h>

List of all members.

Public Member Functions

 ClearingMobileRobot (IdentityCL ID, int argc, const char *argv[])
 Complete constructor.
 ClearingMobileRobot (IdentityCL ID, int argc, const char *argv[], MobileRob *rob)
 Pointer constructor.
 ~ClearingMobileRobot ()
 Destructor.
IdentityCL getID ()
 Gets the ID of the robot.
BehaviorTypes getBehavior ()
 Gets the actual behaviour.
Grid getLSR ()
LRR getLRR ()
Frontier getFrontier ()
void velCmd (Decimal drive, Decimal turnrate)
Position getGoal ()
int getNumFrontierSegments ()
int getTotalFrontierCells ()
void setFrontier (Frontier frontier, bool bForce=false)
PathCl getPathCl ()
Pose getPose ()
Position getPosition ()
Position getViewpoint ()
Scan getScan ()
ExplorationParams getExplParams ()
double getSensorRange ()
double getCoverRange ()
double getWidth ()
int getLSRSize ()
vector< Cell * > getRaster (DubInt iCell1, DubInt iCell2)
double getLSRResolution ()
Position getLSRPosition ()
LSRBound getLSRBound ()
CellgetCell (DubInt indices)
CellgetCell (Position pos)
CellgetCell (int i)
Position getCellPosition (DubInt indices)
int getNumFollowers ()
Position getFollowerPosition ()
void setToExpand (PathCl path, AgentVector neighbors, bool bDoExpand=true)
void setToGuard (AgentVector neighbors)
void setToFollow ()
void setToWander ()
void setToNoBehavior ()
void goTo (Position pos)
void addFollower (ClearingAgent *newFollower, bool bMove=true)
void doCurrentBehavior (AgentVector neighbors)
bool isLeader ()
bool isReady ()
bool isWaitingForAnyAgent ()
bool isWaitingForAgent (int iID)
void clearWaitingForAgent ()
bool isTraveling ()
void drawBoundary (Graphics2dProxy &gp)
void drawFrontier (Graphics2dProxy &gp)
void drawLSR (Graphics2dProxy &gp, bool bOnlyLSR)
bool canDetectTargetPosition (Position targetPos)

Protected Member Functions

void Expand (AgentVector neighbors)
void Guard (AgentVector neighbors)
void processFrontier (AgentVector neighbors)
void Wander (AgentVector neighbors)
void recordLSR ()
bool isCellCovered (DubInt iViewPoint, DubInt iCell)
Position pickBestViewPoint (int *iNumViewPoints, bool bDebugDisplay=false)
void updateFrontier (AgentVector neighbors, bool bDebugDisplay=false)

Protected Attributes

MobileRob_mobileRob
 Pointer to a previously allocated mobile robot.
IdentityCL m_iID
 ID of the mobile robot.
Position goal
 goal for the SND algorithm
Thread _motionThread
 thread that calls the SND algorithm to implement the motion
BehaviorTypes m_eBehavior
Frontier m_frontier
Frontier m_freeArcs
Frontier m_prevFrontier
Grid m_LSR
Grid m_prevLSR
bool m_bFrontierInitialized
PathCl m_path
ClearingAgentm_pWaitForAgent
AgentVector m_followers


Detailed Description

This class implements a mobile robots that performs clearing and navigates using the SND algorithm.

Author:
Joey Durham and Paolo Stegagno

Constructor & Destructor Documentation

ClearingMobileRobot::ClearingMobileRobot ( IdentityCL  ID,
int  argc,
const char *  argv[] 
)

Complete constructor.

This constructor builds up a player mobile robot.

<sets the object that wil be passed to scanWork and scanClean

<sets the routine that must be called after startScan() is called

<sets the routine that must be called after stopScan() is called

<sets the slepping time of the continous scanning thread

ClearingMobileRobot::ClearingMobileRobot ( IdentityCL  ID,
int  argc,
const char *  argv[],
MobileRob rob 
)

Pointer constructor.

This constructor takes as input a pointer to a pre-built mobile robot.

<sets the object that wil be passed to scanWork and scanClean

<sets the routine that must be called after startScan() is called

<sets the routine that must be called after stopScan() is called

<sets the slepping time of the continous scanning thread

ClearingMobileRobot::~ClearingMobileRobot (  ) 

Destructor.


Member Function Documentation

void ClearingMobileRobot::Expand ( AgentVector  neighbors  )  [protected]

void ClearingMobileRobot::Guard ( AgentVector  neighbors  )  [protected]

void ClearingMobileRobot::processFrontier ( AgentVector  neighbors  )  [protected]

void ClearingMobileRobot::Wander ( AgentVector  neighbors  )  [protected]

void ClearingMobileRobot::recordLSR (  )  [protected]

bool ClearingMobileRobot::isCellCovered ( DubInt  iViewPoint,
DubInt  iCell 
) [protected]

Position ClearingMobileRobot::pickBestViewPoint ( int *  iNumViewPoints,
bool  bDebugDisplay = false 
) [protected]

void ClearingMobileRobot::updateFrontier ( AgentVector  neighbors,
bool  bDebugDisplay = false 
) [protected]

IdentityCL ClearingMobileRobot::getID (  )  [inline]

Gets the ID of the robot.

BehaviorTypes ClearingMobileRobot::getBehavior (  )  [inline]

Gets the actual behaviour.

Grid ClearingMobileRobot::getLSR (  )  [inline]

LRR ClearingMobileRobot::getLRR (  )  [inline]

Frontier ClearingMobileRobot::getFrontier (  )  [inline]

void ClearingMobileRobot::velCmd ( Decimal  drive,
Decimal  turnrate 
) [inline]

Position ClearingMobileRobot::getGoal (  )  [inline]

int ClearingMobileRobot::getNumFrontierSegments (  )  [inline]

int ClearingMobileRobot::getTotalFrontierCells (  ) 

void ClearingMobileRobot::setFrontier ( Frontier  frontier,
bool  bForce = false 
)

PathCl ClearingMobileRobot::getPathCl (  )  [inline]

Pose ClearingMobileRobot::getPose ( void   )  [inline]

Position ClearingMobileRobot::getPosition ( void   )  [inline]

Position ClearingMobileRobot::getViewpoint (  ) 

Scan ClearingMobileRobot::getScan (  ) 

ExplorationParams ClearingMobileRobot::getExplParams (  ) 

double ClearingMobileRobot::getSensorRange (  )  [inline]

double ClearingMobileRobot::getCoverRange (  ) 

double ClearingMobileRobot::getWidth (  )  [inline]

int ClearingMobileRobot::getLSRSize (  )  [inline]

vector< Cell * > ClearingMobileRobot::getRaster ( DubInt  iCell1,
DubInt  iCell2 
)

double ClearingMobileRobot::getLSRResolution (  )  [inline]

Position ClearingMobileRobot::getLSRPosition (  ) 

LSRBound ClearingMobileRobot::getLSRBound (  )  [inline]

Cell* ClearingMobileRobot::getCell ( DubInt  indices  )  [inline]

Cell* ClearingMobileRobot::getCell ( Position  pos  )  [inline]

Cell* ClearingMobileRobot::getCell ( int  i  )  [inline]

Position ClearingMobileRobot::getCellPosition ( DubInt  indices  )  [inline]

int ClearingMobileRobot::getNumFollowers (  )  [inline]

Position ClearingMobileRobot::getFollowerPosition (  ) 

void ClearingMobileRobot::setToExpand ( PathCl  path,
AgentVector  neighbors,
bool  bDoExpand = true 
)

void ClearingMobileRobot::setToGuard ( AgentVector  neighbors  ) 

void ClearingMobileRobot::setToFollow (  ) 

void ClearingMobileRobot::setToWander (  ) 

void ClearingMobileRobot::setToNoBehavior (  ) 

void ClearingMobileRobot::goTo ( Position  pos  ) 

void ClearingMobileRobot::addFollower ( ClearingAgent newFollower,
bool  bMove = true 
)

void ClearingMobileRobot::doCurrentBehavior ( AgentVector  neighbors  ) 

bool ClearingMobileRobot::isLeader (  ) 

bool ClearingMobileRobot::isReady (  ) 

TODO understand this condition (now commented)

bool ClearingMobileRobot::isWaitingForAnyAgent (  ) 

bool ClearingMobileRobot::isWaitingForAgent ( int  iID  ) 

void ClearingMobileRobot::clearWaitingForAgent (  ) 

bool ClearingMobileRobot::isTraveling (  ) 

void ClearingMobileRobot::drawBoundary ( Graphics2dProxy &  gp  ) 

void ClearingMobileRobot::drawFrontier ( Graphics2dProxy &  gp  ) 

void ClearingMobileRobot::drawLSR ( Graphics2dProxy &  gp,
bool  bOnlyLSR 
)

bool ClearingMobileRobot::canDetectTargetPosition ( Position  targetPos  ) 


Member Data Documentation

Pointer to a previously allocated mobile robot.

ID of the mobile robot.

goal for the SND algorithm

thread that calls the SND algorithm to implement the motion


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

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