examples.dlife.robot.hemisson
Class HemissonSonarDrone
java.lang.Object
dlife.robot.Controller
examples.dlife.robot.hemisson.HemissonSonarDrone
public class HemissonSonarDrone
- extends Controller
A drone controller for a Hemisson with a sonar sensor. The sonar sensor is
set to the maximum number of echos and the maximum distance. It also creates
a DiferentialDrive effector to allow the robot to be controlled via the GUI.
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
HemissonSonarDrone.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 and the GUI components for the Motion and Sonar will
appear in the ControlCenter.
The source code for this class is contained in the file:
- Version:
- Jun 30, 2007
- Author:
- Grant Braught, Dickinson College
|
Method Summary |
void |
startUp(Robot robot)
Create a HemissonSonar sensor and a DifferentialDrive and add them to the
robot. |
void |
step()
This step method does not do anything. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HemissonSonarDrone
public HemissonSonarDrone()
startUp
public void startUp(Robot robot)
- Create a HemissonSonar sensor and a DifferentialDrive and add them to the
robot.
- Specified by:
startUp in class Controller
- Parameters:
robot - the Robot that this Controller will be controlling.
step
public void step()
- This step method does not do anything. The HemissonSonarDrone can be
controlled via the GUI controls.
- Specified by:
step in class Controller