nao
Class ExtendedNao
java.lang.Object
nao.BasicNao
nao.ExtendedNao
public class ExtendedNao
- extends BasicNao
Class that extends the functionality of the Nao with other common behaviours.
Constructor Summary |
ExtendedNao(java.lang.String ip,
int port)
|
Method Summary |
void |
grabWithTwoHands()
Attempt to grab an object in front of the Nao (at waist height), and raise it above the head. |
boolean |
isBallInLeftHand()
Check if a red ball is held in the left hand. |
boolean |
isBallInRightHand()
Check if a red ball is held in the right hand. |
void |
leftKick()
Kick with the left foot. |
void |
leftWave()
Wave with the left hand. |
void |
lookAhead()
Turn the head to face forward. |
void |
lookAtFeet()
|
void |
lookDown()
Turn the head to look down. |
void |
lookLeft()
Turn the head to look left. |
void |
lookRight()
Turn the head to look right. |
void |
lookUp()
Turn the head to look up. |
void |
pickUpFromRight()
Attempt to pick up an object on the floor beside the right foot. |
void |
rightKick()
Kick with the right foot. |
void |
rightWave()
Wave with the right hand. |
void |
standUpFromSitting()
Move to a standing position from a sitting position (without sensing). |
void |
turnBodyLeft()
Turn the entire body left. |
void |
turnBodyRight()
Turn the entire body right. |
Methods inherited from class nao.BasicNao |
closeLeftHand, closeRightHand, getAcceleration, getAvailableRecognitionLanguages, getAvailableSpeakingLanguages, getBatteryLevel, getCameraImage, getCameraImage, getDeadReckonedLocation, getJointPosition, getMotorTemperature, getPose, getPoseName, getRecognitionLanguage, getSpeakingLanguage, getSpeed, getTrackedBallLocation, getTrackedFaceLocation, hasFallen, isBallDetected, isFaceDetected, isHeadTouched, isLandmarkDetected, isLeftHandClosed, isLeftHandTouched, isLeftToeTouched, isObjectDetected, isPowerSupplyConnected, isRightHandClosed, isRightHandTouched, isRightToeTouched, isSoundDetected, isSpeechDetected, moveJoint, moveJoint, moveLeftHandTo, moveRightHandTo, openLeftHand, openRightHand, performMotion, playAudio, playWebAudio, readLeftSonar, readRightSonar, say, send32BitsIR, send8BitsIR, setChestLEDColour, setEarLEDBrightness, setEyeLEDColour, setEyeLEDColour, setFeetLEDColour, setHeadLEDBrightness, setRecognitionLanguage, setSpeakingLanguage, startBallDetection, startBallTracking, startFaceDetection, startFaceTracking, startLandmarkDetection, startObjectDetection, startRecordingAudio, startSoundLocalisation, startSpeechRecognition, startWalking, stopAudioPlayback, stopBallDetection, stopBallTracking, stopFaceDetection, stopFaceTracking, stopLandmarkDetection, stopObjectDetection, stopRecordingAudio, stopSoundLocalisation, stopSpeechRecognition, stopWalking, subscribeToEvents, turnChestLEDOff, turnEarLEDsOff, turnEyeLEDsOff, turnFeetLEDsOff, turnHeadLEDsOff, walkFor, walkSteadilyTo, walkTo, walkTo, walkTo |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ExtendedNao
public ExtendedNao(java.lang.String ip,
int port)
throws java.net.ConnectException
- Throws:
java.net.ConnectException
grabWithTwoHands
public void grabWithTwoHands()
throws BadPoseException
- Attempt to grab an object in front of the Nao (at waist height), and raise it above the head. No sensing is performed, so if the object is in the wrong place,
or is dropped, the motion will continue regardless. This method blocks, for approximately 5 seconds.
- Throws:
BadPoseException
lookAhead
public void lookAhead()
- Turn the head to face forward. This method does not block.
lookLeft
public void lookLeft()
- Turn the head to look left. This method does not block.
lookRight
public void lookRight()
- Turn the head to look right. This method does not block.
lookUp
public void lookUp()
- Turn the head to look up. This method does not block.
lookDown
public void lookDown()
- Turn the head to look down. This method does not block.
turnBodyLeft
public void turnBodyLeft()
- Turn the entire body left. This method blocks.
turnBodyRight
public void turnBodyRight()
- Turn the entire body right. This method blocks.
standUpFromSitting
public void standUpFromSitting()
throws BadPoseException
- Move to a standing position from a sitting position (without sensing). This method blocks for roughly 7 seconds.
- Throws:
BadPoseException
leftKick
public void leftKick()
throws BadPoseException
- Kick with the left foot. The method blocks for about 6 seconds.
Based on code by Vincent Berenz http://www.ai.iit.tsukuba.ac.jp/~vincent/opensource/tdm/.
- Throws:
BadPoseException
rightKick
public void rightKick()
throws BadPoseException
- Kick with the right foot. The method blocks for about 6 seconds.
Based on code by Vincent Berenz http://www.ai.iit.tsukuba.ac.jp/~vincent/opensource/tdm/.
- Throws:
BadPoseException
pickUpFromRight
public void pickUpFromRight()
throws BadPoseException
- Attempt to pick up an object on the floor beside the right foot. The object must be about 3cm in front of the foot bumpers and 3cm
to the right of the right foot. The method blocks for about 9 seconds.
Based on code by Vincent Berenz http://www.ai.iit.tsukuba.ac.jp/~vincent/opensource/tdm/.
- Throws:
BadPoseException
isBallInRightHand
public boolean isBallInRightHand()
- Check if a red ball is held in the right hand. This is done by moving the hand into the camera view
and using the ball detector to see if the ball is present. This method blocks for about 2 seconds.
isBallInLeftHand
public boolean isBallInLeftHand()
- Check if a red ball is held in the left hand. This is done by moving the hand into the camera view
and using the ball detector to see if the ball is present. This method blocks for about 2 seconds.
rightWave
public void rightWave()
- Wave with the right hand.
leftWave
public void leftWave()
- Wave with the left hand.
lookAtFeet
public void lookAtFeet()