working on cena gesture

This commit is contained in:
Lucca Pirovano
2026-07-16 14:41:23 -04:00
parent ca196f5f1e
commit c6b9cb0718
+11 -15
View File
@@ -251,27 +251,23 @@ class NaoTeleop:
def cena_gesture(self): def cena_gesture(self):
if self.typing_mode: return if self.typing_mode: return
print("👋 YOU CAN'T SEE ME! (Pendulum Sweep)") print("👋 YOU CAN'T SEE ME!")
try: try:
# 1. Trigger the classic line
self.tts.say("You can't see me")
self.motion.setStiffnesses("RArm", 1.0) self.motion.setStiffnesses("RArm", 1.0)
names = ["RShoulderPitch", "RShoulderRoll", "RElbowYaw", "RElbowRoll", "RWristYaw", "RHand"] names = ["RShoulderPitch", "RShoulderRoll", "RElbowYaw", "RElbowRoll", "RWristYaw", "RHand"]
# Anchor pose: Arm brought up to face, elbow bent. # Setup for tight, face-level sweep
# RShoulderRoll -0.2 (closer to body), RElbowRoll 1.3 (vertical). tight_setup = [-0.4, -0.2, 0.0, 1.2, 1.5, 1.0]
# The swing happens on RElbowYaw. self.motion.angleInterpolation(names, tight_setup, [0.5]*6, True)
# Setup: Move to start position at the side of the face # The horizontal "backhand" sweep
# Setting up the pose first self.motion.angleInterpolation(["RElbowYaw"], [0.8], 0.4, True)
self.motion.angleInterpolation(["RShoulderPitch", "RShoulderRoll", "RElbowYaw", "RElbowRoll", "RWristYaw", "RHand"], self.motion.angleInterpolation(["RElbowYaw"], [-0.8], 0.6, True)
[-0.2, -0.2, -0.6, 1.3, 1.2, 1.0], 0.5, True) self.motion.angleInterpolation(["RElbowYaw"], [0.0], 0.4, True)
# The Pendulum Sweep: Moving RElbowYaw from left to right across the face
# Swings from -0.6 to 0.6
self.motion.angleInterpolation(["RElbowYaw"], [0.6], 0.8, True)
# Optional: Add a second faster sweep if you want
self.motion.angleInterpolation(["RElbowYaw"], [-0.6], 0.6, True)
# Return to neutral # Return to neutral
neutral = [1.5, -0.15, 1.2, 0.5, 0.0, 0.0] neutral = [1.5, -0.15, 1.2, 0.5, 0.0, 0.0]
self.motion.angleInterpolationWithSpeed(names, neutral, 0.3) self.motion.angleInterpolationWithSpeed(names, neutral, 0.3)