|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PathController
The PathController guides a MoveController to a destination. It can not plan a route, but will navigate to a set of coordinates and possibly avoid obstacles along the way. It uses a collection of waypoints as a queue. The PathController constructor very likely accepts a MoveController and PoseProvider.
Method Summary | |
---|---|
void |
addListener(WayPointListener aListener)
Adds a WayPointListener
that will be notified with the actual waypoint it reached. |
void |
addTargetListener(WayPointListener targetListener)
Adds a waypoint listener that will be notified with the theoretical target waypoint it reached. |
void |
addWayPoint(WayPoint aWayPoint)
Adds a WayPoint to the route. |
void |
flushQueue()
Stops the robot and empties the queue of waypoints (the route) |
void |
followRoute(Collection<WayPoint> theRoute,
boolean immediateReturn)
Moves the robot through the sequence of waypoints contained in the route. |
MoveController |
getMoveController()
Note: There is no corresponding setMoveController() method because the type of robot vehicle could not change after the program starts, unless it was physically a transformer robot. |
PoseProvider |
getPoseProvider()
Get a reference to the PoseProvider being used as a localizer. |
void |
goTo(double x,
double y)
This method causes the robot to travel to a new location. |
void |
goTo(WayPoint destination)
This method causes the robot to travel to a new location. |
void |
goTo(WayPoint destination,
boolean immediateReturn)
This method causes the robot to travel to a new location. |
void |
interrupt()
Stops the robot immediately; preserves the rest of the queue |
void |
resume()
Resumes following the route |
void |
setPoseProvider(PoseProvider aProvider)
Sets a new PoseProvider for the PathController robot to use. |
Method Detail |
---|
void goTo(WayPoint destination, boolean immediateReturn)
WayPoint
destination
- the destination MoveController
immediateReturn
- true for non-blocking, false for blockingvoid goTo(WayPoint destination)
destination
- the destination waypointvoid goTo(double x, double y)
x
- The x coordinatey
- The y coordinatevoid followRoute(Collection<WayPoint> theRoute, boolean immediateReturn)
theRoute
- immediateReturn
- ; if false the method returns when the route is emptyvoid flushQueue()
void interrupt()
void resume()
void addWayPoint(WayPoint aWayPoint)
aWayPoint
- void addListener(WayPointListener aListener)
WayPointListener
that will be notified with the actual waypoint it reached.
aListener
- void addTargetListener(WayPointListener targetListener)
targetListener
- MoveController getMoveController()
PoseProvider getPoseProvider()
void setPoseProvider(PoseProvider aProvider)
aProvider
- the new PoseProvider
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |