|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnao.motion.Navigator
public class Navigator
Provides methods to move the Nao around a 2D space populated with landmarks (naomarks). The space is assumed to be open so that the Nao can walk directly to any landmark. The landmarks are assumed to be at the edges of the space (i.e. on the walls of a room). No obstacle avoidance or route planning is performed.
Constructor Summary | |
---|---|
Navigator(ExtendedNao nao,
LandmarkMap map)
|
Method Summary | |
---|---|
static double |
calculateMinimumTurn(double destinationHeading,
double robotOrientation)
Calculate the minimum positive or negative angle between the current robot orientation and a desired orientation (heading). |
Location |
getLocation()
Get the current location of the robot (using TrilatLocaliser). |
void |
goToLandmark(int id)
Walk to the specified landmark. |
void |
goToLocation(Location loc)
Walk to an arbitrary point in space. |
void |
goToLocation(Location loc,
double maxBlindDistance)
Walk to an arbitrary point in space. |
void |
hideMapDisplay()
Hide the map window. |
void |
showMapDisplay()
Display a window showing the landmark map and, if known, the current location of the robot. |
void |
turnToHeading(double heading)
Turn the robot to an absolute heading (orientation) (in radians). |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Navigator(ExtendedNao nao, LandmarkMap map)
Method Detail |
---|
public Location getLocation()
public void goToLandmark(int id)
public void goToLocation(Location loc) throws LostException
TrilatLocaliser
). This method blocks until arrival or the robot gets lost.
LostException
- If the robot cannot determine its locationpublic void goToLocation(Location loc, double maxBlindDistance) throws LostException
TrilatLocaliser
). This method blocks until arrival or the robot gets lost.
maxBlindDistance
- The maximum distance to walk before checking the robot's location again (in metres)
LostException
- If the robot cannot determine its locationpublic void turnToHeading(double heading)
public static double calculateMinimumTurn(double destinationHeading, double robotOrientation)
public void showMapDisplay()
public void hideMapDisplay()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |