1 package cz.cuni.amis.pogamut.base.agent.navigation;
2
3 import cz.cuni.amis.pogamut.base3d.worldview.object.ILocated;
4
5 /**
6 * Stuck detector provides a functionality to detect the situation in which the bot is unable
7 * to reach its destination. Stuck detector does that (usually) based on some heuristics.
8 *
9 * @author Jimmy
10 */
11 public interface IStuckDetector {
12
13 /**
14 * Enable / Disable stuck detector. Default: FALSE (== disabled)
15 */
16 public void setEnabled(boolean state);
17
18 /**
19 * Tells the stuck detector, that the bot is waiting for something, thus the detector should not detect stuck!
20 * @param state
21 */
22 public void setBotWaiting(boolean state);
23
24 /**
25 * Where the bot is currently trying to get with DIRECT MOVEMENT (possibly with JUMPS).
26 * @param target
27 */
28 public void setBotTarget(ILocated target);
29
30 /**
31 * Tells whether the detector has detected a stuck.
32 * @return
33 */
34 public boolean isStuck();
35
36 /**
37 * Restarts the detector - this method is called just before the executor
38 * starts to follow the path.
39 * <p><p>
40 * If {@link IStuckDetector#isStuck()} was reporting true, it should report 'false' after
41 * the reset (until next stuck is detected).
42 */
43 public void reset();
44
45 }