#include <ClearingMobileRobot.h>
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 () |
| Cell * | getCell (DubInt indices) |
| Cell * | getCell (Position pos) |
| Cell * | getCell (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 |
| ClearingAgent * | m_pWaitForAgent |
| AgentVector | m_followers |
| 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.
| 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] |
| 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] |
| 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] |
| double ClearingMobileRobot::getLSRResolution | ( | ) | [inline] |
| Position ClearingMobileRobot::getLSRPosition | ( | ) |
| LSRBound ClearingMobileRobot::getLSRBound | ( | ) | [inline] |
| Cell* ClearingMobileRobot::getCell | ( | int | i | ) | [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 | ) |
MobileRob* ClearingMobileRobot::_mobileRob [protected] |
Pointer to a previously allocated mobile robot.
IdentityCL ClearingMobileRobot::m_iID [protected] |
ID of the mobile robot.
Position ClearingMobileRobot::goal [protected] |
goal for the SND algorithm
Thread ClearingMobileRobot::_motionThread [protected] |
thread that calls the SND algorithm to implement the motion
BehaviorTypes ClearingMobileRobot::m_eBehavior [protected] |
Frontier ClearingMobileRobot::m_frontier [protected] |
Frontier ClearingMobileRobot::m_freeArcs [protected] |
Frontier ClearingMobileRobot::m_prevFrontier [protected] |
Grid ClearingMobileRobot::m_LSR [protected] |
Grid ClearingMobileRobot::m_prevLSR [protected] |
bool ClearingMobileRobot::m_bFrontierInitialized [protected] |
PathCl ClearingMobileRobot::m_path [protected] |
ClearingAgent* ClearingMobileRobot::m_pWaitForAgent [protected] |
AgentVector ClearingMobileRobot::m_followers [protected] |
1.5.6