kaos.robots.activmedia
Class ActivMedia

java.lang.Object
  extended by kaos.robots.core.KAoSRobot
      extended by kaos.robots.activmedia.ActivMedia
All Implemented Interfaces:
Command, FeedbackReceiver, KAoSObservable, KAoSObserver, ObserverManager, CommRelay, MobileRobot
Direct Known Subclasses:
AMptzCamera, AMsonar, Fran, Ivan

public class ActivMedia
extends KAoSRobot
implements MobileRobot, CommRelay, KAoSObserver


Nested Class Summary
 
Nested classes/interfaces inherited from class kaos.robots.core.KAoSRobot
KAoSRobot.RequestHandlerThread
 
Field Summary
 
Fields inherited from class kaos.robots.core.KAoSRobot
_actorID, _address, _agentDescription, _classificationListeners, _connectBtn, _connected, _connectToCmb, _currentActions, _enablingClasses, _enforcer, _gpsIsAvailable, _gpsOrigin, _listeners, _locator, _logger, _messageReceiver, _msgTransportService, _myLocator, _nickName, _registeredWithKAoS, _reniaCallback, _sender
 
Constructor Summary
ActivMedia()
           
 
Method Summary
 void CommRelayMoveTo(java.util.HashMap properties)
          CommRelayMoveTo
 void CommRelayStop()
          CommRelayStop
 boolean connect()
          This function is used to connect to robot
protected static boolean connectToRobotNative()
           
protected static boolean connectToSimNative(int port)
           
 void disconnect()
          This function is used to disconnect from robot
protected static void disconnectNative()
           
 Coordinate GetCoordinate()
          GetCoordinate
 java.lang.String getID()
          Return the unique identifier of this observer.
protected static double getMaxRotationalVelocityNative()
           
 double GetMaxTranslationalVelocity()
           
protected static double getMaxTranslationalVelocityNative()
           
 Coordinate GetNamedLocationCoordinate(java.util.HashMap properties)
           
 java.util.Iterator GetNamedLocations()
           
 Pose GetPose()
          GetPose
protected static double getTHNative()
           
protected static double getXNative()
           
protected static double getYNative()
           
 void init(java.lang.String[] args)
           
protected static void initNative(int gui)
           
 boolean IsMoving()
          IsMoving
protected static boolean isMovingNative()
           
 boolean IsTranslating()
           
protected static boolean isTranslatingNative()
           
 java.lang.Boolean IsTurning()
           
protected static boolean isTurningNative(double rate)
           
protected static void loadWorldNative(java.lang.String fname)
           
static void main(java.lang.String[] args)
           
protected static void moveDistance(double x)
           
 void MoveDistance(java.util.HashMap properties)
           
 void MoveTo(java.util.HashMap properties)
          MoveTo
protected static void moveToNative(int x, int y)
           
protected static int moveToState()
           
 void NameCurrentLocation(java.util.HashMap properties)
           
 void NameSpecifiedLocation(java.util.HashMap properties)
           
 void SearchDistance(java.util.HashMap properties)
           
protected static void setMaxMoveToSpeed(int speed)
           
protected static double setMaxRotationalVelocityNative(double v)
           
 void SetMaxTranslationalVelocity(java.util.HashMap properties)
           
protected static double setMaxTranslationalVelocityNative(double v)
           
 void setOrigin(java.util.HashMap properties)
           
protected static double setOriginNative(double x, double y, double th)
           
protected static void setPose(double x, double y, double th)
           
 void SetRotationalVelocity(java.util.HashMap properties)
           
protected static double setRotationalVelocityNative(double v)
           
 void SetTranslationalVelocity(java.util.HashMap properties)
           
protected static double setTranslationalVelocityNative(double v)
           
 void Stop()
          Stop
protected static void stopNative()
           
 void TurnRelative(java.util.HashMap properties)
           
protected static void turnRelNative(double degrees)
           
 void TurnTo(java.util.HashMap properties)
          TurnTo
protected static void turnToNative(float x, float y)
           
protected static int turnToState()
           
 void update(java.lang.String observableID, java.lang.String updateType, java.lang.Object updateCondition, java.lang.Object update)
          Receive an update from the KAoSObservable when the KAoSObservable has a change or event to report.
 
Methods inherited from class kaos.robots.core.KAoSRobot
assertNotLocatable, buildAID, buildConnectPanel, buildKAoSPanel, checkObligations, deregisterObserver, deregisterObserver, deregisterObserver, equals, ExtendTimeout, getActions, getActorID, getAgentDescription, getAgentDescriptionFromName, getAllAgents, getCurrentActions, getDetectedObjectObservable, getGPSCommPort, getLocator, getMTS, getPropertiesFromAID, getTimeoutPeriod, gpsIsAvailable, hashCode, initialize, isRegisteredWithKAoS, makeActionAllowable, notify, onAborted, onAccepted, onCompleted, onRefused, onStarted, printDebugString, receiveKAoSStatus, receiveMessage, registerObserver, registerObserver, registerObserver, registerObserver, registerWithKAoS, requestAction, requestAction, requestAction, requestAction, requestAction, requestAction, requestAction, requestAction, requestAction, requestAction, sendMessage, sendRequestToKaa, setRegisteredWithKAoS, updateTimeout
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActivMedia

