|
dLife Home Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.Observable
dlife.robot.Robot
dlife.robot.util.kteam.KTeamRobot
dlife.robot.khepera2.Khepera2
public class Khepera2
Class for communicating with a Khepera2 robot. The Khepera2 can be communicated either via a serial device file (unix) or via bluetooth wireless (requires a bluetooth turret). When running with the bluetooth turret, setting its communications with the Khepera to 38400 bits/s gives more reliable communications than the 115200 bits/s setting.
| Field Summary |
|---|
| Fields inherited from class dlife.robot.util.kteam.KTeamRobot |
|---|
BLUETOOTH, SERIAL |
| Constructor Summary | |
|---|---|
Khepera2()
Create a new Khepera2 robot. |
|
Khepera2(KTeamCommDelegate delegate)
Create a new Khepera2 robot that uses the provided delegate to communicate with the robot. |
|
Khepera2(String device,
int type)
Create a new Khepera2 robot. |
|
| Method Summary | |
|---|---|
String |
getBluetoothNamePatternRegEx()
Return a regular expression that matches the bluetooth name of all of the Khepera2 bluetooth modules. |
String |
getRobotTypeName()
Return the name of the robot - "Khepera2" |
void |
shutDown()
Invoked to shut down the Khepera2. |
void |
shutDown(boolean playShutDownSequence)
Invoked to shut down the Khepera2. |
void |
startUp()
This method establishes a connection to the Khepera2 robot, marks it as alive and then flashes the Khepera2 LED's to indicate that it is ready to go. |
void |
startUp(boolean playStartupSequence)
This method establishes a connection to the Khepera2 robot, marks it as alive and then if the parameter is true it flashes the Khepera2's LEDs to indicate that it is ready to go. |
| Methods inherited from class dlife.robot.util.kteam.KTeamRobot |
|---|
sendMessage, sendMessage |
| Methods inherited from class dlife.robot.Robot |
|---|
addDevice, freeze, getDevices, getRunTime, isAlive, removeDevice, setAlive |
| 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 |
|---|
public Khepera2()
RobotCreationCanceledException - if the user cancels the creation
while being asked to pick the device to use for
communication.
RobotCommunicationException - if communication cannot be
established with the robot elected by the user.
public Khepera2(String device,
int type)
device - the full path to the device file or the bluetooth address
to be used to communicate with the Khepera2.type - the type of connection (SERIAL or BLUETOOTH).
RobotCommunicationException - if communication cannot be
established with the robot on the device file selected by
user.public Khepera2(KTeamCommDelegate delegate)
delegate - the KTeamCommDelegate to use to communicate with the
robot.| Method Detail |
|---|
public void startUp(boolean playStartupSequence)
playStartupSequence - true to play startup sequence, false to
startup silently.
RobotCommunicationException - if unable to communicate with the
Khepera2.public void startUp()
startUp in class KTeamRobotRobotCommunicationException - if unable to communicate with the
Khepera2.public void shutDown(boolean playShutDownSequence)
playShutDownSequence - true to play the shutdown sequence, false to
shutdown silently.
RobotCommunicationException - if unable to communicate with the
Khepera2.public void shutDown()
shutDown in class KTeamRobotRobotCommunicationException - if unable to communicate with the
Khepera2.public String getBluetoothNamePatternRegEx()
getBluetoothNamePatternRegEx in class KTeamRobotpublic String getRobotTypeName()
getRobotTypeName in class KTeamRobot
|
dLife Home Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||