kaos.robots.naimtsimulator
Class Bot

java.lang.Object
  extended by kaos.robots.naimtsimulator.Bot
All Implemented Interfaces:
MobileObject, SimObject

public class Bot
extends java.lang.Object
implements MobileObject


Field Summary
static double RANGE
           
static double ROT_SPEED
           
static double[] SONARS
           
static double SPEED
           
 
Constructor Summary
Bot(Simulator sim, KBot kbot)
           
Bot(Simulator sim, java.lang.String name)
           
Bot(Simulator sim, java.lang.String name, boolean connectToKaos)
           
 
Method Summary
 java.lang.String captureImage()
           
 double distanceFromSonar(double x, double y, double th, double range)
           
 Pose getDesiredPose()
           
 double getHeight()
           
 Command getK()
           
 Command getKAoSRobot()
           
 java.lang.String getName()
           
 Pose getPose()
           
 java.lang.String getSonarReading()
           
 SonarReading getSonarReading(int sonarID)
           
 double getWidth()
           
static boolean poseEqual(Pose p, Pose q)
           
 void setDesiredPose(Pose pose)
           
 void setPose(Pose pose)
           
 void step(int millisecondsSinceLastStep)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SONARS

public static double[] SONARS

RANGE

public static double RANGE

SPEED

public static double SPEED

ROT_SPEED

public static double ROT_SPEED
Constructor Detail

Bot

public Bot(Simulator sim,
           java.lang.String name)

Bot

public Bot(Simulator sim,
           java.lang.String name,
           boolean connectToKaos)

Bot

public Bot(Simulator sim,
           KBot kbot)
Method Detail

getKAoSRobot

public Command getKAoSRobot()

getK

public Command getK()

getName

public java.lang.String getName()

getSonarReading

public java.lang.String getSonarReading()
Returns:
a string representing the state of all sonar sensors.

getSonarReading

public SonarReading getSonarReading(int sonarID)

setPose

public void setPose(Pose pose)
Specified by:
setPose in interface SimObject

getPose

public Pose getPose()
Specified by:
getPose in interface SimObject

getWidth

public double getWidth()
Specified by:
getWidth in interface SimObject

getHeight

public double getHeight()
Specified by:
getHeight in interface SimObject

distanceFromSonar

public double distanceFromSonar(double x,
                                double y,
                                double th,
                                double range)
Specified by:
distanceFromSonar in interface SimObject
Parameters:
x - The x location of the sonar.
y - The y location of the sonar.
th - The angle of the sonar.
range - The maximum distance that can be returned.

getDesiredPose

public Pose getDesiredPose()
Specified by:
getDesiredPose in interface MobileObject

setDesiredPose

public void setDesiredPose(Pose pose)
Specified by:
setDesiredPose in interface MobileObject

step

public void step(int millisecondsSinceLastStep)
Specified by:
step in interface MobileObject

captureImage

public java.lang.String captureImage()

poseEqual

public static boolean poseEqual(Pose p,
                                Pose q)