lejos.robotics.proposal
Class ArcPoseController

java.lang.Object
  extended by lejos.robotics.proposal.ArcPoseController
All Implemented Interfaces:
PoseController

public class ArcPoseController
extends Object
implements PoseController

This class directs a pilot from the current known coordinates to a destination set of coordinates. The ArcPoseController is not capable of avoiding objects or planning a route. It can only drive in a straight line that is not obstructed.


Constructor Summary
ArcPoseController(ArcPilot pilot, PoseProvider poseProvider)
           
 
Method Summary
 ArcPilot getPilot()
          Note: There is no corresponding setPilot() 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.
 Pose goTo(float x, float y)
          Travels to the coordinates specified.
 Pose goTo(Point destination)
          Travels to the coordinates in the destination Point.
 void setPoseProvider(PoseProvider replacement)
          Sets a new PoseProvider for the PoseController robot to use.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArcPoseController

public ArcPoseController(ArcPilot pilot,
                         PoseProvider poseProvider)
Method Detail

getPilot

public ArcPilot getPilot()
Description copied from interface: PoseController
Note: There is no corresponding setPilot() method because the type of robot vehicle could not change after the program starts, unless it was physically a transformer robot.

Specified by:
getPilot in interface PoseController
Returns:
the pilot

getPoseProvider

public PoseProvider getPoseProvider()
Description copied from interface: PoseController
Get a reference to the PoseProvider being used as a localizer.

Specified by:
getPoseProvider in interface PoseController
Returns:
the pose provider

setPoseProvider

public void setPoseProvider(PoseProvider replacement)
Description copied from interface: PoseController
Sets a new PoseProvider for the PoseController robot to use. Example: If the robot moves from one environment (indoors) to another environment (outdoors) it might want to change to another method of localization if a change in environment is detected.

Specified by:
setPoseProvider in interface PoseController
Parameters:
replacement - the new PoseProvider

goTo

public Pose goTo(Point destination)
Description copied from interface: PoseController
Travels to the coordinates in the destination Point. If it can't reach the destination, it tries to get as close as possible before giving up and reporting the actual coordinates (Pose) achieved.

Specified by:
goTo in interface PoseController
Returns:
The new pose it achieved.

goTo

public Pose goTo(float x,
                 float y)
Description copied from interface: PoseController
Travels to the coordinates specified. If it can't reach the destination, it tries to get as close as possible before giving up and reporting the actual coordinates (Pose) achieved.

Specified by:
goTo in interface PoseController
Parameters:
x - the x coordinate of the target point
y - the y co-ordinate of the target point
Returns:
The new pose it achieved.