|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object device.Device robot.Robot
public class Robot
The Robot class represents a robot that can move in two dimensions, that is in x and y direction. It will dynamically use if possible any devices provided by the device list given. A robot can have a current location and a goal position (in global coordinate system).
Field Summary | |
---|---|
(package private) Blobfinder |
bloFi
|
(package private) Position |
goal
|
(package private) IGripper |
gripper
|
(package private) Localize |
localizer
|
(package private) java.util.logging.Logger |
logger
Logging support |
(package private) Planner |
planner
|
(package private) Position2d |
posi
List of devices this robot can use if any of them are present. |
(package private) Position |
position
|
(package private) Ranger |
ranger0
|
(package private) Ranger |
ranger1
|
(package private) RangerLaser |
rLaser
|
(package private) java.lang.String |
robotId
|
(package private) RangerSonar |
rSonar
|
(package private) Simulation |
simu
|
(package private) double |
speed
|
(package private) double |
turnrate
|
Constructor Summary | |
---|---|
Robot()
Creates a Robot with initialized position and goal. |
|
Robot(Device deviceNode)
Deprecated. Use Robot(Device[]) instead.
This constructor has to be overwritten in any subclasses!
It will parse all devices from the given device and connects
it to the internal device list. |
|
Robot(Device[] robotDevList)
Creates a robot and provides the given devices to it. |
Method Summary | |
---|---|
(package private) void |
connectDevices(Device[] deviceList)
Initiate standard variables to this robot for the devices Note that if there are duplicate devices in the list always the last one of the same device code will be chosen! |
Blobfinder |
getBloFi()
|
Position |
getGoal()
|
IGripper |
getGripper()
|
Ranger |
getLaser()
|
Localize |
getLocalizer()
|
Planner |
getPlanner()
Returns the current Planner. |
Position2d |
getPosi()
|
Position |
getPosition()
|
java.lang.String |
getRobotId()
|
Simulation |
getSimu()
|
Ranger |
getSonar()
|
double |
getSpeed()
|
double |
getTurnrate()
|
void |
setGoal(Position newGoal)
Sets a goal if the robot possesses a navigation device. |
void |
setPosition(Position newPosition)
Sets the position if the robot possesses an position device. |
void |
setRobotId(java.lang.String name)
Sets this robot's string identifier. |
void |
setSpeed(double speed)
|
void |
setTurnrate(double turnrate)
|
void |
shutdown()
Shuts down this (and any sub-) device. |
java.lang.String |
toString()
|
Methods inherited from class device.Device |
---|
equals, getDevice, getDeviceIterator, getDeviceList, getDeviceListArray, getHost, getId, getIndex, getLogger, getPort, getSleepTime, getThreadName, isInList, isRunning, isSupported, isThreaded, matches, matchesList, run, runThreaded, setDeviceList, setHost, setName, setPort, setSleepTime, update |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
java.util.logging.Logger logger
Position2d posi
Ranger ranger1
RangerLaser rLaser
Ranger ranger0
RangerSonar rSonar
Planner planner
Localize localizer
IGripper gripper
Blobfinder bloFi
Simulation simu
double speed
double turnrate
Position position
Position goal
java.lang.String robotId
Constructor Detail |
---|
public Robot()
public Robot(Device deviceNode)
Robot(Device[])
instead.
This constructor has to be overwritten in any subclasses!
It will parse all devices from the given device and connects
it to the internal device list.
public Robot(Device[] robotDevList)
robotDevList
- The provided devices.Method Detail |
---|
public java.lang.String getRobotId()
public void setRobotId(java.lang.String name)
name
- The robot identifier.void connectDevices(Device[] deviceList)
deviceList
- The device list to search for applicable devices.public void setGoal(Position newGoal)
setGoal
in interface IRobot
newGoal
- New @see Position goal.public Position getGoal()
getGoal
in interface IRobot
public void setPosition(Position newPosition)
setPosition
in interface IRobot
newPosition
- New @see Position.public Position getPosition()
getPosition
in interface IRobot
public void shutdown()
Device
shutdown
in interface IDevice
shutdown
in class Device
public Planner getPlanner()
public Localize getLocalizer()
public IGripper getGripper()
public Position2d getPosi()
public Ranger getLaser()
public Ranger getSonar()
public Blobfinder getBloFi()
public Simulation getSimu()
public double getSpeed()
public double getTurnrate()
public void setSpeed(double speed)
speed
- the speed to setpublic void setTurnrate(double turnrate)
turnrate
- the turnrate to setpublic java.lang.String toString()
toString
in class Device
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |