examples.dlife.robot.hemisson
Class HemiWander
java.lang.Object
dlife.robot.Controller
examples.dlife.robot.hemisson.HemiWander
public class HemiWander
- extends Controller
The Hemisson will wander around its environment without bumping into stuff
(well at least not too much!). Demonstrates the idea of a Sense/React agent
using feature extraction to simplify the control logic.
To run this example:
- Complete the Basic dLife Installation.
- Complete the Hemisson
Setup.
- Launch the
dlife.robot.gui.controlcenter
- Select
dlife.robot.hemisson.Hemisson in the "Robot:" drop down
list.
- Click the button next to the "Controller:" label.
- Navigate to the
dLifeDist/examples/dlife/robot/hemisson/
directory.
- Choose the
HemiWander.class file.
- Click the "Start Up" button.
- Choose the connection mechanism to be used:
- Serial Port: Use the file chooser to select the device file to which the
Hemisson is connected.
- Bluetooth: Select the desired Hemisson from the drop down list. You may
optionally associate a name with the robot's bluetooth address using the text
field and the "Set" button.
- Click "Connect"
- The Hemisson will beep and flash its lights to indicate that a connection
has been established. GUI displays for all of the sensors and effectors will
then appear in the ControlCenter.
- Click "Run"
The source code for this class is contained in the file:
- Version:
- Sep 3, 2008
- Author:
- Grant Braught, Dickinson College
|
Method Summary |
void |
startUp(Robot robot)
This method is invoked automatically when the Start Up button in the
ContolCenter is clicked. |
void |
step()
This method is invoked either once when the Step button is clicked or
periodically when the Run button is clicked. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HemiWander
public HemiWander()
startUp
public void startUp(Robot robot)
- Description copied from class:
dlife.robot.Controller
- This method is invoked automatically when the Start Up button in the
ContolCenter is clicked. This is typically where Sensors and Effectors
are created and added to the Robot.
- Specified by:
startUp in class Controller
- Parameters:
robot - the Robot that this Controller will be controlling.
step
public void step()
- Description copied from class:
dlife.robot.Controller
- This method is invoked either once when the Step button is clicked or
periodically when the Run button is clicked. The rate at which step is
invoked varies from Robot to Robot and is dependent on the computer being
used as well as the amount of processing done in step, the number and
type of sensors attached to the Robot and the robot's communication
latency.
- Specified by:
step in class Controller