View Javadoc

1   package cz.cuni.amis.pogamut.ut2004.agent.navigation;
2   
3   import java.util.logging.Level;
4   
5   import cz.cuni.amis.pogamut.base.agent.navigation.IStuckDetector;
6   import cz.cuni.amis.pogamut.base.utils.logging.LogCategory;
7   import cz.cuni.amis.pogamut.base3d.worldview.object.ILocated;
8   import cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.NavPoint;
9   
10  /**
11   * This class is meant to provide easy "get-back-to-navigation-graph-in-order-I-can-safely-navigate-through-map"
12   * implementation. 
13   * 
14   * @author Jimmy
15   */
16  public interface IUT2004GetBackToNavGraph {	
17  		
18  	/**
19  	 * Returns nearest {@link NavPoint} to current bot's location.
20  	 * 
21  	 * @return
22  	 */
23  	public NavPoint getNearestNavPoint();
24  	
25  	/**
26  	 * Whether the bot is currently on some {@link NavPoint}.
27  	 */
28  	public boolean isOnNavGraph();
29  	
30  	/**
31  	 * Whether the class is executing (== working == trying to get the bot back on NavGraph == to make {@link UT2004GetBackToNavGraph#isOnNavGraph()} true).
32  	 * @return
33  	 */
34  	public boolean isExecuting();
35  	
36  	/**
37       * Sets focus of the bot when navigating (when using this object to run to some location target)!
38       * To reset focus call this method with null parameter.
39       * 
40       * @param located
41       */
42      public void setFocus(ILocated located);
43      
44  	/**
45  	 * Start the class, let it take the bot back to navigation graph.
46  	 */
47  	public void backToNavGraph();
48  	/**
49  	 * Stop the class.
50  	 */
51  	public void stop();
52  		
53  	/**
54  	 * Adds another stuck detector to be used for stuck detection :)
55  	 * @param stuckDetector
56  	 */
57  	public void addStuckDetector(IStuckDetector stuckDetector);
58  	
59  	/**
60  	 * Removes stuck detector.
61  	 * @param stuckDetector
62  	 */
63  	public void removeStuckDetector(IStuckDetector stuckDetector);
64  	
65  	/**
66  	 * Removes ALL stuck detectors.
67  	 */
68  	public void clearStuckDetectors();
69  
70  	/**
71  	 * Returns component logger. 
72  	 * @return
73  	 */
74  	public LogCategory getLog();
75  	
76  }