dlife.robot.pioneer
Class PioneerDifferentialDrive
java.lang.Object
java.util.Observable
dlife.robot.Device
dlife.robot.DifferentialDriveEffector
dlife.robot.pioneer.PioneerDifferentialDrive
public class PioneerDifferentialDrive
- extends DifferentialDriveEffector
A class for controlling the motion of a Pioneer robot.
- Version:
- Jun 16, 2008
- Author:
- Grant Braught, Dickinson College
|
Method Summary |
static void |
main(String[] args)
A little main method that lets a Pioneer be driven around using the
control. |
void |
readStateFromRobot()
Does nothing. |
protected void |
setRobotWheelSpeeds(double left,
double right)
Send a message to the Pioneer to set the speeds of its wheels according
to the specified speeds. |
| Methods inherited from class dlife.robot.DifferentialDriveEffector |
createGUIObjects, freeze, getLeftWheelSpeed, getRightWheelSpeed, getRotation, getTranslation, move, rotate, setWheelSpeeds, shutDown, translate |
| Methods inherited from class dlife.robot.Device |
getAutoRead, getGUI, getGUIUpdateDelay, getReadDelay, getRobot, getSensorReadCount, getSensorReadRate, setAutoRead, setGUIUpdateDelay, setReadDelay, setRobot, startAutoReadTimer, startUp, stopAutoReadTimer |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PioneerDifferentialDrive
public PioneerDifferentialDrive()
- Construct a new PioneerDifferentialDrive.
setRobotWheelSpeeds
protected void setRobotWheelSpeeds(double left,
double right)
- Send a message to the Pioneer to set the speeds of its wheels according
to the specified speeds. The provided speeds should be in the range
[-1...1].
Note that the range of wheel speeds for the physical Pioneer is set in
its firmware. The server will accept the values in the range [-1...1] and
scale it to a percentage of the maximum wheel speed for the robot.
- Specified by:
setRobotWheelSpeeds in class DifferentialDriveEffector
- Parameters:
left - the speed of the left wheel.right - the speed of the right wheel.
- Throws:
RobotCommunicationException - if unable to communicate with the
Pioneer.
readStateFromRobot
public void readStateFromRobot()
- Does nothing. The state is assumed to be what was sent to the robot for a
PioneerDifferentialDrive.
- Specified by:
readStateFromRobot in class Device
main
public static void main(String[] args)
throws Exception
- A little main method that lets a Pioneer be driven around using the
control.
- Parameters:
args - none
- Throws:
Exception