View Javadoc

1   package cz.cuni.amis.pogamut.ut2004.agent.navigation;
2   
3   import cz.cuni.amis.pogamut.base.agent.navigation.IStuckDetector;
4   import cz.cuni.amis.pogamut.base3d.worldview.object.ILocated;
5   
6   /**
7    * Interface for straight-runner that is combined with stuck-detectors.
8    * 
9    * @author Jimmy
10   */
11  public interface IUT2004RunStraight {
12  
13  	/**
14  	 * Whether the object is executing the running.
15  	 * @return
16  	 */
17  	public boolean isExecuting();
18  	
19  	/**
20  	 * Whether our run has succeeded (once we get to our target, this returns true).
21  	 * @return
22  	 */
23  	public boolean isSuccess();
24  	
25  	/**
26  	 * Whether our run has failed.
27  	 * @return
28  	 */
29  	public boolean isFailed();
30  	
31  	/**
32  	 * Get previous target of the straight-run.
33  	 * @return
34  	 */
35  	public ILocated getLastTarget();
36  	
37  	/**
38  	 * Get current target of the straight-run.
39  	 * @return
40  	 */
41  	public ILocated getCurrentTarget();
42  	
43  	/**
44       * Sets focus of the bot when navigating (when using this object to run to some location target)!
45       * To reset focus call this method with null parameter.
46       * 
47  	 * @param focus
48  	 */
49  	public void setFocus(ILocated focus);
50  	
51  	/**
52  	 * Run along straight-line to some target.
53  	 * @param target
54  	 */
55  	public void runStraight(ILocated target);
56  	
57  	/**
58  	 * Stop the running.
59  	 */
60  	public void stop(boolean stopMovement);	
61  	
62  	/**
63  	 * Adds another stuck detector to be used for stuck detection :)
64  	 * @param stuckDetector
65  	 */
66  	public void addStuckDetector(IStuckDetector stuckDetector);
67  	
68  	/**
69  	 * Removes stuck detector.
70  	 * @param stuckDetector
71  	 */
72  	public void removeStuckDetector(IStuckDetector stuckDetector);
73  	
74  	/**
75  	 * Removes ALL stuck detectors.
76  	 */
77  	public void clearStuckDetectors();
78  	
79  }