Nao Motion Tutorial - Playing and Recording
Playing Animations and Setting Posture
First, import the necessary functions from the SIC framework:
from sic_framework.devices import Nao
from sic_framework.devices.common_naoqi.naoqi_motion import NaoPostureRequest, NaoqiAnimationRequest
Connect to the Nao (computer must be connected to the same network)
nao = Nao(ip="NAO_IP_HERE")
Set posture or play animation
To set the posture:
Second argument is the speed (NOTE: setting the speed too high may result in an error)
nao.motion.request(NaoPostureRequest("Stand", 0.5))
To play an animation:
If you are playing a standing animation, make sure you put the Nao in a standing posture beforehand
nao.motion.request(NaoqiAnimationRequest("animations/Stand/Gestures/Hey_1"))
A list of all Nao animations can be found here.
A complete script for this tutorial can be found here: demo_nao_motion.py
Recording and Playing Custom Animations
First, import the necessary functions from the SIC framework:
Connect to the Nao (computer must be connected to the same network)
nao = Nao(ip="NAO_IP_HERE")
Specify which Nao parts you want to record (NOTE: a ‘chain’ is a group of body parts, or a link of joints):
Set the stiffness of these parts to 0 so that you can move them
Start the recording
Set a ‘record_time' variable. This is how long it will record the Nao’s motion before saving it.
It is recommended to include a message to indicate when to start moving the Nao
Save the motion, give it a name
Play the recording back
Set the stiffness of the limbs to 0.7 so that the motors can move them
A complete script for this tutorial can be found here: demo_nao_motion_recorder.py