kaos.robots.naimtsimulator
Class KBot

java.lang.Object
  extended by kaos.core.util.MethodCallRequestHandler
      extended by kaos.robots.core.KAoSRobot
          extended by kaos.robots.naimtsimulator.KBot
All Implemented Interfaces:
KAoSObservable, ObserverManager, FeedbackReceiver, HashMapRequestReceiver, MobileRobot

public class KBot
extends KAoSRobot
implements MobileRobot


Nested Class Summary
 
Nested classes/interfaces inherited from class kaos.robots.core.KAoSRobot
KAoSRobot.RequestHandlerThread
 
Field Summary
static Simulator _simSingleton
           
static int WAIT_TIME
           
 
Fields inherited from class kaos.robots.core.KAoSRobot
_actorID, _address, _agentDescription, _classificationListeners, _connectBtn, _connected, _connectToCmb, _currentActions, _enablingClasses, _enforcer, _gpsIsAvailable, _gpsOrigin, _learnedTasks, _learnedTaskVariables, _learning, _listeners, _logger, _messageReceiver, _myLocator, _nickName, _policyService, _port, _registeredWithKAoS, _registration, _reniaCallback, _sender, _subtasks, _taskName, _transportName
 
Fields inherited from class kaos.core.util.MethodCallRequestHandler
_helper, _mts, DEFAULT_NICKNAME, myLocator, myMessageReceiver, myMessageSender
 
Constructor Summary
KBot()
           
 
Method Summary
 java.lang.String CaptureImage()
           
 java.lang.String CaptureImage(Simulator sim)
           
 boolean connect()
          This function is used to connect to robot
 void disconnect()
          This function is used to disconnect from robot
 Coordinate GetCoordinate()
          GetCoordinate
 java.lang.Double GetMaximumEffectiveSonarRange()
           
 java.lang.Integer GetNumberOfSonarSensors()
           
 Pose GetPose()
           
 java.lang.Double GetSonarRange(java.util.HashMap properties)
           
 SonarReading GetSonarReading(java.util.HashMap properties)
           
 SerializableBufferImage GrabFrameAsBuffer()
           
 void init(java.lang.String[] args)
           
 boolean IsMoving(java.util.HashMap properties)
          IsMoving
 void Move(java.util.HashMap properties)
          MoveTo
 void registerKAoSExtensionComponentObserver(java.lang.String repType, java.lang.String ontType, KAoSObserver observer, java.lang.String updateType, java.io.Serializable updateCondition, KAoSEntityDescription entityDesc)
           
 void SetMaxEffectiveSonarRange(java.util.HashMap properties)
           
 void SetRotationalVelocity(java.util.HashMap properties)
           
 void SetTranslationalVelocity(java.util.HashMap properties)
           
 void Stop(java.util.HashMap properties)
          Stop
 void TurnTo(java.util.HashMap properties)
          TurnTo
 
Methods inherited from class kaos.robots.core.KAoSRobot
assertNotLocatable, buildAID, buildConnectPanel, checkObligations, checkPermissionForAction, deregisterObserver, deregisterObserver, deregisterObserver, executeLearnedAction, ExtendTimeout, getActions, getActorID, getAgentDescription, getAgentDescriptionFromName, getAllAgents, getCurrentActions, getDetectedObjectObservable, getGPSCommPort, getLocator, getMTS, getPropertiesFromAID, getTimeoutPeriod, gpsIsAvailable, isRegisteredWithKAoS, makeActionAllowable, modifySpatialProperties, notify, onAborted, onAccepted, onCompleted, onRefused, onStarted, printDebugString, processHashMapRequest, processHashMapRequest, processHashMapRequest, processHashMapRequest, receiveKAoSStatus, registerObserver, registerObserver, registerObserver, registerObserver, registerWithKAoS, registerWithSpatialProperties, requestAction, sendMessage, sendRequestToKaa, setRegisteredWithKAoS, startLearning, stopLearning, updateTimeout
 
Methods inherited from class kaos.core.util.MethodCallRequestHandler
bindToTransport, handleMsgContent, handleObjContent, initialize, receiveMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WAIT_TIME

