概述

动作(Motion)模块提供了多种方法,为给NAO编辑动作提供了便利。它主要包括三组方法:

查看动作的当前状态

使用getSummary方法,可以快速地查看到所有关节的当前状态以及正在运行的任务。

# Example showing how to get the current state of NAO > print proxy.getSummary() ---------------------- Model --------------------------- JointName Stiffness Command Sensor HeadYaw 1.000000 0.000000 0.007628 HeadPitch 1.000000 0.000000 -0.023052 LShoulderPitch 1.000000 2.094395 2.072392 LShoulderRoll 1.000000 0.261799 0.242330 LElbowYaw 1.000000 -1.570796 -1.558586 LElbowRoll 1.000000 -1.396263 -1.368286 LWristYaw 1.000000 0.000000 0.010696 LHand 1.000000 0.000000 0.019299 LHipYawPitch 1.000000 0.000000 0.004644 LHipRoll 1.000000 0.000000 0.000042 LHipPitch 1.000000 -0.529983 -0.572140 LKneePitch 1.000000 1.059966 1.147390 LAnklePitch 1.000000 -0.529983 -0.569156 LAnkleRoll 1.000000 0.000000 0.000042 RHipYawPitch 1.000000 0.000000 -0.007670 RHipRoll 1.000000 0.000000 0.000042 RHipPitch 1.000000 -0.529983 -0.561486 RKneePitch 1.000000 1.059966 1.144406 RAnklePitch 1.000000 -0.529983 -0.579810 RAnkleRoll 1.000000 0.000000 0.000042 RShoulderPitch 1.000000 2.094395 2.067874 RShoulderRoll 1.000000 -0.261799 -0.233210 RElbowYaw 1.000000 1.570796 1.560036 RElbowRoll 1.000000 1.396263 1.368370 RWristYaw 1.000000 0.000000 -0.004644 RHand 1.000000 0.000000 0.014936

NAO移动时,动作会从当前命令值插值到目标值。由于命令进入电机卡需要一点时间,而且传感器的值也需要一些时间才能使用,因此您可能会看到传感器的值稍微滞后于命令。





Copyright © 2010 Aldebaran-Robotics - 版权所有