Interface NaoInterface

All Superinterfaces:
SpeechProductionInterface, VelocityInterface
All Known Subinterfaces:
MockNaoInterface
All Known Implementing Classes:
MockNaoComponent, NaoComponent, NaoWizardComponent

public interface NaoInterface extends VelocityInterface, SpeechProductionInterface
The NaoComponent interface.
  • Method Details

    • isMoving

      boolean isMoving()
      Query whether or not robot is moving.
      Returns:
    • playFile

      void playFile(String fileName)
      Play the specified audio file
      Parameters:
      fileName - : the path of the file to play
    • goToPosture

      boolean goToPosture(String targetPosture)
      Move into specified posture.
      Parameters:
      targetPosture -
      Returns:
    • moveTo

      boolean moveTo(float x, float y, float theta)
      Makes the robot move to the given pose in the ground plane, relative to FRAME_ROBOT. This is a not a blocking call. TODO: this needs to be generalized into a DIARC interface so that it's not specific to the nao component.
      Parameters:
      x - Distance along the X axis in meters.
      y - Distance along the Y axis in meters.
      theta - Rotation around the Z axis in radians [-3.1415 to 3.1415].
      Returns:
    • moveToBlocking

      boolean moveToBlocking(float x, float y, float theta)
      Makes the robot move to the given pose in the ground plane, relative to FRAME_ROBOT. This is a blocking call. TODO: this needs to be generalized into a DIARC interface so that it's not specific to the nao component.
      Parameters:
      x - Distance along the X axis in meters.
      y - Distance along the Y axis in meters.
      theta - Rotation around the Z axis in radians [-3.1415 to 3.1415].
      Returns:
    • angleInterpolation

      void angleInterpolation(String name, float angle, float time, boolean isAbsolute)
      Move NAO joint to a particular angle.
      Parameters:
      name - - joint name to move
      angle - -
      time - - how long to take to move to desired joint angle
      isAbsolute -
    • angleInterpolation

      void angleInterpolation(List<String> names, List<Float> angles, List<Float> times, boolean isAbsolute)
      Move NAO joints to a particular angle. A different time values can be used for each joint.
      Parameters:
      names - - joint name to move
      angles - - angles for joints
      times - - how long to take to move to desired joint angles
      isAbsolute -
    • angleInterpolation

      void angleInterpolation(List<String> names, List<Float> angles, float time, boolean isAbsolute)
      Move NAO joints to a particular angle. A single time value is used for all joints.
      Parameters:
      names - - joint name to move
      angles - - angles for joints
      time - - how long to take to move to desired joint angles
      isAbsolute -
    • getAngle

      float getAngle(String name)
      Get NAO joint angle.
      Parameters:
      name - - joint name
      Returns:
    • pointTo

      boolean pointTo(float x, float y, float z)
      Points to the (x,y,z) location in the robot's base coordinate frame. Units are in meters.
      Parameters:
      x -
      y -
      z -
      Returns:
    • restLeftArm

      boolean restLeftArm()
      Rests robot's left/right arm by placing thr hands on its lap and turning the motors off. Takes 1500ms to complete (blocking). Also disables hip motors!!!
      Returns:
    • restRightArm

      boolean restRightArm()
    • pointHeadTo

      boolean pointHeadTo(float x, float y, float z)
      Points head to the (x,y,z) location in the robot's base coordinate frame. Units are in meters.
      Parameters:
      x -
      y -
      z -
      Returns:
    • checkFloorSupport

      boolean checkFloorSupport()
      Checks if there is floor support in front of the robot. TODO: this needs to be generalized into a DIARC interface so that it's not specific to the nao component.
      Returns:
      true if it's safe to move forward, false otherwise
    • checkObstacle

      boolean checkObstacle()
      Checks if there is an obstacle in front of the robot. TODO: this needs to be generalized into a DIARC interface so that it's not specific to the nao component.
      Returns:
      true if it's safe to move forward, false otherwise
    • getPosture

      String getPosture()
      Get current posture.
      Returns:
    • getPostureList

      List<String> getPostureList()
      Get list of all possible postures.
      Returns:
    • sayText

      boolean sayText(String text)
      Perform text-to-speech on input text.
      Specified by:
      sayText in interface SpeechProductionInterface
      Parameters:
      text -
      Returns:
    • sayToFile

      boolean sayToFile(String text, String filename)
      To save tts output to file instead of saying it outloud.
      Parameters:
      text -
      filename -
      Returns:
    • setStiffness

      boolean setStiffness(String name, float stiffness)
      Sets joint/actuator stiffness
      Parameters:
      name - Name of joint/actuator. See nao doc.
      stiffness - Value between 0 and 1
      Returns:
    • rest

      boolean rest()
      Puts the nao in the rest position, relaxing all motors.
      Returns:
    • openHand

      boolean openHand(String name)
      Opens the hand
      Parameters:
      name - Name of joint/actuator (LHand or RHand).
      Returns:
    • closeHand

      boolean closeHand(String name)
      Closes the hand
      Parameters:
      name - Name of joint/actuator (LHand or RHand).
      Returns:
    • getPixelPositionInRobotFrame

      javax.vecmath.Point3d getPixelPositionInRobotFrame(int pX, int pY, int width, int height, int camID)
      Computes position of pixel in robot frame.
      Parameters:
      pX - x position of pixel
      pY - y position of pixel
      width - Width of image
      height - Height of image
      camID - Camera ID (0 [top], 1 [bottom])
      Returns:
      Position of pixel projected on floor/table.
    • sayAnimated

      boolean sayAnimated(String annotatedText)
    • welcome

      boolean welcome()
    • setBreathEnabled

      boolean setBreathEnabled(String par, boolean enable)
    • ledOn

      boolean ledOn(String name)
    • ledOff

      boolean ledOff(String name)
    • blink

      boolean blink()