fix(nao6): use joint angles for gestures instead of animation markup

- Change open_hand_wave, show_sole, present_object, think to use /joint_angles
- Change play_animation to Say Phrase with animated speech
- Animation ^start() markup doesn't work with ALTextToSpeech
- Joint angles work reliably with ALMotion
This commit is contained in:
2026-04-01 17:06:03 -04:00
parent b9be426805
commit 442be9f6c6
+57 -51
View File
@@ -1496,45 +1496,35 @@
}, },
{ {
"id": "play_animation", "id": "play_animation",
"name": "Play Animation", "name": "Say Phrase",
"description": "Play a predefined NAO animation/gesture", "description": "Say a phrase with animated speech",
"category": "movement", "category": "interaction",
"icon": "play", "icon": "message-circle",
"timeout": 5000, "timeout": 5000,
"retryable": true, "retryable": true,
"parameterSchema": { "parameterSchema": {
"type": "object", "type": "object",
"properties": { "properties": {
"animation": { "text": {
"type": "string", "type": "string",
"enum": [ "default": "Hello!",
"Hey_1", "description": "Text to say"
"Happy_1", },
"Happy_4", "emotion": {
"Enthusiastic_1", "type": "string",
"Yes_1", "enum": ["neutral", "happy", "sad", "excited", "calm"],
"Yes_2", "default": "neutral",
"No_1", "description": "Speech emotion"
"Blow_1",
"Gesture_Ok_1",
"Gesture_Nice_1",
"Gesture_You_1",
"Open_1",
"ShowSole_1",
"Show_1"
],
"default": "Hey_1",
"description": "Animation to play"
} }
}, },
"required": ["animation"] "required": ["text"]
}, },
"ros2": { "ros2": {
"messageType": "std_msgs/msg/String", "messageType": "std_msgs/msg/String",
"topic": "/speech", "topic": "/speech",
"payloadMapping": { "payloadMapping": {
"type": "transform", "type": "transform",
"transformFn": "transformToAnimation" "transformFn": "transformToEmotionalSpeech"
} }
}, },
"implementation": { "implementation": {
@@ -1542,14 +1532,14 @@
"topic": "/speech", "topic": "/speech",
"messageType": "std_msgs/msg/String", "messageType": "std_msgs/msg/String",
"messageTemplate": { "messageTemplate": {
"data": "^start(animations/Stand/Gestures/{{animation}})" "data": "{{text}}"
} }
} }
}, },
{ {
"id": "open_hand_wave", "id": "open_hand_wave",
"name": "Open Hand Wave", "name": "Open Hand Wave",
"description": "Wave with open palm gesture", "description": "Raise arm with open palm",
"category": "movement", "category": "movement",
"icon": "hand", "icon": "hand",
"timeout": 2500, "timeout": 2500,
@@ -1559,21 +1549,25 @@
"properties": {} "properties": {}
}, },
"ros2": { "ros2": {
"messageType": "std_msgs/msg/String", "messageType": "naoqi_bridge_msgs/msg/JointAnglesWithSpeed",
"topic": "/speech", "topic": "/joint_angles",
"payloadMapping": { "payloadMapping": {
"type": "static", "type": "static",
"payload": { "payload": {
"data": "^start(animations/Stand/Gestures/Open_1)" "joint_names": ["RShoulderPitch", "RShoulderRoll", "RElbowYaw", "RElbowRoll", "RWristYaw"],
"joint_angles": [0.8, -0.2, -1.5, -0.1, 0.0],
"speed": 0.3
} }
} }
}, },
"implementation": { "implementation": {
"type": "ros2_topic", "type": "ros2_topic",
"topic": "/speech", "topic": "/joint_angles",
"messageType": "std_msgs/msg/String", "messageType": "naoqi_bridge_msgs/msg/JointAnglesWithSpeed",
"messageTemplate": { "messageTemplate": {
"data": "^start(animations/Stand/Gestures/Open_1)" "joint_names": ["RShoulderPitch", "RShoulderRoll", "RElbowYaw", "RElbowRoll", "RWristYaw"],
"joint_angles": [0.8, -0.2, -1.5, -0.1, 0.0],
"speed": 0.3
} }
} }
}, },
@@ -1590,21 +1584,25 @@
"properties": {} "properties": {}
}, },
"ros2": { "ros2": {
"messageType": "std_msgs/msg/String", "messageType": "naoqi_bridge_msgs/msg/JointAnglesWithSpeed",
"topic": "/speech", "topic": "/joint_angles",
"payloadMapping": { "payloadMapping": {
"type": "static", "type": "static",
"payload": { "payload": {
"data": "^start(animations/Stand/Gestures/ShowSole_1)" "joint_names": ["RShoulderPitch", "RShoulderRoll", "RElbowYaw", "RElbowRoll"],
"joint_angles": [0.5, -0.8, -0.5, 0.0],
"speed": 0.3
} }
} }
}, },
"implementation": { "implementation": {
"type": "ros2_topic", "type": "ros2_topic",
"topic": "/speech", "topic": "/joint_angles",
"messageType": "std_msgs/msg/String", "messageType": "naoqi_bridge_msgs/msg/JointAnglesWithSpeed",
"messageTemplate": { "messageTemplate": {
"data": "^start(animations/Stand/Gestures/ShowSole_1)" "joint_names": ["RShoulderPitch", "RShoulderRoll", "RElbowYaw", "RElbowRoll"],
"joint_angles": [0.5, -0.8, -0.5, 0.0],
"speed": 0.3
} }
} }
}, },
@@ -1621,21 +1619,25 @@
"properties": {} "properties": {}
}, },
"ros2": { "ros2": {
"messageType": "std_msgs/msg/String", "messageType": "naoqi_bridge_msgs/msg/JointAnglesWithSpeed",
"topic": "/speech", "topic": "/joint_angles",
"payloadMapping": { "payloadMapping": {
"type": "static", "type": "static",
"payload": { "payload": {
"data": "^start(animations/Stand/Gestures/Show_1)" "joint_names": ["RShoulderPitch", "RShoulderRoll", "RElbowYaw", "RElbowRoll"],
"joint_angles": [0.3, -0.5, -1.0, -0.2],
"speed": 0.3
} }
} }
}, },
"implementation": { "implementation": {
"type": "ros2_topic", "type": "ros2_topic",
"topic": "/speech", "topic": "/joint_angles",
"messageType": "std_msgs/msg/String", "messageType": "naoqi_bridge_msgs/msg/JointAnglesWithSpeed",
"messageTemplate": { "messageTemplate": {
"data": "^start(animations/Stand/Gestures/Show_1)" "joint_names": ["RShoulderPitch", "RShoulderRoll", "RElbowYaw", "RElbowRoll"],
"joint_angles": [0.3, -0.5, -1.0, -0.2],
"speed": 0.3
} }
} }
}, },
@@ -1687,21 +1689,25 @@
"properties": {} "properties": {}
}, },
"ros2": { "ros2": {
"messageType": "std_msgs/msg/String", "messageType": "naoqi_bridge_msgs/msg/JointAnglesWithSpeed",
"topic": "/speech", "topic": "/joint_angles",
"payloadMapping": { "payloadMapping": {
"type": "static", "type": "static",
"payload": { "payload": {
"data": "^start(animations/Stand/Gestures/Gesture_You_1)" "joint_names": ["RElbowRoll", "RElbowYaw", "RShoulderPitch", "RShoulderRoll"],
"joint_angles": [-1.5, 0.3, 1.5, 0.2],
"speed": 0.2
} }
} }
}, },
"implementation": { "implementation": {
"type": "ros2_topic", "type": "ros2_topic",
"topic": "/speech", "topic": "/joint_angles",
"messageType": "std_msgs/msg/String", "messageType": "naoqi_bridge_msgs/msg/JointAnglesWithSpeed",
"messageTemplate": { "messageTemplate": {
"data": "^start(animations/Stand/Gestures/Gesture_You_1)" "joint_names": ["RElbowRoll", "RElbowYaw", "RShoulderPitch", "RShoulderRoll"],
"joint_angles": [-1.5, 0.3, 1.5, 0.2],
"speed": 0.2
} }
} }
}, },