当前位置: 首页>>代码示例>>Python>>正文


Python ALProxy.angleInterpolationBezier方法代码示例

本文整理汇总了Python中naoqi.ALProxy.angleInterpolationBezier方法的典型用法代码示例。如果您正苦于以下问题:Python ALProxy.angleInterpolationBezier方法的具体用法?Python ALProxy.angleInterpolationBezier怎么用?Python ALProxy.angleInterpolationBezier使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在naoqi.ALProxy的用法示例。


在下文中一共展示了ALProxy.angleInterpolationBezier方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from naoqi import ALProxy [as 别名]
# 或者: from naoqi.ALProxy import angleInterpolationBezier [as 别名]
class MoveMaker:
    def __init__(self):
        rospy.init_node("movement", anonymous=True)
        self.move_service = rospy.Service("make_move", MakeMove, self.handle_make_move)
        self.nextForward = "right"
        self.nextBackward = "right"
        self.motion = ALProxy("ALMotion", rospy.get_param('nao_ip'), rospy.get_param("nao_port"))
        self.tts = ALProxy("ALTextToSpeech", rospy.get_param('nao_ip'), rospy.get_param("nao_port"))
        rospy.loginfo("Movement node started")

    def handle_make_move(self, request):
        """
        :type request MakeMoveRequest
        """
        direction = request.direction
        self.tts.say(direction)
        move = ''
        if direction == "forward":
            if self.nextForward == "right":
                move = "rightFootForward"
                self.execute_move_async(rightFootForward.names, rightFootForward.times, rightFootForward.keys)
                self.nextForward = "left"
            else:
                move = "leftFootForward"
                self.execute_move_async(leftFootForward.names, leftFootForward.times, leftFootForward.keys)
                self.nextForward = "right"
        elif direction == "backward":
            if self.nextBackward == "right":
                move = "rightFootBack"
                self.execute_move_async(rightFootBack.names, rightFootBack.times, rightFootBack.keys)
                self.nextBackward = "left"
            else:
                move = "leftFootBack"
                self.execute_move_async(leftFootBack.names, leftFootBack.times, leftFootBack.keys)
                self.nextBackward = "right"
        elif direction == "right":
            move = "right"
            self.execute_move_async(right.names, right.times, right.keys)
        elif direction == "left":
            move = "left"
            self.execute_move_async(left.names, left.times, left.keys)
        rospy.loginfo("Move published %s" % move)
        return MakeMoveResponse()

    def execute_move_async(self, names, times, keys):
        Timer(0, self.execute_move, (names, times, keys)).start()

    def execute_move(self, names, times, keys):
        try:
            self.motion.angleInterpolationBezier(names, times, keys)
        except BaseException, err:
            print err
开发者ID:LanceChen,项目名称:dancing-nao,代码行数:54,代码来源:movement.py

示例2: main

# 需要导入模块: from naoqi import ALProxy [as 别名]
# 或者: from naoqi.ALProxy import angleInterpolationBezier [as 别名]

#.........这里部分代码省略.........
	times.append([1, 1.48, 1.96])
	keys.append([[0.0889301, [3, -0.333333, 0], [3, 0.16, 0]], [0.0889301, [3, -0.16, 0], [3, 0.16, 0]], [0.0889301, [3, -0.16, 0], [3, 0, 0]]])

	names.append("LAnkleRoll")
	times.append([1, 1.48, 1.96])
	keys.append([[-0.122678, [3, -0.333333, 0], [3, 0.16, 0]], [-0.122678, [3, -0.16, 0], [3, 0.16, 0]], [-0.122678, [3, -0.16, 0], [3, 0, 0]]])

	names.append("LElbowRoll")
	times.append([1, 1.48, 1.96])
	keys.append([[-0.427944, [3, -0.333333, 0], [3, 0.16, 0]], [-0.427944, [3, -0.16, 0], [3, 0.16, 0]], [-0.427944, [3, -0.16, 0], [3, 0, 0]]])

	names.append("LElbowYaw")
	times.append([1, 1.48, 1.96])
	keys.append([[-1.18736, [3, -0.333333, 0], [3, 0.16, 0]], [-1.18736, [3, -0.16, 0], [3, 0.16, 0]], [-1.18736, [3, -0.16, 0], [3, 0, 0]]])

	names.append("LHand")
	times.append([1, 1.48, 1.96])
	keys.append([[0.2896, [3, -0.333333, 0], [3, 0.16, 0]], [0.2896, [3, -0.16, 0], [3, 0.16, 0]], [0.2896, [3, -0.16, 0], [3, 0, 0]]])

	names.append("LHipPitch")
	times.append([1, 1.48, 1.96])
	keys.append([[0.121228, [3, -0.333333, 0], [3, 0.16, 0]], [0.121228, [3, -0.16, 0], [3, 0.16, 0]], [0.131966, [3, -0.16, 0], [3, 0, 0]]])

	names.append("LHipRoll")
	times.append([1, 1.48, 1.96])
	keys.append([[0.0966839, [3, -0.333333, 0], [3, 0.16, 0]], [0.0966839, [3, -0.16, 0], [3, 0.16, 0]], [0.0966839, [3, -0.16, 0], [3, 0, 0]]])

	names.append("LHipYawPitch")
	times.append([1, 1.48, 1.96])
	keys.append([[-0.1733, [3, -0.333333, 0], [3, 0.16, 0]], [-0.1733, [3, -0.16, 0], [3, 0.16, 0]], [-0.1733, [3, -0.16, 0], [3, 0, 0]]])

	names.append("LKneePitch")
	times.append([1, 1.48, 1.96])
	keys.append([[-0.0874801, [3, -0.333333, 0], [3, 0.16, 0]], [-0.0874801, [3, -0.16, 0], [3, 0.16, 0]], [-0.0874801, [3, -0.16, 0], [3, 0, 0]]])

	names.append("LShoulderPitch")
	times.append([1, 1.48, 1.96])
	keys.append([[1.44805, [3, -0.333333, 0], [3, 0.16, 0]], [1.44805, [3, -0.16, 0], [3, 0.16, 0]], [1.47413, [3, -0.16, 0], [3, 0, 0]]])

	names.append("LShoulderRoll")
	times.append([1, 1.48, 1.96])
	keys.append([[0.199378, [3, -0.333333, 0], [3, 0.16, 0]], [0.199378, [3, -0.16, 0], [3, 0.16, 0]], [0.06592, [3, -0.16, 0], [3, 0, 0]]])

	names.append("LWristYaw")
	times.append([1, 1.48, 1.96])
	keys.append([[0.122678, [3, -0.333333, 0], [3, 0.16, 0]], [0.122678, [3, -0.16, 0], [3, 0.16, 0]], [0.122678, [3, -0.16, 0], [3, 0, 0]]])

	names.append("RAnklePitch")
	times.append([1, 1.48, 1.96])
	keys.append([[0.0859461, [3, -0.333333, 0], [3, 0.16, 0]], [0.0859461, [3, -0.16, 0], [3, 0.16, 0]], [0.0859461, [3, -0.16, 0], [3, 0, 0]]])

	names.append("RAnkleRoll")
	times.append([1, 1.48, 1.96])
	keys.append([[0.121228, [3, -0.333333, 0], [3, 0.16, 0]], [0.121228, [3, -0.16, 0], [3, 0.16, 0]], [0.121228, [3, -0.16, 0], [3, 0, 0]]])

	names.append("RElbowRoll")
	times.append([1, 1.48, 1.96])
	keys.append([[0.414222, [3, -0.333333, 0], [3, 0.16, 0]], [0.596768, [3, -0.16, 0], [3, 0.16, 0]], [0.382009, [3, -0.16, 0], [3, 0, 0]]])

	names.append("RElbowYaw")
	times.append([1, 1.48, 1.96])
	keys.append([[1.19188, [3, -0.333333, 0], [3, 0.16, 0]], [1.18881, [3, -0.16, 0], [3, 0.16, 0]], [1.2471, [3, -0.16, 0], [3, 0, 0]]])

	names.append("RHand")
	times.append([1, 1.48, 1.96])
	keys.append([[0.3992, [3, -0.333333, 0], [3, 0.16, 0]], [0.3992, [3, -0.16, 0], [3, 0.16, 0]], [0.3992, [3, -0.16, 0], [3, 0, 0]]])

	names.append("RHipPitch")
	times.append([1, 1.48, 1.96])
	keys.append([[0.131882, [3, -0.333333, 0], [3, 0.16, 0]], [0.131882, [3, -0.16, 0], [3, 0.16, 0]], [0.131882, [3, -0.16, 0], [3, 0, 0]]])

	names.append("RHipRoll")
	times.append([1, 1.48, 1.96])
	keys.append([[-0.0966001, [3, -0.333333, 0], [3, 0.16, 0]], [-0.0966001, [3, -0.16, 0], [3, 0.16, 0]], [-0.0966001, [3, -0.16, 0], [3, 0, 0]]])

	names.append("RHipYawPitch")
	times.append([1, 1.48, 1.96])
	keys.append([[-0.1733, [3, -0.333333, 0], [3, 0.16, 0]], [-0.1733, [3, -0.16, 0], [3, 0.16, 0]], [-0.1733, [3, -0.16, 0], [3, 0, 0]]])

	names.append("RKneePitch")
	times.append([1, 1.48, 1.96])
	keys.append([[-0.0858622, [3, -0.333333, 0], [3, 0.16, 0]], [-0.0858622, [3, -0.16, 0], [3, 0.16, 0]], [-0.0858622, [3, -0.16, 0], [3, 0, 0]]])

	names.append("RShoulderPitch")
	times.append([1, 1.48, 1.96])
	keys.append([[0.949588, [3, -0.333333, 0], [3, 0.16, 0]], [0.271559, [3, -0.16, 0.111981], [3, 0.16, -0.111981]], [0.159578, [3, -0.16, 0], [3, 0, 0]]])

	names.append("RShoulderRoll")
	times.append([1, 1.48, 1.96])
	keys.append([[-0.131966, [3, -0.333333, 0], [3, 0.16, 0]], [-0.0951499, [3, -0.16, -0.036816], [3, 0.16, 0.036816]], [0.144154, [3, -0.16, 0], [3, 0, 0]]])

	names.append("RWristYaw")
	times.append([1, 1.48, 1.96])
	keys.append([[0.091998, [3, -0.333333, 0], [3, 0.16, 0]], [0.021434, [3, -0.16, 0], [3, 0.16, 0]], [0.493905, [3, -0.16, 0], [3, 0, 0]]])

	try:
	  motion = ALProxy("ALMotion", robotIP, PORT)
	  motion.angleInterpolationBezier(names, times, keys)
	except BaseException, err:
	  print err
