adjusted speeds for kick
This commit is contained in:
@@ -7,17 +7,22 @@ from naoqi import ALProxy
|
|||||||
class NaoMover(object):
|
class NaoMover(object):
|
||||||
|
|
||||||
KICK_SEQUENCE = [
|
KICK_SEQUENCE = [
|
||||||
(0, 'ShoulderRoll', 45, 0.025),
|
# base_or_kicking, unsymmetric, joint, angle, speed
|
||||||
#'wait',
|
|
||||||
(0, 'AnkleRoll', 10, 0.05),
|
[[(0, 1, 'ShoulderRoll', -70, 0.025)], 1],
|
||||||
(1, 'AnkleRoll', 10, 0.05),
|
|
||||||
'wait',
|
[[(0, 1, 'AnkleRoll', -10, 0.05),
|
||||||
(1, 'KneePitch', 90, 0.05),
|
(1, 1, 'AnkleRoll', -10, 0.05)],
|
||||||
(1, 'AnklePitch', -40, 0.05),
|
2],
|
||||||
'wait',
|
|
||||||
(1, 'HipPitch', -45, 0.08),
|
[[(1, 0, 'KneePitch', 90, 0.05),
|
||||||
(1, 'KneePitch', 10, 0.20),
|
(1, 0, 'AnklePitch', -40, 0.05)],
|
||||||
(1, 'AnklePitch', 20, 0.16)
|
3,],
|
||||||
|
|
||||||
|
[[(1, 0, 'HipPitch', -45, 0.08),
|
||||||
|
(1, 0, 'KneePitch', 10, 0.20),
|
||||||
|
(1, 0, 'AnklePitch', 20, 0.16)],
|
||||||
|
10]
|
||||||
]
|
]
|
||||||
|
|
||||||
def __init__(self, nao_ip, nao_port=9559):
|
def __init__(self, nao_ip, nao_port=9559):
|
||||||
@@ -45,13 +50,12 @@ class NaoMover(object):
|
|||||||
sides = ['R', 'L']
|
sides = ['R', 'L']
|
||||||
elif foot == 'R':
|
elif foot == 'R':
|
||||||
sides = ['L', 'R']
|
sides = ['L', 'R']
|
||||||
reverse = []
|
for motion, wait in self.KICK_SEQUENCE:
|
||||||
for motion in self.KICK_SEQUENCE:
|
for part in motion:
|
||||||
if motion == 'wait':
|
print(part)
|
||||||
sleep(3)
|
side, unsymmetric, joint, angle, speed = part
|
||||||
else:
|
if foot == 'R' and unsymmetric:
|
||||||
print(motion)
|
angle *= -1
|
||||||
side, joint, angle, speed = motion
|
|
||||||
self.mp.setAngles(
|
self.mp.setAngles(
|
||||||
[sides[side] + joint], [radians(angle)], speed * multiplier
|
[sides[side] + joint], [radians(angle)], speed * multiplier
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user