public static int WAIT_TIME

_simSingleton

public static Simulator _simSingleton
Constructor Detail

KBot

public KBot()
Method Detail

init

public void init(java.lang.String[] args)
Overrides:
init in class KAoSRobot

connect

public boolean connect()
Description copied from class: KAoSRobot
This function is used to connect to robot

Specified by:
connect in class KAoSRobot
Returns:
boolean indicating true if successful and false if failed

disconnect

public void disconnect()
Description copied from class: KAoSRobot
This function is used to disconnect from robot

Specified by:
disconnect in class KAoSRobot

Move

public void Move(java.util.HashMap properties)
          throws java.lang.Exception
Description copied from interface: MobileRobot
MoveTo

Specified by:
Move in interface MobileRobot
Throws:
AbortActionException - with possible reasons: unable to move failed to find path failed to get to goal received stop command
java.lang.Exception

TurnTo

public void TurnTo(java.util.HashMap properties)
            throws java.lang.Exception
Description copied from interface: MobileRobot
TurnTo

Specified by:
TurnTo in interface MobileRobot
Throws:
AbortActionException - with possible reasons: unable to move
java.lang.Exception

Stop

public void Stop(java.util.HashMap properties)
          throws java.lang.Exception
Description copied from interface: MobileRobot
Stop

Specified by:
Stop in interface MobileRobot
Throws:
AbortActionException - with possible reasons: unable to stop
java.lang.Exception

GetCoordinate

public Coordinate GetCoordinate()
                         throws java.lang.Exception
Description copied from interface: MobileRobot
GetCoordinate

Specified by:
GetCoordinate in interface MobileRobot
Returns:
Coordinate containing X in meters Y in meters
Throws:
AbortActionException
java.lang.Exception

GetPose

public Pose GetPose()
             throws java.lang.Exception
Throws:
java.lang.Exception

IsMoving

public boolean IsMoving(java.util.HashMap properties)
                 throws java.lang.Exception
Description copied from interface: MobileRobot
IsMoving

Specified by:
IsMoving in interface MobileRobot
Returns:
boolean where: true = moving false = not moving
Throws:
AbortActionException
java.lang.Exception

SetTranslationalVelocity

public void SetTranslationalVelocity(java.util.HashMap properties)
                              throws java.lang.Exception
Specified by:
SetTranslationalVelocity in interface MobileRobot
Throws:
java.lang.Exception

SetRotationalVelocity

public void SetRotationalVelocity(java.util.HashMap properties)
                           throws java.lang.Exception
Specified by:
SetRotationalVelocity in interface MobileRobot
Throws:
java.lang.Exception

GetNumberOfSonarSensors

public java.lang.Integer GetNumberOfSonarSensors()

GetMaximumEffectiveSonarRange

public java.lang.Double GetMaximumEffectiveSonarRange()

GetSonarRange

public java.lang.Double GetSonarRange(java.util.HashMap properties)

GetSonarReading

public SonarReading GetSonarReading(java.util.HashMap properties)

SetMaxEffectiveSonarRange

public void SetMaxEffectiveSonarRange(java.util.HashMap properties)

CaptureImage

public java.lang.String CaptureImage()
                              throws java.lang.Exception
Returns:
The path where the Image was saved.
Throws:
java.lang.Exception

CaptureImage

public java.lang.String CaptureImage(Simulator sim)
                              throws java.lang.Exception
Throws:
java.lang.Exception

GrabFrameAsBuffer

public SerializableBufferImage GrabFrameAsBuffer()
                                          throws java.lang.Exception
Throws:
java.lang.Exception

registerKAoSExtensionComponentObserver

public void registerKAoSExtensionComponentObserver(java.lang.String repType,
                                                   java.lang.String ontType,
                                                   KAoSObserver observer,
                                                   java.lang.String updateType,
                                                   java.io.Serializable updateCondition,
                                                   KAoSEntityDescription entityDesc)
                                            throws NotLocatableException,
                                                   TransportFailure
Specified by:
registerKAoSExtensionComponentObserver in interface ObserverManager
Throws:
NotLocatableException
TransportFailure