开发者ID:trimlab,项目名称:Nao-Space-Opera,代码行数:104,代码来源:Shoot.py

示例3: ALProxy

# 需要导入模块: from naoqi import ALProxy [as 别名]
# 或者: from naoqi.ALProxy import angleInterpolationBezier [as 别名]
times.append([0.06667])
keys.append([[0.82030, [3, -0.02222, 0.00000], [3, 0.00000, 0.00000]]])

names.append("RShoulderRoll")
times.append([0.06667])
keys.append([[-0.03840, [3, -0.02222, 0.00000], [3, 0.00000, 0.00000]]])

names.append("RElbowYaw")
times.append([0.06667])
keys.append([[1.51669, [3, -0.02222, 0.00000], [3, 0.00000, 0.00000]]])

names.append("RElbowRoll")
times.append([0.06667])
keys.append([[1.56207, [3, -0.02222, 0.00000], [3, 0.00000, 0.00000]]])

names.append("RWristYaw")
times.append([0.06667])
keys.append([[-1.45910, [3, -0.02222, 0.00000], [3, 0.00000, 0.00000]]])

names.append("RHand")
times.append([0.06667])
keys.append([[0.01745, [3, -0.02222, 0.00000], [3, 0.00000, 0.00000]]])

try:
    # uncomment the following line and modify the IP if you use this script outside Choregraphe.
    # motion = ALProxy("ALMotion", IP, 9559)
    motion = ALProxy("ALMotion")
    motion.angleInterpolationBezier(names, times, keys)
except BaseException, err:
    print err
开发者ID:Rctue,项目名称:DialogStateMachine,代码行数:32,代码来源:AttentionGesture.py

示例4: __init__

# 需要导入模块: from naoqi import ALProxy [as 别名]
# 或者: from naoqi.ALProxy import angleInterpolationBezier [as 别名]
class head:
    def __init__(self):
        IP = "192.168.1.115"
        self.motion = ALProxy("ALMotion",IP,9559)
        print"headtilt"
    def headdown(self):
        names.append("HeadPitch")
        times.append([ 1.00000])
        keys.append([ [ 0.32517, [ 3, -0.33333, 0.00000], [ 3, 0.00000, 0.00000]]])

        names.append("HeadYaw")
        times.append([ 1.00000])
        keys.append([ [ -0.01231, [ 3, -0.33333, 0.00000], [ 3, 0.00000, 0.00000]]])

        names.append("LAnklePitch")
        times.append([ 1.00000])
        keys.append([ [ 0.09813, [ 3, -0.33333, 0.00000], [ 3, 0.00000, 0.00000]]])

        names.append("LAnkleRoll")
        times.append([ 1.00000])
        keys.append([ [ -0.11808, [ 3, -0.33333, 0.00000], [ 3, 0.00000, 0.00000]]])

        names.append("LElbowRoll")
        times.append([ 1.00000])
        keys.append([ [ -0.43561, [ 3, -0.33333, 0.00000], [ 3, 0.00000, 0.00000]]])

        names.append("LElbowYaw")
        times.append([ 1.00000])
        keys.append([ [ -1.19810, [ 3, -0.33333, 0.00000], [ 3, 0.00000, 0.00000]]])

        names.append("LHipPitch")
        times.append([ 1.00000])
        keys.append([ [ 0.13657, [ 3, -0.33333, 0.00000], [ 3, 0.00000, 0.00000]]])

        names.append("LHipRoll")
        times.append([ 1.00000])
        keys.append([ [ 0.11663, [ 3, -0.33333, 0.00000], [ 3, 0.00000, 0.00000]]])

        names.append("LHipYawPitch")
        times.append([ 1.00000])
        keys.append([ [ -0.17023, [ 3, -0.33333, 0.00000], [ 3, 0.00000, 0.00000]]])

        names.append("LKneePitch")
        times.append([ 1.00000])
        keys.append([ [ -0.09055, [ 3, -0.33333, 0.00000], [ 3, 0.00000, 0.00000]]])

        names.append("LShoulderPitch")
        times.append([ 1.00000])
        keys.append([ [ 1.47106, [ 3, -0.33333, 0.00000], [ 3, 0.00000, 0.00000]]])

        names.append("LShoulderRoll")
        times.append([ 1.00000])
        keys.append([ [ 0.10120, [ 3, -0.33333, 0.00000], [ 3, 0.00000, 0.00000]]])

        names.append("RAnklePitch")
        times.append([ 1.00000])
        keys.append([ [ 0.10282, [ 3, -0.33333, 0.00000], [ 3, 0.00000, 0.00000]]])

        names.append("RAnkleRoll")
        times.append([ 1.00000])
        keys.append([ [ 0.07367, [ 3, -0.33333, 0.00000], [ 3, 0.00000, 0.00000]]])

        names.append("RElbowRoll")
        times.append([ 1.00000])
        keys.append([ [ 0.42496, [ 3, -0.33333, 0.00000], [ 3, 0.00000, 0.00000]]])

        names.append("RElbowYaw")
        times.append([ 1.00000])
        keys.append([ [ 1.17040, [ 3, -0.33333, 0.00000], [ 3, 0.00000, 0.00000]]])

        names.append("RHipPitch")
        times.append([ 1.00000])
        keys.append([ [ 0.13342, [ 3, -0.33333, 0.00000], [ 3, 0.00000, 0.00000]]])

        names.append("RHipRoll")
        times.append([ 1.00000])
        keys.append([ [ -0.06439, [ 3, -0.33333, 0.00000], [ 3, 0.00000, 0.00000]]])

        names.append("RHipYawPitch")
        times.append([ 1.00000])
        keys.append([ [ -0.17023, [ 3, -0.33333, 0.00000], [ 3, 0.00000, 0.00000]]])

        names.append("RKneePitch")
        times.append([ 1.00000])
        keys.append([ [ -0.09046, [ 3, -0.33333, 0.00000], [ 3, 0.00000, 0.00000]]])

        names.append("RShoulderPitch")
        times.append([ 1.00000])
        keys.append([ [ 1.50029, [ 3, -0.33333, 0.00000], [ 3, 0.00000, 0.00000]]])

        names.append("RShoulderRoll")
        times.append([ 1.00000])
        keys.append([ [ -0.11509, [ 3, -0.33333, 0.00000], [ 3, 0.00000, 0.00000]]])
        self.motion.angleInterpolationBezier(names, times, keys);
开发者ID:odinkruse,项目名称:Portfolio,代码行数:96,代码来源:head.py

示例5: drop

# 需要导入模块: from naoqi import ALProxy [as 别名]
# 或者: from naoqi.ALProxy import angleInterpolationBezier [as 别名]

#.........这里部分代码省略.........

    names.append("LShoulderPitch")
    times.append([ 0.33333, 1.00000, 1.66667])
    keys.append([ [ 0.05978, [ 3, -0.11111, 0.00000], [ 3, 0.22222, 0.00000]], [ 0.03064, [ 3, -0.22222, 0.00000], [ 3, 0.22222, 0.00000]], [ 1.41891, [ 3, -0.22222, 0.00000], [ 3, 0.00000, 0.00000]]])

    names.append("LShoulderRoll")
    times.append([ 0.33333, 1.00000, 1.66667])
    keys.append([ [ 0.11808, [ 3, -0.11111, 0.00000], [ 3, 0.22222, 0.00000]], [ 0.82525, [ 3, -0.22222, 0.00000], [ 3, 0.22222, 0.00000]], [ 0.33130, [ 3, -0.22222, 0.00000], [ 3, 0.00000, 0.00000]]])

    names.append("LElbowYaw")
    times.append([ 0.33333, 1.00000, 1.66667])
    keys.append([ [ -0.02152, [ 3, -0.11111, 0.00000], [ 3, 0.22222, 0.00000]], [ -0.11969, [ 3, -0.22222, 0.09818], [ 3, 0.22222, -0.09818]], [ -1.39138, [ 3, -0.22222, 0.00000], [ 3, 0.00000, 0.00000]]])

    names.append("LElbowRoll")
    times.append([ 0.33333, 1.00000, 1.66667])
    keys.append([ [ -0.04751, [ 3, -0.11111, 0.00000], [ 3, 0.22222, 0.00000]], [ -0.06132, [ 3, -0.22222, 0.01381], [ 3, 0.22222, -0.01381]], [ -1.02620, [ 3, -0.22222, 0.00000], [ 3, 0.00000, 0.00000]]])

    names.append("LWristYaw")
    times.append([ 0.33333, 1.00000, 1.66667])
    keys.append([ [ 0.00456, [ 3, -0.11111, 0.00000], [ 3, 0.22222, 0.00000]], [ 0.01070, [ 3, -0.22222, 0.00000], [ 3, 0.22222, 0.00000]], [ 0.01070, [ 3, -0.22222, 0.00000], [ 3, 0.00000, 0.00000]]])

    names.append("LHand")
    times.append([ 0.33333, 1.00000, 1.66667])
    keys.append([ [ 0.00021, [ 3, -0.11111, 0.00000], [ 3, 0.22222, 0.00000]], [ 0.00020, [ 3, -0.22222, 0.00000], [ 3, 0.22222, 0.00000]], [ 0.00020, [ 3, -0.22222, 0.00000], [ 3, 0.00000, 0.00000]]])

    names.append("RShoulderPitch")
    times.append([ 0.33333, 1.00000, 1.66667])
    keys.append([ [ 0.07367, [ 3, -0.11111, 0.00000], [ 3, 0.22222, 0.00000]], [ 0.05220, [ 3, -0.22222, 0.00000], [ 3, 0.22222, 0.00000]], [ 1.41286, [ 3, -0.22222, 0.00000], [ 3, 0.00000, 0.00000]]])

    names.append("RShoulderRoll")
    times.append([ 0.33333, 1.00000, 1.66667])
    keys.append([ [ -0.16571, [ 3, -0.11111, 0.00000], [ 3, 0.22222, 0.00000]], [ -0.80539, [ 3, -0.22222, 0.00000], [ 3, 0.22222, 0.00000]], [ -0.33445, [ 3, -0.22222, 0.00000], [ 3, 0.00000, 0.00000]]])

    names.append("RElbowYaw")
    times.append([ 0.33333, 1.00000, 1.66667])
    keys.append([ [ -0.03379, [ 3, -0.11111, 0.00000], [ 3, 0.22222, 0.00000]], [ 0.09660, [ 3, -0.22222, -0.13039], [ 3, 0.22222, 0.13039]], [ 1.39130, [ 3, -0.22222, 0.00000], [ 3, 0.00000, 0.00000]]])

    names.append("RElbowRoll")
    times.append([ 0.33333, 1.00000, 1.66667])
    keys.append([ [ 0.05527, [ 3, -0.11111, 0.00000], [ 3, 0.22222, 0.00000]], [ 0.05833, [ 3, -0.22222, -0.00307], [ 3, 0.22222, 0.00307]], [ 1.02782, [ 3, -0.22222, 0.00000], [ 3, 0.00000, 0.00000]]])

    names.append("RWristYaw")
    times.append([ 0.33333, 1.00000, 1.66667])
    keys.append([ [ 0.01990, [ 3, -0.11111, 0.00000], [ 3, 0.22222, 0.00000]], [ 0.00456, [ 3, -0.22222, 0.00000], [ 3, 0.22222, 0.00000]], [ 0.00456, [ 3, -0.22222, 0.00000], [ 3, 0.00000, 0.00000]]])

    names.append("RHand")
    times.append([ 0.33333, 1.00000, 1.66667])
    keys.append([ [ 0.00017, [ 3, -0.11111, 0.00000], [ 3, 0.22222, 0.00000]], [ 0.00016, [ 3, -0.22222, 0.00000], [ 3, 0.22222, -0.00000]], [ 0.00015, [ 3, -0.22222, 0.00000], [ 3, 0.00000, 0.00000]]])

    names.append("LHipYawPitch")
    times.append([ 0.33333, 1.00000, 1.66667])
    keys.append([ [ 0.00004, [ 3, -0.11111, 0.00000], [ 3, 0.22222, 0.00000]], [ 0.00311, [ 3, -0.22222, 0.00000], [ 3, 0.22222, 0.00000]], [ -0.00149, [ 3, -0.22222, 0.00000], [ 3, 0.00000, 0.00000]]])

    names.append("LHipRoll")
    times.append([ 0.33333, 1.00000, 1.66667])
    keys.append([ [ 0.00004, [ 3, -0.11111, 0.00000], [ 3, 0.22222, 0.00000]], [ 0.00464, [ 3, -0.22222, 0.00000], [ 3, 0.22222, 0.00000]], [ 0.00464, [ 3, -0.22222, 0.00000], [ 3, 0.00000, 0.00000]]])

    names.append("LHipPitch")
    times.append([ 0.33333, 1.00000, 1.66667])
    keys.append([ [ 0.00004, [ 3, -0.11111, 0.00000], [ 3, 0.22222, 0.00000]], [ -0.43561, [ 3, -0.22222, 0.00000], [ 3, 0.22222, 0.00000]], [ -0.43561, [ 3, -0.22222, 0.00000], [ 3, 0.00000, 0.00000]]])

    names.append("LKneePitch")
    times.append([ 0.33333, 1.00000, 1.66667])
    keys.append([ [ -0.00004, [ 3, -0.11111, 0.00000], [ 3, 0.22222, 0.00000]], [ 0.69946, [ 3, -0.22222, 0.00000], [ 3, 0.22222, 0.00000]], [ 0.69793, [ 3, -0.22222, 0.00000], [ 3, 0.00000, 0.00000]]])

    names.append("LAnklePitch")
    times.append([ 0.33333, 1.00000, 1.66667])
    keys.append([ [ -0.00004, [ 3, -0.11111, 0.00000], [ 3, 0.22222, 0.00000]], [ -0.34979, [ 3, -0.22222, 0.00153], [ 3, 0.22222, -0.00153]], [ -0.35133, [ 3, -0.22222, 0.00000], [ 3, 0.00000, 0.00000]]])

    names.append("LAnkleRoll")
    times.append([ 0.33333, 1.00000, 1.66667])
    keys.append([ [ 0.00004, [ 3, -0.11111, 0.00000], [ 3, 0.22222, 0.00000]], [ 0.00004, [ 3, -0.22222, 0.00000], [ 3, 0.22222, 0.00000]], [ 0.00004, [ 3, -0.22222, 0.00000], [ 3, 0.00000, 0.00000]]])

    names.append("RHipRoll")
    times.append([ 0.33333, 1.00000, 1.66667])
    keys.append([ [ 0.00004, [ 3, -0.11111, 0.00000], [ 3, 0.22222, 0.00000]], [ -0.00303, [ 3, -0.22222, 0.00000], [ 3, 0.22222, 0.00000]], [ 0.00158, [ 3, -0.22222, 0.00000], [ 3, 0.00000, 0.00000]]])

    names.append("RHipPitch")
    times.append([ 0.33333, 1.00000, 1.66667])
    keys.append([ [ -0.00311, [ 3, -0.11111, 0.00000], [ 3, 0.22222, 0.00000]], [ -0.43110, [ 3, -0.22222, 0.00920], [ 3, 0.22222, -0.00920]], [ -0.44030, [ 3, -0.22222, 0.00000], [ 3, 0.00000, 0.00000]]])

    names.append("RKneePitch")
    times.append([ 0.33333, 1.00000, 1.66667])
    keys.append([ [ -0.02297, [ 3, -0.11111, 0.00000], [ 3, 0.22222, 0.00000]], [ 0.69955, [ 3, -0.22222, 0.00000], [ 3, 0.22222, 0.00000]], [ 0.69341, [ 3, -0.22222, 0.00000], [ 3, 0.00000, 0.00000]]])

    names.append("RAnklePitch")
    times.append([ 0.33333, 1.00000, 1.66667])
    keys.append([ [ -0.00303, [ 3, -0.11111, 0.00000], [ 3, 0.22222, 0.00000]], [ -0.34664, [ 3, -0.22222, 0.00460], [ 3, 0.22222, -0.00460]], [ -0.35124, [ 3, -0.22222, 0.00000], [ 3, 0.00000, 0.00000]]])

    names.append("RAnkleRoll")
    times.append([ 0.33333, 1.00000, 1.66667])
    keys.append([ [ 0.00618, [ 3, -0.11111, 0.00000], [ 3, 0.22222, 0.00000]], [ 0.00004, [ 3, -0.22222, 0.00000], [ 3, 0.22222, 0.00000]], [ 0.00004, [ 3, -0.22222, 0.00000], [ 3, 0.00000, 0.00000]]])

    try:
      # uncomment the following line and modify the IP if you use this script outside Choregraphe.
      motion = ALProxy("ALMotion", "192.168.105.15", 9559)
      motion.stiffnessInterpolation("Body", 1.0, 0.1)
      motion.angleInterpolationBezier(names, times, keys);
    except BaseException, err:
      print err  
