|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectcz.cuni.amis.pogamut.ut2004.agent.navigation.UT2004GetBackToNavGraph
public class UT2004GetBackToNavGraph
This class is meant to provide easy "get-back-to-navigation-graph-in-order-I-can-safely-navigate-through-map"
implementation.
Automatically uses UT2004TimeStuckDetector, UT2004PositionStuckDetector and UT2004DistanceStuckDetector.
| Field Summary | |
|---|---|
protected UT2004Bot |
bot
|
static int |
CLOSE_ENOUGH
|
protected IWorldEventListener<EndMessage> |
endListener
|
protected boolean |
executing
|
protected ILocated |
focus
|
protected AgentInfo |
info
|
protected Location |
initialLocation
|
protected LogCategory |
log
|
static double |
MAX_ANGLE
|
protected int |
randomMoveDirection
|
protected IUT2004PathRunner |
runner
|
protected List<IStuckDetector> |
stuckDetectors
|
protected TabooSet<NavPoint> |
tried
|
protected NavPoint |
tryingNav
|
| Constructor Summary | |
|---|---|
UT2004GetBackToNavGraph(UT2004Bot bot,
AgentInfo info,
AdvancedLocomotion move)
|
|
| Method Summary | |
|---|---|
void |
addStuckDetector(IStuckDetector stuckDetector)
Adds another stuck detector to be used for stuck detection :) |
void |
backToNavGraph()
Start the class, let it take the bot back to navigation graph. |
void |
clearStuckDetectors()
Removes ALL stuck detectors. |
protected void |
getBackOnNavGraph()
|
NavPoint |
getNearestNavPoint()
Returns nearest NavPoint to current bot's location. |
boolean |
isExecuting()
Whether the class is executing (== working == trying to get the bot back on NavGraph == to make isOnNavGraph() true). |
boolean |
isOnNavGraph()
Whether the bot is currently on some NavPoint. |
void |
removeStuckDetector(IStuckDetector stuckDetector)
Removes stuck detector. |
protected void |
reset()
|
protected void |
runFailed()
|
protected void |
runSomewhere()
Last resort - keep trying random points 200 UT units from bot location - 90 degrees left, right and backwards. |
protected boolean |
runToNavPoint()
|
void |
setFocus(ILocated located)
Sets focus of the bot when navigating (when using this object to run to some location target)! To reset focus call this method with null parameter. |
void |
stop()
Stop the class. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int CLOSE_ENOUGH
public static final double MAX_ANGLE
protected UT2004Bot bot
protected AgentInfo info
protected IUT2004PathRunner runner
protected boolean executing
protected LogCategory log
protected int randomMoveDirection
protected IWorldEventListener<EndMessage> endListener
protected List<IStuckDetector> stuckDetectors
protected ILocated focus
protected TabooSet<NavPoint> tried
protected NavPoint tryingNav
protected Location initialLocation
| Constructor Detail |
|---|
public UT2004GetBackToNavGraph(UT2004Bot bot,
AgentInfo info,
AdvancedLocomotion move)
| Method Detail |
|---|
public void addStuckDetector(IStuckDetector stuckDetector)
IUT2004GetBackToNavGraph
addStuckDetector in interface IUT2004GetBackToNavGraphpublic void removeStuckDetector(IStuckDetector stuckDetector)
IUT2004GetBackToNavGraph
removeStuckDetector in interface IUT2004GetBackToNavGraphpublic void clearStuckDetectors()
IUT2004GetBackToNavGraph
clearStuckDetectors in interface IUT2004GetBackToNavGraphpublic NavPoint getNearestNavPoint()
IUT2004GetBackToNavGraphNavPoint to current bot's location.
getNearestNavPoint in interface IUT2004GetBackToNavGraphpublic boolean isOnNavGraph()
IUT2004GetBackToNavGraphNavPoint.
isOnNavGraph in interface IUT2004GetBackToNavGraphpublic boolean isExecuting()
IUT2004GetBackToNavGraphisOnNavGraph() true).
isExecuting in interface IUT2004GetBackToNavGraphpublic void setFocus(ILocated located)
IUT2004GetBackToNavGraph
setFocus in interface IUT2004GetBackToNavGraphpublic void backToNavGraph()
IUT2004GetBackToNavGraph
backToNavGraph in interface IUT2004GetBackToNavGraphpublic void stop()
IUT2004GetBackToNavGraph
stop in interface IUT2004GetBackToNavGraphprotected void reset()
protected void getBackOnNavGraph()
protected void runSomewhere()
protected boolean runToNavPoint()
protected void runFailed()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||