dLife Home Page

dlife.robot.pioneer
Class PioneerDifferentialDrive

java.lang.Object
  extended by java.util.Observable
      extended by dlife.robot.Device
          extended by dlife.robot.DifferentialDriveEffector
              extended by 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

Field Summary
 
Fields inherited from class dlife.robot.DifferentialDriveEffector
vL, vR
 
Fields inherited from class dlife.robot.Device
DEFAULT_GUI_UPDATE_DELAY, DEFAULT_READ_DELAY, myRobot, readCount
 
Constructor Summary
PioneerDifferentialDrive()
          Construct a new PioneerDifferentialDrive.
 
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.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PioneerDifferentialDrive

public PioneerDifferentialDrive()
Construct a new PioneerDifferentialDrive.

Method Detail

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

dLife Home Page