开发者ID:acley,项目名称:robot-practical-group-4,代码行数:104,代码来源:drop_action_server.py

示例6: __init__

# 需要导入模块: from naoqi import ALProxy [as 别名]
# 或者: from naoqi.ALProxy import angleInterpolationBezier [as 别名]

#.........这里部分代码省略.........
        names.append("HeadPitch")
        times.append([ 1.16000, 2.68000, 3.20000, 4.24000, 5.12000, 6.12000])
        keys.append([ [ 0.04363, [ 3, -0.38667, 0.00000], [ 3, 0.50667, 0.00000]], [ 0.26180, [ 3, -0.50667, 0.00000], [ 3, 0.17333, 0.00000]], [ 0.17453, [ 3, -0.17333, 0.06012], [ 3, 0.34667, -0.12023]], [ -0.27925, [ 3, -0.34667, 0.00000], [ 3, 0.29333, 0.00000]], [ -0.26180, [ 3, -0.29333, -0.00575], [ 3, 0.33333, 0.00653]], [ -0.24241, [ 3, -0.33333, 0.00000], [ 3, 0.00000, 0.00000]]])

        names.append("HeadYaw")
        times.append([ 1.16000, 2.68000, 3.20000, 4.24000, 5.12000, 6.12000])
        keys.append([ [ 0.00464, [ 3, -0.38667, 0.00000], [ 3, 0.50667, 0.00000]], [ -0.00149, [ 3, -0.50667, 0.00000], [ 3, 0.17333, 0.00000]], [ 0.00311, [ 3, -0.17333, 0.00000], [ 3, 0.34667, 0.00000]], [ -0.04905, [ 3, -0.34667, 0.00000], [ 3, 0.29333, 0.00000]], [ -0.03371, [ 3, -0.29333, -0.00382], [ 3, 0.33333, 0.00434]], [ -0.02459, [ 3, -0.33333, 0.00000], [ 3, 0.00000, 0.00000]]])

        names.append("LAnklePitch")
        times.append([ 1.04000, 1.76000, 2.56000, 4.12000, 5.00000, 6.00000])
        keys.append([ [ 0.03226, [ 3, -0.34667, 0.00000], [ 3, 0.24000, 0.00000]], [ 0.01745, [ 3, -0.24000, 0.00000], [ 3, 0.26667, 0.00000]], [ 0.01745, [ 3, -0.26667, 0.00000], [ 3, 0.52000, 0.00000]], [ 0.03491, [ 3, -0.52000, 0.00000], [ 3, 0.29333, 0.00000]], [ 0.03491, [ 3, -0.29333, 0.00000], [ 3, 0.33333, 0.00000]], [ 0.11501, [ 3, -0.33333, 0.00000], [ 3, 0.00000, 0.00000]]])

        names.append("LAnkleRoll")
        times.append([ 1.04000, 1.76000, 2.56000, 4.12000, 5.00000, 6.00000])
        keys.append([ [ 0.33161, [ 3, -0.34667, 0.00000], [ 3, 0.24000, 0.00000]], [ 0.36652, [ 3, -0.24000, 0.00000], [ 3, 0.26667, 0.00000]], [ 0.36652, [ 3, -0.26667, 0.00000], [ 3, 0.52000, 0.00000]], [ 0.36652, [ 3, -0.52000, 0.00000], [ 3, 0.29333, 0.00000]], [ 0.34732, [ 3, -0.29333, 0.01920], [ 3, 0.33333, -0.02182]], [ -0.08433, [ 3, -0.33333, 0.00000], [ 3, 0.00000, 0.00000]]])

        names.append("LElbowRoll")
        times.append([ 1.08000, 2.60000, 3.12000, 4.16000, 5.04000, 6.04000])
        keys.append([ [ -0.74096, [ 3, -0.36000, 0.00000], [ 3, 0.50667, 0.00000]], [ -1.03396, [ 3, -0.50667, 0.15621], [ 3, 0.17333, -0.05344]], [ -1.36990, [ 3, -0.17333, 0.00000], [ 3, 0.34667, 0.00000]], [ -1.02015, [ 3, -0.34667, -0.11965], [ 3, 0.29333, 0.10124]], [ -0.70722, [ 3, -0.29333, -0.10030], [ 3, 0.33333, 0.11398]], [ -0.37732, [ 3, -0.33333, 0.00000], [ 3, 0.00000, 0.00000]]])

        names.append("LElbowYaw")
        times.append([ 1.08000, 2.60000, 3.12000, 4.16000, 5.04000, 6.04000])
        keys.append([ [ -1.15353, [ 3, -0.36000, 0.00000], [ 3, 0.50667, 0.00000]], [ -0.95411, [ 3, -0.50667, -0.06096], [ 3, 0.17333, 0.02085]], [ -0.90809, [ 3, -0.17333, 0.00000], [ 3, 0.34667, 0.00000]], [ -1.23023, [ 3, -0.34667, 0.11716], [ 3, 0.29333, -0.09913]], [ -1.55697, [ 3, -0.29333, 0.00000], [ 3, 0.33333, 0.00000]], [ -1.14441, [ 3, -0.33333, 0.00000], [ 3, 0.00000, 0.00000]]])

        names.append("LHand")
        times.append([ 1.08000, 2.60000, 3.12000, 4.16000, 5.04000, 6.04000])
        keys.append([ [ 0.00317, [ 3, -0.36000, 0.00000], [ 3, 0.50667, 0.00000]], [ 0.00328, [ 3, -0.50667, -0.00003], [ 3, 0.17333, 0.00001]], [ 0.00329, [ 3, -0.17333, 0.00000], [ 3, 0.34667, 0.00000]], [ 0.00317, [ 3, -0.34667, 0.00000], [ 3, 0.29333, 0.00000]], [ 0.00325, [ 3, -0.29333, 0.00000], [ 3, 0.33333, 0.00000]], [ 0.00187, [ 3, -0.33333, 0.00000], [ 3, 0.00000, 0.00000]]])

        names.append("LHipPitch")
        times.append([ 1.04000, 2.56000, 3.08000, 3.36000, 4.12000, 5.00000, 6.00000])
        keys.append([ [ 0.23159, [ 3, -0.34667, 0.00000], [ 3, 0.50667, 0.00000]], [ 0.10580, [ 3, -0.50667, 0.00000], [ 3, 0.17333, 0.00000]], [ 0.12217, [ 3, -0.17333, 0.00000], [ 3, 0.09333, 0.00000]], [ 0.08433, [ 3, -0.09333, 0.00000], [ 3, 0.25333, 0.00000]], [ 0.09046, [ 3, -0.25333, -0.00614], [ 3, 0.29333, 0.00710]], [ 0.19171, [ 3, -0.29333, -0.01627], [ 3, 0.33333, 0.01849]], [ 0.21020, [ 3, -0.33333, 0.00000], [ 3, 0.00000, 0.00000]]])

        names.append("LHipRoll")
        times.append([ 1.04000, 2.56000, 3.08000, 3.36000, 4.12000, 5.00000, 6.00000])
        keys.append([ [ -0.34366, [ 3, -0.34667, 0.00000], [ 3, 0.50667, 0.00000]], [ -0.36820, [ 3, -0.50667, 0.00000], [ 3, 0.17333, 0.00000]], [ -0.36820, [ 3, -0.17333, 0.00000], [ 3, 0.09333, 0.00000]], [ -0.36513, [ 3, -0.09333, 0.00000], [ 3, 0.25333, 0.00000]], [ -0.36667, [ 3, -0.25333, 0.00000], [ 3, 0.29333, 0.00000]], [ -0.36513, [ 3, -0.29333, -0.00153], [ 3, 0.33333, 0.00174]], [ 0.10129, [ 3, -0.33333, 0.00000], [ 3, 0.00000, 0.00000]]])

        names.append("LHipYawPitch")
        times.append([ 1.04000, 2.56000, 3.08000, 3.36000, 4.12000, 5.00000, 6.00000])
        keys.append([ [ -0.18097, [ 3, -0.34667, 0.00000], [ 3, 0.50667, 0.00000]], [ -0.25307, [ 3, -0.50667, 0.00000], [ 3, 0.17333, 0.00000]], [ -0.06285, [ 3, -0.17333, -0.02279], [ 3, 0.09333, 0.01227]], [ -0.05058, [ 3, -0.09333, 0.00000], [ 3, 0.25333, 0.00000]], [ -0.18711, [ 3, -0.25333, 0.02986], [ 3, 0.29333, -0.03457]], [ -0.24386, [ 3, -0.29333, 0.02058], [ 3, 0.33333, -0.02339]], [ -0.31903, [ 3, -0.33333, 0.00000], [ 3, 0.00000, 0.00000]]])

        names.append("LKneePitch")
        times.append([ 1.04000, 1.76000, 2.56000, 3.08000, 3.36000, 4.12000, 5.00000, 6.00000])
        keys.append([ [ -0.08727, [ 3, -0.34667, 0.00000], [ 3, 0.24000, 0.00000]], [ -0.08727, [ 3, -0.24000, 0.00000], [ 3, 0.26667, 0.00000]], [ -0.09235, [ 3, -0.26667, 0.00000], [ 3, 0.17333, 0.00000]], [ -0.07973, [ 3, -0.17333, 0.00000], [ 3, 0.09333, 0.00000]], [ -0.07973, [ 3, -0.09333, 0.00000], [ 3, 0.25333, 0.00000]], [ -0.07819, [ 3, -0.25333, -0.00047], [ 3, 0.29333, 0.00055]], [ -0.07666, [ 3, -0.29333, 0.00000], [ 3, 0.33333, 0.00000]], [ -0.09208, [ 3, -0.33333, 0.00000], [ 3, 0.00000, 0.00000]]])

        names.append("LShoulderPitch")
        times.append([ 1.08000, 2.60000, 3.12000, 4.16000, 5.04000, 6.04000])
        keys.append([ [ 1.48649, [ 3, -0.36000, 0.00000], [ 3, 0.50667, 0.00000]], [ 1.35917, [ 3, -0.50667, 0.00000], [ 3, 0.17333, 0.00000]], [ 1.41746, [ 3, -0.17333, -0.02659], [ 3, 0.34667, 0.05318]], [ 1.59847, [ 3, -0.34667, -0.03988], [ 3, 0.29333, 0.03375]], [ 1.63835, [ 3, -0.29333, 0.00000], [ 3, 0.33333, 0.00000]], [ 1.50021, [ 3, -0.33333, 0.00000], [ 3, 0.00000, 0.00000]]])

        names.append("LShoulderRoll")
        times.append([ 1.08000, 2.60000, 3.12000, 4.16000, 5.04000, 6.04000])
        keys.append([ [ 0.02305, [ 3, -0.36000, 0.00000], [ 3, 0.50667, 0.00000]], [ 0.01998, [ 3, -0.50667, 0.00000], [ 3, 0.17333, 0.00000]], [ 0.13197, [ 3, -0.17333, 0.00000], [ 3, 0.34667, 0.00000]], [ 0.11816, [ 3, -0.34667, 0.01381], [ 3, 0.29333, -0.01168]], [ 0.02305, [ 3, -0.29333, 0.00000], [ 3, 0.33333, 0.00000]], [ 0.03524, [ 3, -0.33333, 0.00000], [ 3, 0.00000, 0.00000]]])

        names.append("LWristYaw")
        times.append([ 1.08000, 2.60000, 3.12000, 4.16000, 5.04000, 6.04000])
        keys.append([ [ 0.24435, [ 3, -0.36000, 0.00000], [ 3, 0.50667, 0.00000]], [ 0.23935, [ 3, -0.50667, 0.00500], [ 3, 0.17333, -0.00171]], [ 0.22094, [ 3, -0.17333, 0.00409], [ 3, 0.34667, -0.00818]], [ 0.20253, [ 3, -0.34667, 0.00554], [ 3, 0.29333, -0.00469]], [ 0.19026, [ 3, -0.29333, 0.01227], [ 3, 0.33333, -0.01394]], [ -0.12736, [ 3, -0.33333, 0.00000], [ 3, 0.00000, 0.00000]]])

        names.append("RAnklePitch")
        times.append([ 1.04000, 1.32000, 1.76000, 2.24000, 2.56000, 2.84000, 3.08000, 3.36000, 3.68000, 4.12000, 5.00000, 6.00000])
        keys.append([ [ 0.08727, [ 3, -0.34667, 0.00000], [ 3, 0.09333, 0.00000]], [ -0.08727, [ 3, -0.09333, 0.08824], [ 3, 0.14667, -0.13866]], [ -0.59341, [ 3, -0.14667, 0.00000], [ 3, 0.16000, 0.00000]], [ -0.40143, [ 3, -0.16000, -0.14312], [ 3, 0.10667, 0.09541]], [ 0.12217, [ 3, -0.10667, 0.00000], [ 3, 0.09333, 0.00000]], [ -0.05236, [ 3, -0.09333, 0.04386], [ 3, 0.08000, -0.03759]], [ -0.12217, [ 3, -0.08000, 0.00000], [ 3, 0.09333, 0.00000]], [ 0.24435, [ 3, -0.09333, 0.00000], [ 3, 0.10667, 0.00000]], [ -0.12217, [ 3, -0.10667, 0.12468], [ 3, 0.14667, -0.17144]], [ -0.64403, [ 3, -0.14667, 0.00000], [ 3, 0.29333, 0.00000]], [ -0.21991, [ 3, -0.29333, -0.11820], [ 3, 0.33333, 0.13432]], [ 0.11356, [ 3, -0.33333, 0.00000], [ 3, 0.00000, 0.00000]]])

        names.append("RAnkleRoll")
        times.append([ 1.04000, 2.56000, 3.08000, 3.36000, 4.12000, 5.00000, 6.00000])
        keys.append([ [ 0.40143, [ 3, -0.34667, 0.00000], [ 3, 0.50667, 0.00000]], [ 0.10887, [ 3, -0.50667, 0.00000], [ 3, 0.17333, 0.00000]], [ 0.13802, [ 3, -0.17333, 0.00000], [ 3, 0.09333, 0.00000]], [ 0.00000, [ 3, -0.09333, 0.00000], [ 3, 0.25333, 0.00000]], [ 0.18097, [ 3, -0.25333, -0.05338], [ 3, 0.29333, 0.06181]], [ 0.34558, [ 3, -0.29333, 0.00000], [ 3, 0.33333, 0.00000]], [ 0.05066, [ 3, -0.33333, 0.00000], [ 3, 0.00000, 0.00000]]])

        names.append("RElbowRoll")
        times.append([ 1.00000, 2.52000, 3.04000, 4.08000, 4.96000, 5.96000])
        keys.append([ [ 0.64117, [ 3, -0.33333, 0.00000], [ 3, 0.50667, 0.00000]], [ 1.15353, [ 3, -0.50667, -0.18364], [ 3, 0.17333, 0.06282]], [ 1.38056, [ 3, -0.17333, 0.00000], [ 3, 0.34667, 0.00000]], [ 1.36062, [ 3, -0.34667, 0.01994], [ 3, 0.29333, -0.01687]], [ 0.96024, [ 3, -0.29333, 0.14120], [ 3, 0.33333, -0.16046]], [ 0.45564, [ 3, -0.33333, 0.00000], [ 3, 0.00000, 0.00000]]])

        names.append("RElbowYaw")
        times.append([ 1.00000, 2.52000, 3.04000, 4.08000, 4.96000, 5.96000])
        keys.append([ [ 0.99714, [ 3, -0.33333, 0.00000], [ 3, 0.50667, 0.00000]], [ 0.86368, [ 3, -0.50667, 0.00000], [ 3, 0.17333, 0.00000]], [ 0.90970, [ 3, -0.17333, 0.00000], [ 3, 0.34667, 0.00000]], [ 0.63205, [ 3, -0.34667, 0.00000], [ 3, 0.29333, 0.00000]], [ 0.84834, [ 3, -0.29333, -0.13498], [ 3, 0.33333, 0.15339]], [ 1.49714, [ 3, -0.33333, 0.00000], [ 3, 0.00000, 0.00000]]])

        names.append("RHand")
        times.append([ 1.00000, 2.52000, 3.04000, 4.08000, 4.96000, 5.96000])
        keys.append([ [ 0.00129, [ 3, -0.33333, 0.00000], [ 3, 0.50667, 0.00000]], [ 0.00136, [ 3, -0.50667, 0.00000], [ 3, 0.17333, 0.00000]], [ 0.00132, [ 3, -0.17333, 0.00001], [ 3, 0.34667, -0.00002]], [ 0.00128, [ 3, -0.34667, 0.00000], [ 3, 0.29333, 0.00000]], [ 0.00133, [ 3, -0.29333, -0.00005], [ 3, 0.33333, 0.00006]], [ 0.00391, [ 3, -0.33333, 0.00000], [ 3, 0.00000, 0.00000]]])

        names.append("RHipPitch")
        times.append([ 1.04000, 2.56000, 3.08000, 3.36000, 4.12000, 5.00000, 6.00000])
        keys.append([ [ 0.16265, [ 3, -0.34667, 0.00000], [ 3, 0.50667, 0.00000]], [ -0.39726, [ 3, -0.50667, 0.31826], [ 3, 0.17333, -0.10888]], [ -1.11876, [ 3, -0.17333, 0.00190], [ 3, 0.09333, -0.00102]], [ -1.11978, [ 3, -0.09333, 0.00000], [ 3, 0.25333, 0.00000]], [ -0.78540, [ 3, -0.25333, -0.12796], [ 3, 0.29333, 0.14816]], [ -0.29142, [ 3, -0.29333, -0.15581], [ 3, 0.33333, 0.17705]], [ 0.21318, [ 3, -0.33333, 0.00000], [ 3, 0.00000, 0.00000]]])

        names.append("RHipRoll")
        times.append([ 1.04000, 2.56000, 3.08000, 3.36000, 4.12000, 5.00000, 6.00000])
        keys.append([ [ -0.47124, [ 3, -0.34667, 0.00000], [ 3, 0.50667, 0.00000]], [ -0.54001, [ 3, -0.50667, 0.00000], [ 3, 0.17333, 0.00000]], [ -0.32218, [ 3, -0.17333, -0.09040], [ 3, 0.09333, 0.04868]], [ -0.12276, [ 3, -0.09333, 0.00000], [ 3, 0.25333, 0.00000]], [ -0.36360, [ 3, -0.25333, 0.04547], [ 3, 0.29333, -0.05265]], [ -0.41713, [ 3, -0.29333, 0.00000], [ 3, 0.33333, 0.00000]], [ -0.05825, [ 3, -0.33333, 0.00000], [ 3, 0.00000, 0.00000]]])

        names.append("RKneePitch")
        times.append([ 1.04000, 2.56000, 2.84000, 3.08000, 3.36000, 4.12000, 5.00000, 6.00000])
        keys.append([ [ -0.08901, [ 3, -0.34667, 0.00000], [ 3, 0.50667, 0.00000]], [ 1.97575, [ 3, -0.50667, 0.00000], [ 3, 0.09333, 0.00000]], [ 1.97222, [ 3, -0.09333, 0.00353], [ 3, 0.08000, -0.00302]], [ 1.23918, [ 3, -0.08000, 0.26583], [ 3, 0.09333, -0.31013]], [ 0.24435, [ 3, -0.09333, 0.00000], [ 3, 0.25333, 0.00000]], [ 1.53589, [ 3, -0.25333, 0.00000], [ 3, 0.29333, 0.00000]], [ 0.62430, [ 3, -0.29333, 0.25160], [ 3, 0.33333, -0.28591]], [ -0.07666, [ 3, -0.33333, 0.00000], [ 3, 0.00000, 0.00000]]])

        names.append("RShoulderPitch")
        times.append([ 1.00000, 2.52000, 3.04000, 4.08000, 4.96000, 5.96000])
        keys.append([ [ 1.52782, [ 3, -0.33333, 0.00000], [ 3, 0.50667, 0.00000]], [ 1.46033, [ 3, -0.50667, 0.00000], [ 3, 0.17333, 0.00000]], [ 1.47413, [ 3, -0.17333, 0.00000], [ 3, 0.34667, 0.00000]], [ 1.24096, [ 3, -0.34667, 0.00000], [ 3, 0.29333, 0.00000]], [ 1.51862, [ 3, -0.29333, -0.02707], [ 3, 0.33333, 0.03076]], [ 1.54938, [ 3, -0.33333, 0.00000], [ 3, 0.00000, 0.00000]]])

        names.append("RShoulderRoll")
        times.append([ 1.00000, 2.52000, 3.04000, 4.08000, 4.96000, 5.96000])
        keys.append([ [ -0.12268, [ 3, -0.33333, 0.00000], [ 3, 0.50667, 0.00000]], [ -0.04138, [ 3, -0.50667, 0.00000], [ 3, 0.17333, 0.00000]], [ -0.14569, [ 3, -0.17333, 0.00000], [ 3, 0.34667, 0.00000]], [ -0.13955, [ 3, -0.34667, 0.00000], [ 3, 0.29333, 0.00000]], [ -0.14722, [ 3, -0.29333, 0.00000], [ 3, 0.33333, 0.00000]], [ -0.03993, [ 3, -0.33333, 0.00000], [ 3, 0.00000, 0.00000]]])

        names.append("RWristYaw")
        times.append([ 1.00000, 2.52000, 3.04000, 4.08000, 4.96000, 5.96000])
        keys.append([ [ -0.08727, [ 3, -0.33333, 0.00000], [ 3, 0.50667, 0.00000]], [ -0.07359, [ 3, -0.50667, -0.00911], [ 3, 0.17333, 0.00312]], [ -0.05058, [ 3, -0.17333, 0.00000], [ 3, 0.34667, 0.00000]], [ -0.06285, [ 3, -0.34667, 0.00000], [ 3, 0.29333, 0.00000]], [ 0.05680, [ 3, -0.29333, 0.00000], [ 3, 0.33333, 0.00000]], [ 0.00149, [ 3, -0.33333, 0.00000], [ 3, 0.00000, 0.00000]]])
        self.motion.angleInterpolationBezier(names, times, keys);
