|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
PATH_ELEMENT
- public interface IPathExecutorWithPlanner<PATH_ELEMENT>
First - read javadoc for IPathPlanner
and IPathExecutor
.
Done? Ok, continue...
So, the IPathPlanner
should get us the path and IPathExecutor
should follow it.
This is nice isn't it? It allows you to configure different path planners (for instance one for
planning retreat paths, other one planning attack paths) and you may use a single executor
or instantiate different one and pick one that suits your needs. Ok, nice, but such scenario
requires you to mediate communication bqetween planner and executor and handle executor failures.
Sometimes it might be nice to have executor stuffed with planner that it can use to replan the
path in the case of failures. Voila - this interface pops out.
This interface serves for executors that contains planners they can use in the case of path failure.
Whenever the executor fails to reach the path, it should use the injected path planner
(via setPathPlanner(IPathPlanner)
) to obtain the new path and try that.
EXPERIMENTAL INTERFACE - might be revisited in future releases (I'm aware that the interface is faulty due to ignore other path-planning/execution concerns such as "how to determine that the executre really really stuck").
Note that implementation of this interface will the most likely be so specific, that it is
always a good idea to setup own timeout counter and halt the path executor manually if
the counter reaches zero. I mean, it probably won't be a flawless implementation that
can solve all encountered situations. (Or just use runTo(Object, double)
.)
Method Summary | |
---|---|
void |
runTo(PATH_ELEMENT to)
|
void |
runTo(PATH_ELEMENT to,
double globalTimeout)
|
void |
setPathPlanner(IPathPlanner<PATH_ELEMENT> pathPlanner)
|
Methods inherited from interface cz.cuni.amis.pogamut.base.agent.navigation.IPathExecutor |
---|
addStuckDetector, followPath, getLog, getPath, getPathElement, getPathElementIndex, getPathFuture, getState, inState, isExecuting, isPathUnavailable, isStuck, isTargetReached, notInState, removeStuckDetector, stop |
Method Detail |
---|
void runTo(PATH_ELEMENT to)
void runTo(PATH_ELEMENT to, double globalTimeout)
void setPathPlanner(IPathPlanner<PATH_ELEMENT> pathPlanner)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |