Jafar
|
}}} More...
}}}
PursuitGraph is the structure (class) used for the pursuit functionalities. Especially, it contains the PursuitGNode (used to predict movements and risks).
NB: the graph is mopre precisely a tree.
Definition at line 92 of file PursuitGraph.hpp.
#include <PursuitGraph.hpp>
Public Member Functions | |
PursuitGraph (PursuitNavigator &_navigator, VisibilityMap &_visibilityMap, unsigned int _pursuitTemporalTolerance=DEFAULT_PURSUIT_TEMPORAL_TOLERANCE, unsigned int _riskTermMaxValue=DEFAULT_RISK_TERM_MAX_VALUE) | |
constructor | |
~PursuitGraph () | |
Destructor. | |
void | computeAll (Cell_ID cellR, Cell_ID cellT, const unsigned int _horizon=10) |
Use at the beginning compute the whole tree (with "horizon" as the number of stage) Cell_ID cellR (or (xR, yR) ) is the coordinate of the position (cell) of the robot, used in the root node. | |
void | computeAll (int xR, int yR, int xT, int yT, const unsigned int _horizon=10) |
THORW EXCEPTION. | |
void | computeAllBefore (Cell_ID cellR, Cell_ID cellT, const double tMax=5000.0) |
THORW EXCEPTION. | |
void | computeAllBefore (int xR, int yR, int xT, int yT, const double tMax=5000.0) |
THORW EXCEPTION. | |
bool | updatePG (Cell_ID newtargetPos, Cell_ID &newrobotPos) |
THORW EXCEPTION. | |
bool | updatePG (int xT, int yT, int &xR, int &yR) |
void | completeToHorizon () |
void | completeToHorizonBefore (const double &tMax) |
unsigned int | gethorizon () const |
const std::vector < boost::weak_ptr < PursuitGNode > > & | getrisk () const |
const std::vector < boost::weak_ptr < PursuitGNode > > & | getdanger () const |
const std::vector < boost::weak_ptr < PursuitGNode > > & | getfront () const |
const std::set < boost::shared_ptr < PursuitGNode > > & | getsetOfNodes () const |
const std::multimap< Cell_ID, boost::weak_ptr< PursuitGNode > > & | getnodeMap () const |
const boost::shared_ptr < PursuitGNode > & | getroot () const |
PursuitNavigator * | getnavigator () |
unsigned int | getysize () const |
unsigned int | getxsize () const |
unsigned long int | gettime () const |
void | disp () |
void | disp_risk () |
void | disp_danger () |
Private Member Functions | |
void | computeAll (const boost::shared_ptr< PursuitGNode > &_root, const unsigned int _horizon=10) |
Use at the beginning compute the whole tree (with "horizon" as the number of stage) _root and root as the root. | |
void | computeAllBefore (const boost::shared_ptr< PursuitGNode > &_root, const double tMax=5.0) |
THR0W EXCEPTION. | |
void | setRoot () |
THR0W EXCEPTION. | |
void | computeNewStage () |
Compute a new stage from the current front vector (leaves) | |
void | clean () |
Clean the risk and front vectors from deprecated pointers. | |
void | reorient () |
re-oriente the graphe from the root update risk, front and setOfNodes | |
void | makeNewNodes (std::vector< boost::shared_ptr< PursuitGNode > > &newNodes, const unsigned int &riskTerm, const Cell_ID &robotPos, const std::set< Cell_ID > &robotAccess, const std::set< Cell_ID > &targetAccess) |
void | completeStage (unsigned long int stage) |
void | manageRisk (const Cell_ID &robotPos, const boost::shared_ptr< PursuitGNode > &risk, std::vector< boost::shared_ptr< PursuitGNode > > &solution) |
void | findIdealPositions (const std::set< Cell_ID > &targetPos, std::set< Cell_ID > &positions) |
void | findAnyPositions (const std::set< Cell_ID > &targetPos, std::set< Cell_ID > &positions) |
RISK_LEVEL | computeRiskLevel (const Cell_ID &robotPos, const Cell_ID &targetPos) |
Private Attributes | |
PursuitNavigator * | navigator |
{{{ | |
VisibilityMap * | visibilityMap |
unsigned int | ysize |
unsigned int | xsize |
boost::shared_ptr< PursuitGNode > | root |
std::vector< boost::weak_ptr < PursuitGNode > > | risk |
std::vector< boost::weak_ptr < PursuitGNode > > | danger |
std::vector< boost::weak_ptr < PursuitGNode > > | front |
std::set< boost::shared_ptr < PursuitGNode > > | setOfNodes |
std::multimap< Cell_ID, boost::weak_ptr< PursuitGNode > > | nodeMap |
unsigned int | horizon |
unsigned long int | time |
unsigned int | pursuitTemporalTolerance |
unsigned int | riskTermMaxValue |
double | d_est |
void jafar::lgl::PursuitGraph::computeAll | ( | Cell_ID | cellR, |
Cell_ID | cellT, | ||
const unsigned int | _horizon = 10 |
||
) |
Use at the beginning compute the whole tree (with "horizon" as the number of stage) Cell_ID cellR (or (xR, yR) ) is the coordinate of the position (cell) of the robot, used in the root node.
Cell_ID cellT (or (xT, yT) ) is the coordinate of the position (cell) of the target, used in the root node.
void jafar::lgl::PursuitGraph::computeAllBefore | ( | Cell_ID | cellR, |
Cell_ID | cellT, | ||
const double | tMax = 5000.0 |
||
) |
THORW EXCEPTION.
Similair to computeAll, but use a time constraint to finish.
It will compute a new stage until the time constraint is over. the time constraint, given in milli-seconds.
void jafar::lgl::PursuitGraph::computeAllBefore | ( | const boost::shared_ptr< PursuitGNode > & | _root, |
const double | tMax = 5.0 |
||
) | [private] |
THR0W EXCEPTION.
Use at the beginning compute the whole tree (with a time constraint as end criteria) _root and root as the root.
void jafar::lgl::PursuitGraph::setRoot | ( | ) | [private] |
THR0W EXCEPTION.
set Root
Generated on Wed Oct 15 2014 00:37:41 for Jafar by doxygen 1.7.6.1 |