Class MockAvaComponent

java.lang.Object
edu.tufts.hrilab.diarc.DiarcComponent
edu.tufts.hrilab.ava.MockAvaComponent
All Implemented Interfaces:
AvaInterface, LidarInterface, MoveBaseInterface

public class MockAvaComponent extends DiarcComponent implements AvaInterface
  • Constructor Details

    • MockAvaComponent

      public MockAvaComponent()
  • Method Details

    • parseArgs

      protected void parseArgs(org.apache.commons.cli.CommandLine cmdLine)
      Description copied from class: DiarcComponent
      Override 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:
      parseArgs in class DiarcComponent
    • setPoseGlobal

      public void setPoseGlobal(double x, double y, double theta)
      Specified by:
      setPoseGlobal in interface MoveBaseInterface
    • getPoseGlobalQuat

      public double[] getPoseGlobalQuat()
      Specified by:
      getPoseGlobalQuat in interface MoveBaseInterface
    • additionalUsageInfo

      protected List<org.apache.commons.cli.Option> additionalUsageInfo()
      Description copied from class: DiarcComponent
      Override this method to define command line options available in sub-class. This should be paired with a parseArgs implementation.
      Overrides:
      additionalUsageInfo in class DiarcComponent
      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: DiarcComponent
      Perform 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:
      init in class DiarcComponent
    • displayRobot

      public void displayRobot(ai.thinkingrobots.trade.TRADEServiceInfo displayService)
      Specified by:
      displayRobot in interface AvaInterface
    • goToDock

      public Justification goToDock()
      Specified by:
      goToDock in interface AvaInterface
    • saveLocationTag

      public Justification saveLocationTag(Symbol location)
    • goHomePrimitive

      public Justification goHomePrimitive()
      Description copied from interface: AvaInterface
      Send the robot dock location and then dock it.
      Specified by:
      goHomePrimitive in interface AvaInterface
      Returns:
      success or error
    • stopFollowing

      public Justification stopFollowing()
      Specified by:
      stopFollowing in interface AvaInterface
    • avaFollow

      public Justification avaFollow()
      Specified by:
      avaFollow in interface AvaInterface
    • moveForward

      public Justification moveForward(double distance)
      Description copied from interface: AvaInterface
      Drive straight forward along the robot's current heading using direct velocity commands until odometry shows the requested distance has been covered.
      Specified by:
      moveForward in interface AvaInterface
      Parameters:
      distance - meters to travel forward
    • endSession

      public Justification endSession()
      Description copied from interface: AvaInterface
      Close an RMS session with the robot.
      Specified by:
      endSession in interface AvaInterface
      Returns:
      Justification true if successful
    • getBatteryLevel

      public double getBatteryLevel()
      Description copied from interface: AvaInterface
      Get the battery level of the Ava robot in percentage.
      Specified by:
      getBatteryLevel in interface AvaInterface
      Returns:
      double 0-100
    • getRuntime

      public double getRuntime()
      Description copied from interface: AvaInterface
      Get the estimated remaining runtime of the robot in seconds.
      Specified by:
      getRuntime in interface AvaInterface
      Returns:
      runtime seconds
    • getZLift

      public double getZLift()
      Description copied from interface: AvaInterface
      Get the current Z lift position of the robot.
      Specified by:
      getZLift in interface AvaInterface
      Returns:
      double percentage of lift 0-100
    • setZLift

      public Justification setZLift(double lift)
      Description copied from interface: AvaInterface
      Set the Z lift of the robot.
      Specified by:
      setZLift in interface AvaInterface
      Parameters:
      lift - percentage to set z lift to 0-100
    • getCameraTilt

      public double getCameraTilt()
      Description copied from interface: AvaInterface
      Get the current camera tilt position of the robot.
      Specified by:
      getCameraTilt in interface AvaInterface
      Returns:
      double percentage of tilt 0-100
    • setCameraTilt

      public Justification setCameraTilt(double tilt)
      Description copied from interface: AvaInterface
      Set the Z lift of the robot.
      Specified by:
      setCameraTilt in interface AvaInterface
      Parameters:
      tilt - percentage to set z lift to 0-100
    • getDynamicObstacles

      public List<Obstacle> getDynamicObstacles()
      Description copied from interface: AvaInterface
      Get a list of dynamic obstacles that the robot detects.
      Specified by:
      getDynamicObstacles in interface AvaInterface
      Returns:
      Object containing obstacles list
    • isDocked

      public boolean isDocked()
      Description copied from interface: AvaInterface
      Return true if robot is docked
      Specified by:
      isDocked in interface AvaInterface
      Returns:
      boolean
    • lookAtObstacle

      public Justification lookAtObstacle(Obstacle obs)
      Specified by:
      lookAtObstacle in interface AvaInterface
    • lookAt

      public Justification lookAt(double x, double y, double duration)
      Description copied from interface: AvaInterface
      Look at a vector.
      Specified by:
      lookAt in interface AvaInterface
      Parameters:
      x - position x
      y - position y
      duration - length of look at event
    • getLaserScan

      public float[] getLaserScan()
      Specified by:
      getLaserScan in interface LidarInterface
    • getLaserAngleIncrement

      public float getLaserAngleIncrement()
      Specified by:
      getLaserAngleIncrement in interface LidarInterface
    • 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

      public Justification goToLocation(Symbol location)
      Description copied from interface: MoveBaseInterface
      go to the location and then move forward until certain distance from object in front
      Specified by:
      goToLocation in interface MoveBaseInterface
      Parameters:
      location - name of the desired location to navigate to
      Returns:
      justification specifying if the robot navigated to the location
    • goToLocation

      public Justification goToLocation(Symbol location, boolean wait)
      Description copied from interface: MoveBaseInterface
      Attempt to reach a named goal location.
      Specified by:
      goToLocation in interface MoveBaseInterface
      Parameters:
      location - - name of the goal location
    • goToLocation

      public Justification goToLocation(Symbol desiredLocation, Symbol initialLocation)
      Description copied from interface: MoveBaseInterface
      go to the location and then move forward until certain distance from object in front
      Specified by:
      goToLocation in interface MoveBaseInterface
      Parameters:
      desiredLocation - name of the desired location to navigate to
      initialLocation - 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: MoveBaseInterface
      go to the point and orientation
      Specified by:
      goToLocation in interface MoveBaseInterface
      Parameters:
      xdest - x point
      ydest - y point
      quat_x - x quaternion value
      quat_y - y quaternion value
      quat_z - z quaternion value
      quat_w - w quaternion value
      wait - should robot wait until reached desired point and orientation
      Returns:
      justification if the robot reach the desired point and orientation
    • approachLocation

      public Justification approachLocation(Symbol location)
      Description copied from interface: MoveBaseInterface
      go to the location and then move forward until certain distance from object in front
      Specified by:
      approachLocation in interface MoveBaseInterface
      Parameters:
      location - name of the desired location to navigate to
      Returns:
      justification specifying if the robot navigated to the location
    • approachLocation

      public Justification approachLocation(Symbol desiredLocation, Symbol initialLocation)
      Description copied from interface: MoveBaseInterface
      go to the location and then move forward until certain distance from object in front
      Specified by:
      approachLocation in interface MoveBaseInterface
      Parameters:
      desiredLocation - name of the desired location to navigate to
      initialLocation - name of the initial location to navigate from -- used for conditions and effects
      Returns:
      justification specifying if the robot navigated to the location
    • stop

      public Justification stop()
      Specified by:
      stop in interface MoveBaseInterface
    • isMoving

      public Justification isMoving()
      Specified by:
      isMoving in interface MoveBaseInterface
    • checkAt

      public List<Map<Variable,Symbol>> checkAt(Term locationTerm)
      Description copied from interface: MoveBaseInterface
      Observer to check if the robot is at the specified named location
      Specified by:
      checkAt in interface MoveBaseInterface
      Parameters:
      locationTerm - predicate to observe in form: at(?actor, ?location)
      Returns:
      observation result
    • parseTime

      public Symbol parseTime(Symbol input, Symbol amOrPm)
      Specified by:
      parseTime in interface AvaInterface
    • getWifiSignalStrength

      public Integer getWifiSignalStrength()
      Specified by:
      getWifiSignalStrength in interface AvaInterface
    • measureWifiRssi

      public Integer measureWifiRssi()
      Specified by:
      measureWifiRssi in interface AvaInterface
    • locationRefToName

      public String locationRefToName(Symbol ref)
      Specified by:
      locationRefToName in interface AvaInterface
    • rssiQualityLabel

      public String rssiQualityLabel(Symbol rssi)
      Specified by:
      rssiQualityLabel in interface AvaInterface
    • measureTemperatureDegrees

      public Integer measureTemperatureDegrees()
      Specified by:
      measureTemperatureDegrees in interface AvaInterface
    • blockToCharge

      public void blockToCharge()
      Specified by:
      blockToCharge in interface AvaInterface
    • interruptChargingBlock

      public void interruptChargingBlock()
      Specified by:
      interruptChargingBlock in interface AvaInterface
    • disableMicrophone

      public void disableMicrophone()
    • enableMicrophone

      public void enableMicrophone()
    • triggerWW

      public void triggerWW()
    • playAudioFile

      public void playAudioFile(String fileName)
    • playAudioClip

      public void playAudioClip(String fileName)
    • interruptListenForWWandASR

      public void interruptListenForWWandASR()
      Specified by:
      interruptListenForWWandASR in interface AvaInterface
    • listenForWWandASR

      public void listenForWWandASR()
      Specified by:
      listenForWWandASR in interface AvaInterface
    • getDockRefId

      public Symbol getDockRefId()
      Specified by:
      getDockRefId in interface AvaInterface
    • waitForReadyAck

      public void waitForReadyAck()
      Specified by:
      waitForReadyAck in interface AvaInterface
    • interruptWaitForReadyAck

      public void interruptWaitForReadyAck()
      Specified by:
      interruptWaitForReadyAck in interface AvaInterface
    • getMapImages

      public List<byte[]> getMapImages()
    • getMapMetadatas

      public List<RMSMapMetadataResponse> getMapMetadatas()
    • getAllTags

      public Map<String,org.apache.commons.lang3.tuple.Pair<javax.vecmath.Point3d,javax.vecmath.Quat4d>> getAllTags()
    • interruptWaitForLearningGoalSubmissionOrQuestionAnswer

      public void interruptWaitForLearningGoalSubmissionOrQuestionAnswer(Symbol agent, Predicate learnedActionPredicate)
    • waitForLearningGoalSubmissionOrQuestionAnswer

      public Map<Variable,Symbol> waitForLearningGoalSubmissionOrQuestionAnswer(Symbol agent, String questionString, List<Term> responseForms, Predicate learnedActionPredicate)
    • waitForDuration

      public void waitForDuration(long seconds)
      Specified by:
      waitForDuration in interface AvaInterface
    • interruptWaitForDuration

      public void interruptWaitForDuration()
      Specified by:
      interruptWaitForDuration in interface AvaInterface
    • enableAdminMode

      public void enableAdminMode()
      Specified by:
      enableAdminMode in interface AvaInterface
    • disableAdminMode

      public void disableAdminMode()
      Specified by:
      disableAdminMode in interface AvaInterface
    • switchDisplayToTRACS

      public void switchDisplayToTRACS()
    • switchDisplayToTelepresencePrimitive

      public void switchDisplayToTelepresencePrimitive()