开发者ID:odinkruse,项目名称:Portfolio,代码行数:104,代码来源:kick.py

示例7: elif

# 需要导入模块: from naoqi import ALProxy [as 别名]
# 或者: from naoqi.ALProxy import angleInterpolationBezier [as 别名]
                        elif((x > down[1]) & (x <= winRange[1])): # RIGHT FAST
                            motionProxy.setWalkTargetVelocity(0, -0.7, 0, 0.2)
                            print "rightFast"

                        elif((x >= down[0]) & (x <= down[1])): # KICK / LOOK DOWN
                            if (dribble < 3):
                                motionProxy.setWalkTargetVelocity(0.7, 0, 0, 0.2)
                                dribble += 1
                                print "dribble # ", dribble

                            elif (dribble == 3):
                                headPitch = 0
                                stillWorking = False
                                postureProxy.goToPosture("StandInit", 0.8)
                                time2.sleep(1)
                                motionProxy.angleInterpolationBezier(namesLeft, timesLeft, keysLeft)
                                tts.say("Goal")
                                print "kick"
                                break


            ##################################################
            ##### BALL LOST Conditionals #################
            ##################################################
            # Turn Left toward ball if it is found
            elif((area > 40000)&(headYaw == 1)):
                commandGiven = False
                headYaw = 0
                headPitch = 0
                motionProxy.setAngles(["HeadYaw", "HeadPitch"],[0, 0], 1)
                motionProxy.setWalkTargetVelocity(0, 0, 1, 0.5)
