|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cz.cuni.amis.pogamut.base.agent.navigation.impl.AbstractPathExecutor<PATH_ELEMENT> cz.cuni.amis.pogamut.base.agent.navigation.impl.BasePathExecutor<PATH_ELEMENT> cz.cuni.amis.pogamut.ut2004.agent.navigation.navmesh.pathfollowing.UT2004AcceleratedPathExecutor<PATH_ELEMENT>
PATH_ELEMENT
- public class UT2004AcceleratedPathExecutor<PATH_ELEMENT extends ILocated>
Accelerated version of UT2004Pathexecutor
. Uses
LocationUpdate
as impulse for navigation logic cycle. Should be used
with accelerated versions of the stuck detectors.
Field Summary | |
---|---|
static int |
PATH_MERGE_CUTOFF
When doing UT2004PathExecutor#extendPath(List) , how many OLD
(already passed by elements) should be left in the merged path. |
Fields inherited from class cz.cuni.amis.pogamut.base.agent.navigation.impl.BasePathExecutor |
---|
mutex, pathElementIndex, pathFuture, previousPathElementIndex |
Fields inherited from class cz.cuni.amis.pogamut.base.agent.navigation.impl.AbstractPathExecutor |
---|
log, state, stuckDetectors |
Constructor Summary | |
---|---|
UT2004AcceleratedPathExecutor(UT2004Bot bot,
AgentInfo info,
AdvancedLocomotion body,
IUT2004PathNavigator<PATH_ELEMENT> navigator)
|
|
UT2004AcceleratedPathExecutor(UT2004Bot bot,
AgentInfo info,
AdvancedLocomotion move,
IUT2004PathNavigator<PATH_ELEMENT> navigator,
Logger log)
|
Method Summary | |
---|---|
protected void |
calculateTimeout()
|
protected IPathExecutorState |
createState(PathExecutorState state)
|
protected void |
eventLocationUpdateMessage(LocationUpdate event)
|
void |
extendPath(List<PATH_ELEMENT> morePath)
Merges current followed path with "morePath", i.e., it cuts off already passed elements and adds "morePath" to current path. |
protected void |
followPathImpl()
|
NavPointNeighbourLink |
getCurrentLink()
Returns NavPointNeighbourLink the bot is currently running over. |
ILocated |
getFocus()
|
IUT2004PathNavigator<PATH_ELEMENT> |
getNavigator()
|
double |
getRemainingDistance()
Returns how far is our target (path-distance). |
List<IStuckDetector> |
getStuckDetectors()
Returns list of all stuck detectors registered inside the executor. |
protected void |
checkStuck()
|
protected cz.cuni.amis.utils.Tuple2<List<PATH_ELEMENT>,Integer> |
mergePath(List<PATH_ELEMENT> currPath,
int currIndex,
List<PATH_ELEMENT> morePath)
Merges path together. |
protected void |
navigate()
|
protected void |
pathComputationFailedImpl()
|
protected void |
pathComputedImpl()
If the path is not zero-length, recalls IUT2004PathNavigator#newPath(List) and set the path into the
GB2004 via SetRoute . |
protected void |
preStuckImpl()
|
protected void |
preTargetReachedImpl()
|
void |
setFocus(ILocated located)
|
UT2004AcceleratedPathExecutor<PATH_ELEMENT> |
setTimeoutEstimator(IPathExecutionEstimator<PATH_ELEMENT> timeoutEstimator)
|
protected void |
stopImpl()
|
protected void |
stopped()
|
protected void |
stuckImpl()
|
protected void |
switchToAnotherPathElementImpl()
Sets the path into the GB2004 via SetRoute whenever switch occurs
and the rest of the path is greater than 32 path elements. |
protected void |
targetReachedImpl()
|
Methods inherited from class cz.cuni.amis.pogamut.base.agent.navigation.impl.BasePathExecutor |
---|
followPath, getPathElementIndex, getPathFrom, getPathFuture, getPathTo, checkStuckDetectors, pathComputationFailed, pathComputed, preFollowPathImpl, prePathComputationFailed, prePathComputedImpl, preSwitchToAnotherPathElementImpl, stop, stuck, switchToAnotherPathElement, targetReached |
Methods inherited from class cz.cuni.amis.pogamut.base.agent.navigation.impl.AbstractPathExecutor |
---|
addStuckDetector, getLog, getPath, getPathElement, getState, inState, isExecuting, isPathUnavailable, isStuck, isTargetReached, notInState, removeAllStuckDetectors, removeStuckDetector, setLog, switchState |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface cz.cuni.amis.pogamut.base.agent.navigation.IPathExecutorHelper |
---|
checkStuckDetectors, stuck, switchToAnotherPathElement, targetReached |
Methods inherited from interface cz.cuni.amis.pogamut.base.agent.navigation.IPathExecutor |
---|
addStuckDetector, followPath, getLog, getPath, getPathElement, getPathElementIndex, getPathFrom, getPathFuture, getPathTo, getState, inState, isExecuting, isPathUnavailable, isStuck, isTargetReached, notInState, removeAllStuckDetectors, removeStuckDetector, stop |
Field Detail |
---|
public static final int PATH_MERGE_CUTOFF
UT2004PathExecutor#extendPath(List)
, how many OLD
(already passed by elements) should be left in the merged path.
Some nodes are needed due to lift/teleport navigation!
Constructor Detail |
---|
public UT2004AcceleratedPathExecutor(UT2004Bot bot, AgentInfo info, AdvancedLocomotion body, IUT2004PathNavigator<PATH_ELEMENT> navigator)
public UT2004AcceleratedPathExecutor(UT2004Bot bot, AgentInfo info, AdvancedLocomotion move, IUT2004PathNavigator<PATH_ELEMENT> navigator, Logger log)
Method Detail |
---|
public UT2004AcceleratedPathExecutor<PATH_ELEMENT> setTimeoutEstimator(IPathExecutionEstimator<PATH_ELEMENT> timeoutEstimator)
protected IPathExecutorState createState(PathExecutorState state)
createState
in class BasePathExecutor<PATH_ELEMENT extends ILocated>
public void extendPath(List<PATH_ELEMENT> morePath)
IUT2004PathExecutor
extendPath
in interface IUT2004PathExecutor<PATH_ELEMENT extends ILocated>
protected cz.cuni.amis.utils.Tuple2<List<PATH_ELEMENT>,Integer> mergePath(List<PATH_ELEMENT> currPath, int currIndex, List<PATH_ELEMENT> morePath)
currPath
- currIndex
- morePath
-
public NavPointNeighbourLink getCurrentLink()
IUT2004PathExecutor
NavPointNeighbourLink
the bot is currently running over.
Might be null if the link is unknown.
getCurrentLink
in interface IUT2004PathExecutor<PATH_ELEMENT extends ILocated>
protected void stopped()
stopped
in class BasePathExecutor<PATH_ELEMENT extends ILocated>
protected void followPathImpl()
followPathImpl
in class BasePathExecutor<PATH_ELEMENT extends ILocated>
protected void pathComputedImpl()
IUT2004PathNavigator#newPath(List)
and set the path into the
GB2004 via SetRoute
.
pathComputedImpl
in class BasePathExecutor<PATH_ELEMENT extends ILocated>
protected void pathComputationFailedImpl()
pathComputationFailedImpl
in class BasePathExecutor<PATH_ELEMENT extends ILocated>
protected void switchToAnotherPathElementImpl()
SetRoute
whenever switch occurs
and the rest of the path is greater than 32 path elements.
switchToAnotherPathElementImpl
in class BasePathExecutor<PATH_ELEMENT extends ILocated>
protected void calculateTimeout()
protected void eventLocationUpdateMessage(LocationUpdate event)
protected void checkStuck()
protected void navigate()
public double getRemainingDistance()
IUT2004PathExecutor
getRemainingDistance
in interface IUT2004PathExecutor<PATH_ELEMENT extends ILocated>
public ILocated getFocus()
getFocus
in interface IUnrealPathExecutor<PATH_ELEMENT extends ILocated>
public void setFocus(ILocated located)
setFocus
in interface IUnrealPathExecutor<PATH_ELEMENT extends ILocated>
public List<IStuckDetector> getStuckDetectors()
IUT2004PathExecutorHelper
getStuckDetectors
in interface IUT2004PathExecutorHelper<PATH_ELEMENT extends ILocated>
protected void preStuckImpl()
preStuckImpl
in class BasePathExecutor<PATH_ELEMENT extends ILocated>
protected void stuckImpl()
stuckImpl
in class BasePathExecutor<PATH_ELEMENT extends ILocated>
protected void stopImpl()
stopImpl
in class BasePathExecutor<PATH_ELEMENT extends ILocated>
protected void preTargetReachedImpl()
preTargetReachedImpl
in class BasePathExecutor<PATH_ELEMENT extends ILocated>
protected void targetReachedImpl()
targetReachedImpl
in class BasePathExecutor<PATH_ELEMENT extends ILocated>
public IUT2004PathNavigator<PATH_ELEMENT> getNavigator()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |