Package edu.tufts.hrilab.ava
Class MockAvaComponent
java.lang.Object
edu.tufts.hrilab.diarc.DiarcComponent
edu.tufts.hrilab.ava.MockAvaComponent
- All Implemented Interfaces:
AvaInterface,LidarInterface,MoveBaseInterface
-
Field Summary
Fields inherited from class edu.tufts.hrilab.diarc.DiarcComponent
executionLoopCycleTime, log, shouldRunExecutionLoop -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected List<org.apache.commons.cli.Option>Override this method to define command line options available in sub-class.approachLocation(Symbol location) go to the location and then move forward until certain distance from object in frontapproachLocation(Symbol desiredLocation, Symbol initialLocation) go to the location and then move forward until certain distance from object in frontvoidObserver to check if the robot is at the specified named locationvoidvoidvoiddisplayRobot(ai.thinkingrobots.trade.TRADEServiceInfo displayService) voidvoidClose an RMS session with the robot.doubleGet the battery level of the Ava robot in percentage.doubleGet the current camera tilt position of the robot.Get a list of dynamic obstacles that the robot detects.floatfloat[]List<byte[]>org.apache.commons.lang3.tuple.Pair<javax.vecmath.Point3d,javax.vecmath.Quat4d> getPose()double[]doubleGet the estimated remaining runtime of the robot in seconds.doublegetZLift()Get the current Z lift position of the robot.Send the robot dock location and then dock it.goToDock()goToLocation(double xdest, double ydest, double quat_x, double quat_y, double quat_z, double quat_w, boolean wait) go to the point and orientationgoToLocation(Symbol location) go to the location and then move forward until certain distance from object in frontgoToLocation(Symbol location, boolean wait) Attempt to reach a named goal location.goToLocation(Symbol desiredLocation, Symbol initialLocation) go to the location and then move forward until certain distance from object in frontgoToLocation(javax.vecmath.Point3d location, javax.vecmath.Quat4d orientation, boolean wait) voidinit()Perform any component initialization.voidvoidvoidvoidinterruptWaitForLearningGoalSubmissionOrQuestionAnswer(Symbol agent, Predicate learnedActionPredicate) voidbooleanisDocked()Return true if robot is dockedisMoving()voidlocationRefToName(Symbol ref) lookAt(double x, double y, double duration) Look at a vector.lookAtObstacle(Obstacle obs) moveForward(double distance) Drive straight forward along the robot's current heading using direct velocity commands until odometry shows the requested distance has been covered.protected voidparseArgs(org.apache.commons.cli.CommandLine cmdLine) Override this method to parse command line args in the sub-class.voidplayAudioClip(String fileName) voidplayAudioFile(String fileName) voidregisterForAvaStatisticsNotifications(ai.thinkingrobots.trade.TRADEServiceInfo callback) rssiQualityLabel(Symbol rssi) saveLocationTag(Symbol location) setCameraTilt(double tilt) Set the Z lift of the robot.voidsetPose(javax.vecmath.Point3d location, javax.vecmath.Quat4d orientation) voidsetPoseGlobal(double x, double y, double theta) setZLift(double lift) Set the Z lift of the robot.stop()voidvoidvoidvoidunregisterForAvaStatisticsNotifications(ai.thinkingrobots.trade.TRADEServiceInfo callback) voidwaitForDuration(long seconds) waitForLearningGoalSubmissionOrQuestionAnswer(Symbol agent, String questionString, List<Term> responseForms, Predicate learnedActionPredicate) voidMethods inherited from class edu.tufts.hrilab.diarc.DiarcComponent
attachShutdownHook, createInstance, createInstance, createInstance, executionLoop, getMyGroupConstraints, getMyGroups, getMyService, getMyServices, main, postRegistrationInit, shutdown, shutdownComponent
-
Constructor Details
-
MockAvaComponent
public MockAvaComponent()
-
-
Method Details
-
parseArgs
protected void parseArgs(org.apache.commons.cli.CommandLine cmdLine) Description copied from class:DiarcComponentOverride this method to parse command line args in the sub-class. Called directly after construction to pass runtime values that will override default values. This should parse all the options that additionalUsageInfo provides.- Overrides:
parseArgsin classDiarcComponent
-
setPoseGlobal
public void setPoseGlobal(double x, double y, double theta) - Specified by:
setPoseGlobalin interfaceMoveBaseInterface
-
getPoseGlobalQuat
public double[] getPoseGlobalQuat()- Specified by:
getPoseGlobalQuatin interfaceMoveBaseInterface
-
additionalUsageInfo
Description copied from class:DiarcComponentOverride this method to define command line options available in sub-class. This should be paired with a parseArgs implementation.- Overrides:
additionalUsageInfoin classDiarcComponent- Returns:
-
registerForAvaStatisticsNotifications
public void registerForAvaStatisticsNotifications(ai.thinkingrobots.trade.TRADEServiceInfo callback) -
unregisterForAvaStatisticsNotifications
public void unregisterForAvaStatisticsNotifications(ai.thinkingrobots.trade.TRADEServiceInfo callback) -
init
public void init()Description copied from class:DiarcComponentPerform any component initialization. This should not be used for setting local fields to default values as was the case in DIARC. This method is called after the constructor, and after parseArgs. Setting default values should be done in field declaration or in the constructor.- Overrides:
initin classDiarcComponent
-
displayRobot
public void displayRobot(ai.thinkingrobots.trade.TRADEServiceInfo displayService) - Specified by:
displayRobotin interfaceAvaInterface
-
goToDock
- Specified by:
goToDockin interfaceAvaInterface
-
saveLocationTag
-
goHomePrimitive
Description copied from interface:AvaInterfaceSend the robot dock location and then dock it.- Specified by:
goHomePrimitivein interfaceAvaInterface- Returns:
- success or error
-
stopFollowing
- Specified by:
stopFollowingin interfaceAvaInterface
-
avaFollow
- Specified by:
avaFollowin interfaceAvaInterface
-
moveForward
Description copied from interface:AvaInterfaceDrive straight forward along the robot's current heading using direct velocity commands until odometry shows the requested distance has been covered.- Specified by:
moveForwardin interfaceAvaInterface- Parameters:
distance- meters to travel forward
-
endSession
Description copied from interface:AvaInterfaceClose an RMS session with the robot.- Specified by:
endSessionin interfaceAvaInterface- Returns:
- Justification true if successful
-
getBatteryLevel
public double getBatteryLevel()Description copied from interface:AvaInterfaceGet the battery level of the Ava robot in percentage.- Specified by:
getBatteryLevelin interfaceAvaInterface- Returns:
- double 0-100
-
getRuntime
public double getRuntime()Description copied from interface:AvaInterfaceGet the estimated remaining runtime of the robot in seconds.- Specified by:
getRuntimein interfaceAvaInterface- Returns:
- runtime seconds
-
getZLift
public double getZLift()Description copied from interface:AvaInterfaceGet the current Z lift position of the robot.- Specified by:
getZLiftin interfaceAvaInterface- Returns:
- double percentage of lift 0-100
-
setZLift
Description copied from interface:AvaInterfaceSet the Z lift of the robot.- Specified by:
setZLiftin interfaceAvaInterface- Parameters:
lift- percentage to set z lift to 0-100
-
getCameraTilt
public double getCameraTilt()Description copied from interface:AvaInterfaceGet the current camera tilt position of the robot.- Specified by:
getCameraTiltin interfaceAvaInterface- Returns:
- double percentage of tilt 0-100
-
setCameraTilt
Description copied from interface:AvaInterfaceSet the Z lift of the robot.- Specified by:
setCameraTiltin interfaceAvaInterface- Parameters:
tilt- percentage to set z lift to 0-100
-
getDynamicObstacles
Description copied from interface:AvaInterfaceGet a list of dynamic obstacles that the robot detects.- Specified by:
getDynamicObstaclesin interfaceAvaInterface- Returns:
- Object containing obstacles list
-
isDocked
public boolean isDocked()Description copied from interface:AvaInterfaceReturn true if robot is docked- Specified by:
isDockedin interfaceAvaInterface- Returns:
- boolean
-
lookAtObstacle
- Specified by:
lookAtObstaclein interfaceAvaInterface
-
lookAt
Description copied from interface:AvaInterfaceLook at a vector.- Specified by:
lookAtin interfaceAvaInterface- Parameters:
x- position xy- position yduration- length of look at event
-
getLaserScan
public float[] getLaserScan()- Specified by:
getLaserScanin interfaceLidarInterface
-
getLaserAngleIncrement
public float getLaserAngleIncrement()- Specified by:
getLaserAngleIncrementin interfaceLidarInterface
-
getPose
public org.apache.commons.lang3.tuple.Pair<javax.vecmath.Point3d,javax.vecmath.Quat4d> getPose() -
setPose
public void setPose(javax.vecmath.Point3d location, javax.vecmath.Quat4d orientation) -
goToLocation
Description copied from interface:MoveBaseInterfacego to the location and then move forward until certain distance from object in front- Specified by:
goToLocationin interfaceMoveBaseInterface- Parameters:
location- name of the desired location to navigate to- Returns:
- justification specifying if the robot navigated to the location
-
goToLocation
Description copied from interface:MoveBaseInterfaceAttempt to reach a named goal location.- Specified by:
goToLocationin interfaceMoveBaseInterface- Parameters:
location- - name of the goal location
-
goToLocation
Description copied from interface:MoveBaseInterfacego to the location and then move forward until certain distance from object in front- Specified by:
goToLocationin interfaceMoveBaseInterface- Parameters:
desiredLocation- name of the desired location to navigate toinitialLocation- name of the initial location to navigate from -- used for conditions and effects- Returns:
- justification specifying if the robot navigated to the location
-
goToLocation
public Justification goToLocation(javax.vecmath.Point3d location, javax.vecmath.Quat4d orientation, boolean wait) -
goToLocation
public Justification goToLocation(double xdest, double ydest, double quat_x, double quat_y, double quat_z, double quat_w, boolean wait) Description copied from interface:MoveBaseInterfacego to the point and orientation- Specified by:
goToLocationin interfaceMoveBaseInterface- Parameters:
xdest- x pointydest- y pointquat_x- x quaternion valuequat_y- y quaternion valuequat_z- z quaternion valuequat_w- w quaternion valuewait- should robot wait until reached desired point and orientation- Returns:
- justification if the robot reach the desired point and orientation
-
approachLocation
Description copied from interface:MoveBaseInterfacego to the location and then move forward until certain distance from object in front- Specified by:
approachLocationin interfaceMoveBaseInterface- Parameters:
location- name of the desired location to navigate to- Returns:
- justification specifying if the robot navigated to the location
-
approachLocation
Description copied from interface:MoveBaseInterfacego to the location and then move forward until certain distance from object in front- Specified by:
approachLocationin interfaceMoveBaseInterface- Parameters:
desiredLocation- name of the desired location to navigate toinitialLocation- name of the initial location to navigate from -- used for conditions and effects- Returns:
- justification specifying if the robot navigated to the location
-
stop
- Specified by:
stopin interfaceMoveBaseInterface
-
isMoving
- Specified by:
isMovingin interfaceMoveBaseInterface
-
checkAt
Description copied from interface:MoveBaseInterfaceObserver to check if the robot is at the specified named location- Specified by:
checkAtin interfaceMoveBaseInterface- Parameters:
locationTerm- predicate to observe in form: at(?actor, ?location)- Returns:
- observation result
-
parseTime
- Specified by:
parseTimein interfaceAvaInterface
-
getWifiSignalStrength
- Specified by:
getWifiSignalStrengthin interfaceAvaInterface
-
measureWifiRssi
- Specified by:
measureWifiRssiin interfaceAvaInterface
-
locationRefToName
- Specified by:
locationRefToNamein interfaceAvaInterface
-
rssiQualityLabel
- Specified by:
rssiQualityLabelin interfaceAvaInterface
-
measureTemperatureDegrees
- Specified by:
measureTemperatureDegreesin interfaceAvaInterface
-
blockToCharge
public void blockToCharge()- Specified by:
blockToChargein interfaceAvaInterface
-
interruptChargingBlock
public void interruptChargingBlock()- Specified by:
interruptChargingBlockin interfaceAvaInterface
-
disableMicrophone
public void disableMicrophone() -
enableMicrophone
public void enableMicrophone() -
triggerWW
public void triggerWW() -
playAudioFile
-
playAudioClip
-
interruptListenForWWandASR
public void interruptListenForWWandASR()- Specified by:
interruptListenForWWandASRin interfaceAvaInterface
-
listenForWWandASR
public void listenForWWandASR()- Specified by:
listenForWWandASRin interfaceAvaInterface
-
getDockRefId
- Specified by:
getDockRefIdin interfaceAvaInterface
-
waitForReadyAck
public void waitForReadyAck()- Specified by:
waitForReadyAckin interfaceAvaInterface
-
interruptWaitForReadyAck
public void interruptWaitForReadyAck()- Specified by:
interruptWaitForReadyAckin interfaceAvaInterface
-
getMapImages
-
getMapMetadatas
-
getAllTags
-
interruptWaitForLearningGoalSubmissionOrQuestionAnswer
-
waitForLearningGoalSubmissionOrQuestionAnswer
-
waitForDuration
public void waitForDuration(long seconds) - Specified by:
waitForDurationin interfaceAvaInterface
-
interruptWaitForDuration
public void interruptWaitForDuration()- Specified by:
interruptWaitForDurationin interfaceAvaInterface
-
enableAdminMode
public void enableAdminMode()- Specified by:
enableAdminModein interfaceAvaInterface
-
disableAdminMode
public void disableAdminMode()- Specified by:
disableAdminModein interfaceAvaInterface
-
switchDisplayToTRACS
public void switchDisplayToTRACS() -
switchDisplayToTelepresencePrimitive
public void switchDisplayToTelepresencePrimitive()
-