开发者ID:brandonstrong,项目名称:school,代码行数:33,代码来源:Naoqi+Penalty+Kick.py

示例8: customInit

# 需要导入模块: from naoqi import ALProxy [as 别名]
# 或者: from naoqi.ALProxy import angleInterpolationBezier [as 别名]

#.........这里部分代码省略.........
    keys.append([[0.095066, [3, -0.106667, 0], [3, 0, 0]]])

    names.append("LAnkleRoll")
    times.append([ctime])
    keys.append([[-0.12147, [3, -0.106667, 0], [3, 0, 0]]])

    names.append("LElbowRoll")
    times.append([ctime])
    keys.append([[-0.421516, [3, -0.106667, 0], [3, 0, 0]]])

    names.append("LElbowYaw")
    times.append([ctime])
    keys.append([[-1.20074, [3, -0.106667, 0], [3, 0, 0]]])

    names.append("LHand")
    times.append([ctime])
    keys.append([[0.302384, [3, -0.106667, 0], [3, 0, 0]]])

    names.append("LHipPitch")
    times.append([ctime])
    keys.append([[0.123486, [3, -0.106667, 0], [3, 0, 0]]])

    names.append("LHipRoll")
    times.append([ctime])
    keys.append([[0.0988769, [3, -0.106667, 0], [3, 0, 0]]])

    names.append("LHipYawPitch")
    times.append([ctime])
    keys.append([[-0.17, [3, -0.106667, 0], [3, 0, 0]]])

    names.append("LKneePitch")
    times.append([ctime])
    keys.append([[-0.081128, [3, -0.106667, 0], [3, 0, 0]]])

    names.append("LShoulderPitch")
    times.append([ctime])
    keys.append([[1.36925, [3, -0.106667, 0], [3, 0, 0]]])

    names.append("LShoulderRoll")
    times.append([ctime])
    keys.append([[0.2633, [3, -0.106667, 0], [3, 0, 0]]])

    names.append("LWristYaw")
    times.append([ctime])
    keys.append([[0.0988521, [3, -0.106667, 0], [3, 0, 0]]])

    names.append("RAnklePitch")
    times.append([ctime])
    keys.append([[0.0850586, [3, -0.106667, 0], [3, 0, 0]]])

    names.append("RAnkleRoll")
    times.append([ctime])
    keys.append([[0.12147, [3, -0.106667, 0], [3, 0, 0]]])

    names.append("RElbowRoll")
    times.append([ctime])
    keys.append([[1.46998, [3, -0.106667, 0], [3, 0, 0]]])

    names.append("RElbowYaw")
    times.append([ctime])
    keys.append([[0.00254518, [3, -0.106667, 0], [3, 0, 0]]])

    names.append("RHand")
    times.append([ctime])
    keys.append([[0.04, [3, -0.106667, 0], [3, 0, 0]]])

    names.append("RHipPitch")
    times.append([ctime])
    keys.append([[0.123486, [3, -0.106667, 0], [3, 0, 0]]])

    names.append("RHipRoll")
    times.append([ctime])
    keys.append([[-0.0988769, [3, -0.106667, 0], [3, 0, 0]]])

    names.append("RHipYawPitch")
    times.append([ctime])
    keys.append([[-0.17, [3, -0.106667, 0], [3, 0, 0]]])

    names.append("RKneePitch")
    times.append([ctime])
    keys.append([[-0.081128, [3, -0.106667, 0], [3, 0, 0]]])

    names.append("RShoulderPitch")
    times.append([ctime])
    keys.append([[-0.00823033, [3, -0.106667, 0], [3, 0, 0]]])

    names.append("RShoulderRoll")
    times.append([ctime])
    keys.append([[-0.0128023, [3, -0.106667, 0], [3, 0, 0]]])

    names.append("RWristYaw")
    times.append([ctime])
    keys.append([[1.57346, [3, -0.106667, 0], [3, 0, 0]]])

    try:
        # uncomment the following line and modify the IP if you use this script outside Choregraphe.
        motion = ALProxy("ALMotion", robotIP, robotPort)
        motion.angleInterpolationBezier(names, times, keys)
    except BaseException as err:
        print(err)
