View Javadoc

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