public ActivMedia()
           throws AbortActionException
Throws:
AbortActionException
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

MoveTo

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

Specified by:
MoveTo in interface MobileRobot
Throws:
AbortActionException - with possible reasons: unable to move failed to find path failed to get to goal received stop command

TurnTo

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

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

TurnRelative

public void TurnRelative(java.util.HashMap properties)
                  throws AbortActionException
Throws:
AbortActionException

Stop

public void Stop()
          throws AbortActionException
Description copied from interface: MobileRobot
Stop

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

GetCoordinate

public Coordinate GetCoordinate()
Description copied from interface: MobileRobot
GetCoordinate

Specified by:
GetCoordinate in interface MobileRobot
Returns:
Coordinate containing X in meters Y in meters

GetPose

public Pose GetPose()
Description copied from interface: MobileRobot
GetPose

Specified by:
GetPose in interface MobileRobot
Returns:
Pose containing X in meters Y in meters TH in degrees

setOrigin

public void setOrigin(java.util.HashMap properties)

NameCurrentLocation

public void NameCurrentLocation(java.util.HashMap properties)

NameSpecifiedLocation

public void NameSpecifiedLocation(java.util.HashMap properties)

GetNamedLocations

public java.util.Iterator GetNamedLocations()

GetNamedLocationCoordinate

public Coordinate GetNamedLocationCoordinate(java.util.HashMap properties)

IsMoving

public boolean IsMoving()
Description copied from interface: MobileRobot
IsMoving

Specified by:
IsMoving in interface MobileRobot
Returns:
boolean where: true = moving false = not moving

IsTurning

public java.lang.Boolean IsTurning()

IsTranslating

public boolean IsTranslating()

SetMaxTranslationalVelocity

public void SetMaxTranslationalVelocity(java.util.HashMap properties)

SetTranslationalVelocity

public void SetTranslationalVelocity(java.util.HashMap properties)

SetRotationalVelocity

public void SetRotationalVelocity(java.util.HashMap properties)

GetMaxTranslationalVelocity

public double GetMaxTranslationalVelocity()

MoveDistance

public void MoveDistance(java.util.HashMap properties)

update

public void update(java.lang.String observableID,
                   java.lang.String updateType,
                   java.lang.Object updateCondition,
                   java.lang.Object update)
Description copied from interface: KAoSObserver
Receive an update from the KAoSObservable when the KAoSObservable has a change or event to report.

Specified by:
update in interface KAoSObserver
Parameters:
observableID - String identifying the KAoSObservable sending the update.
updateType - String indicating type of update.
update - Object containing the update.

getID

public java.lang.String getID()
Description copied from interface: KAoSObserver
Return the unique identifier of this observer.

Specified by:
getID in interface KAoSObserver
Returns:
String containing the unique ID of this observer.

SearchDistance

public void SearchDistance(java.util.HashMap properties)

CommRelayMoveTo

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

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

CommRelayStop

public void CommRelayStop()
                   throws java.lang.Exception
Description copied from interface: CommRelay
CommRelayStop

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

initNative

protected static void initNative(int gui)

loadWorldNative

protected static void loadWorldNative(java.lang.String fname)

connectToRobotNative

protected static boolean connectToRobotNative()

connectToSimNative

protected static boolean connectToSimNative(int port)

moveDistance

protected static void moveDistance(double x)

moveToNative

protected static void moveToNative(int x,
                                   int y)

moveToState

protected static int moveToState()

turnToState

protected static int turnToState()

turnToNative

protected static void turnToNative(float x,
                                   float y)

getXNative

protected static double getXNative()

getYNative

protected static double getYNative()

getTHNative

protected static double getTHNative()

isMovingNative

protected static boolean isMovingNative()

isTurningNative

protected static boolean isTurningNative(double rate)

isTranslatingNative

protected static boolean isTranslatingNative()

disconnectNative

protected static void disconnectNative()

stopNative

protected static void stopNative()

getMaxTranslationalVelocityNative

protected static double getMaxTranslationalVelocityNative()

setMaxTranslationalVelocityNative

protected static double setMaxTranslationalVelocityNative(double v)

setTranslationalVelocityNative

protected static double setTranslationalVelocityNative(double v)

setRotationalVelocityNative

protected static double setRotationalVelocityNative(double v)

setPose

protected static void setPose(double x,
                              double y,
                              double th)

getMaxRotationalVelocityNative

protected static double getMaxRotationalVelocityNative()

setMaxRotationalVelocityNative

protected static double setMaxRotationalVelocityNative(double v)

setOriginNative

protected static double setOriginNative(double x,
                                        double y,
                                        double th)

setMaxMoveToSpeed

protected static void setMaxMoveToSpeed(int speed)

turnRelNative

protected static void turnRelNative(double degrees)

main

public static void main(java.lang.String[] args)