开发者ID:CelyaRousseau,项目名称:naoleek,代码行数:104,代码来源:main.py

示例9: __init__

# 需要导入模块: from naoqi import ALProxy [as 别名]
# 或者: from naoqi.ALProxy import angleInterpolationBezier [as 别名]

#.........这里部分代码省略.........
    names.append("HeadPitch")
    times.append([ 2.00000])
    keys.append([ [ 0.00000, [ 3, -0.66667, 0.00000], [ 3, 0.00000, 0.00000]]])
    
    names.append("LShoulderPitch")
    times.append([ 2.00000])
    keys.append([ [ 1.39626, [ 3, -0.66667, 0.00000], [ 3, 0.00000, 0.00000]]])
    
    names.append("LShoulderRoll")
    times.append([ 2.00000])
    keys.append([ [ 0.34907, [ 3, -0.66667, 0.00000], [ 3, 0.00000, 0.00000]]])
    
    names.append("LElbowYaw")
    times.append([ 2.00000])
    keys.append([ [ -1.39626, [ 3, -0.66667, 0.00000], [ 3, 0.00000, 0.00000]]])
    
    names.append("LElbowRoll")
    times.append([ 2.00000])
    keys.append([ [ -1.04720, [ 3, -0.66667, 0.00000], [ 3, 0.00000, 0.00000]]])
    
    names.append("LWristYaw")
    times.append([ 2.00000])
    keys.append([ [ 0.00000, [ 3, -0.66667, 0.00000], [ 3, 0.00000, 0.00000]]])
    
    names.append("LHand")
    times.append([ 2.00000])
    keys.append([ [ 0.00000, [ 3, -0.66667, 0.00000], [ 3, 0.00000, 0.00000]]])
    
    names.append("RShoulderPitch")
    times.append([ 2.00000])
    keys.append([ [ 1.39626, [ 3, -0.66667, 0.00000], [ 3, 0.00000, 0.00000]]])
    
    names.append("RShoulderRoll")
    times.append([ 2.00000])
    keys.append([ [ -0.34907, [ 3, -0.66667, 0.00000], [ 3, 0.00000, 0.00000]]])
    
    names.append("RElbowYaw")
    times.append([ 2.00000])
    keys.append([ [ 1.39626, [ 3, -0.66667, 0.00000], [ 3, 0.00000, 0.00000]]])
    
    names.append("RElbowRoll")
    times.append([ 2.00000])
    keys.append([ [ 1.04720, [ 3, -0.66667, 0.00000], [ 3, 0.00000, 0.00000]]])
    
    names.append("RWristYaw")
    times.append([ 2.00000])
    keys.append([ [ 0.00000, [ 3, -0.66667, 0.00000], [ 3, 0.00000, 0.00000]]])
    
    names.append("RHand")
    times.append([ 2.00000])
    keys.append([ [ 0.00000, [ 3, -0.66667, 0.00000], [ 3, 0.00000, 0.00000]]])
    
    names.append("LHipYawPitch")
    times.append([ 2.00000])
    keys.append([ [ 0.00000, [ 3, -0.66667, 0.00000], [ 3, 0.00000, 0.00000]]])
    
    names.append("LHipRoll")
    times.append([ 2.00000])
    keys.append([ [ 0.00000, [ 3, -0.66667, 0.00000], [ 3, 0.00000, 0.00000]]])
    
    names.append("LHipPitch")
    times.append([ 2.00000])
    keys.append([ [ -0.43633, [ 3, -0.66667, 0.00000], [ 3, 0.00000, 0.00000]]])
    
    names.append("LKneePitch")
    times.append([ 2.00000])
    keys.append([ [ 0.69813, [ 3, -0.66667, 0.00000], [ 3, 0.00000, 0.00000]]])
    
    names.append("LAnklePitch")
    times.append([ 2.00000])
    keys.append([ [ -0.34907, [ 3, -0.66667, 0.00000], [ 3, 0.00000, 0.00000]]])
    
    names.append("LAnkleRoll")
    times.append([ 2.00000])
    keys.append([ [ 0.00000, [ 3, -0.66667, 0.00000], [ 3, 0.00000, 0.00000]]])
    
    names.append("RHipRoll")
    times.append([ 2.00000])
    keys.append([ [ 0.00000, [ 3, -0.66667, 0.00000], [ 3, 0.00000, 0.00000]]])
    
    names.append("RHipPitch")
    times.append([ 2.00000])
    keys.append([ [ -0.43633, [ 3, -0.66667, 0.00000], [ 3, 0.00000, 0.00000]]])
    
    names.append("RKneePitch")
    times.append([ 2.00000])
    keys.append([ [ 0.69813, [ 3, -0.66667, 0.00000], [ 3, 0.00000, 0.00000]]])
    
    names.append("RAnklePitch")
    times.append([ 2.00000])
    keys.append([ [ -0.34907, [ 3, -0.66667, 0.00000], [ 3, 0.00000, 0.00000]]])
    
    names.append("RAnkleRoll")
    times.append([ 2.00000])
    keys.append([ [ 0.00000, [ 3, -0.66667, 0.00000], [ 3, 0.00000, 0.00000]]])
    
    try:
      self._motion.angleInterpolationBezier(names, times, keys);
    except BaseException, err:
      print err
开发者ID:winxos,项目名称:nao,代码行数:104,代码来源:wsNaoMotion.py


注:本文中的naoqi.ALProxy.angleInterpolationBezier方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。