mirror of
https://github.com/soconnor0919/hristudio.git
synced 2025-12-11 22:54:45 -05:00
🤖 Full NAO6 Robot Integration with ROS2 and WebSocket Control ## New Features - **NAO6 Test Interface**: Real-time robot control via web browser at /nao-test - **ROS2 Integration**: Complete naoqi_driver2 + rosbridge setup with launch files - **WebSocket Control**: Direct robot control through HRIStudio web interface - **Plugin System**: NAO6 robot plugins for movement, speech, and sensors - **Database Integration**: Updated seed data with NAO6 robot and plugin definitions ## Key Components Added - **Web Interface**: src/app/(dashboard)/nao-test/page.tsx - Complete robot control dashboard - **Plugin Repository**: public/nao6-plugins/ - Local NAO6 plugin definitions - **Database Updates**: Updated robots table with ROS2 protocol and enhanced capabilities - **Comprehensive Documentation**: Complete setup, troubleshooting, and quick reference guides ## Documentation - **Complete Integration Guide**: docs/nao6-integration-complete-guide.md (630 lines) - **Quick Reference**: docs/nao6-quick-reference.md - Essential commands and troubleshooting - **Updated Setup Guide**: Enhanced docs/nao6-ros2-setup.md with critical notes - **Updated Main Docs**: docs/README.md with robot integration section ## Robot Capabilities - ✅ **Speech Control**: Text-to-speech with emotion and language support - ✅ **Movement Control**: Walking, turning, stopping with configurable speeds - ✅ **Head Control**: Precise yaw/pitch positioning with sliders - ✅ **Sensor Monitoring**: Joint states, touch sensors, sonar, cameras, IMU - ✅ **Safety Features**: Emergency stop, movement limits, real-time monitoring - ✅ **Real-time Data**: Live sensor data streaming through WebSocket ## Critical Discovery **Robot Wake-Up Requirement**: NAO robots start in safe mode with loose joints and must be explicitly awakened via SSH before movement commands work. This is now documented with automated solutions. ## Technical Implementation - **ROS2 Humble**: Complete naoqi_driver2 integration with rosbridge WebSocket server - **Topic Mapping**: Correct namespace handling for control vs. sensor topics - **Plugin Architecture**: Extensible NAO6 action definitions with parameter validation - **Database Schema**: Enhanced robots table with comprehensive NAO6 capabilities - **Import Consistency**: Fixed React import aliases to use ~ consistently ## Testing & Verification - ✅ Tested with NAO V6.0 / NAOqi 2.8.7.4 / ROS2 Humble - ✅ Complete end-to-end testing from web interface to robot movement - ✅ Comprehensive troubleshooting procedures documented - ✅ Production-ready launch scripts and deployment guides ## Production Ready This integration is fully tested and production-ready for Human-Robot Interaction research with complete documentation, safety guidelines, and troubleshooting procedures.
343 lines
9.6 KiB
JSON
343 lines
9.6 KiB
JSON
{
|
|
"name": "NAO6 Movement Control",
|
|
"version": "1.0.0",
|
|
"description": "Complete movement control for NAO6 robot including walking, turning, and joint manipulation",
|
|
"platform": "NAO6",
|
|
"category": "movement",
|
|
"manufacturer": {
|
|
"name": "SoftBank Robotics",
|
|
"website": "https://www.softbankrobotics.com"
|
|
},
|
|
"documentation": {
|
|
"mainUrl": "https://docs.hristudio.com/robots/nao6/movement",
|
|
"quickStart": "https://docs.hristudio.com/robots/nao6/movement/quickstart"
|
|
},
|
|
"ros2Config": {
|
|
"namespace": "/naoqi_driver",
|
|
"topics": {
|
|
"cmd_vel": {
|
|
"type": "geometry_msgs/Twist",
|
|
"description": "Velocity commands for robot base movement"
|
|
},
|
|
"joint_angles": {
|
|
"type": "naoqi_bridge_msgs/JointAnglesWithSpeed",
|
|
"description": "Individual joint angle control with speed"
|
|
},
|
|
"joint_states": {
|
|
"type": "sensor_msgs/JointState",
|
|
"description": "Current joint positions and velocities"
|
|
}
|
|
}
|
|
},
|
|
"actions": [
|
|
{
|
|
"id": "walk_forward",
|
|
"name": "Walk Forward",
|
|
"description": "Make the robot walk forward at specified speed",
|
|
"category": "movement",
|
|
"parameters": [
|
|
{
|
|
"name": "speed",
|
|
"type": "number",
|
|
"description": "Walking speed in m/s",
|
|
"required": true,
|
|
"min": 0.01,
|
|
"max": 0.3,
|
|
"default": 0.1,
|
|
"step": 0.01
|
|
},
|
|
{
|
|
"name": "duration",
|
|
"type": "number",
|
|
"description": "Duration to walk in seconds (0 = indefinite)",
|
|
"required": false,
|
|
"min": 0,
|
|
"max": 30,
|
|
"default": 0,
|
|
"step": 0.1
|
|
}
|
|
],
|
|
"implementation": {
|
|
"topic": "/naoqi_driver/cmd_vel",
|
|
"messageType": "geometry_msgs/Twist",
|
|
"messageTemplate": {
|
|
"linear": { "x": "{{speed}}", "y": 0, "z": 0 },
|
|
"angular": { "x": 0, "y": 0, "z": 0 }
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": "walk_backward",
|
|
"name": "Walk Backward",
|
|
"description": "Make the robot walk backward at specified speed",
|
|
"category": "movement",
|
|
"parameters": [
|
|
{
|
|
"name": "speed",
|
|
"type": "number",
|
|
"description": "Walking speed in m/s",
|
|
"required": true,
|
|
"min": 0.01,
|
|
"max": 0.3,
|
|
"default": 0.1,
|
|
"step": 0.01
|
|
},
|
|
{
|
|
"name": "duration",
|
|
"type": "number",
|
|
"description": "Duration to walk in seconds (0 = indefinite)",
|
|
"required": false,
|
|
"min": 0,
|
|
"max": 30,
|
|
"default": 0,
|
|
"step": 0.1
|
|
}
|
|
],
|
|
"implementation": {
|
|
"topic": "/naoqi_driver/cmd_vel",
|
|
"messageType": "geometry_msgs/Twist",
|
|
"messageTemplate": {
|
|
"linear": { "x": "-{{speed}}", "y": 0, "z": 0 },
|
|
"angular": { "x": 0, "y": 0, "z": 0 }
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": "turn_left",
|
|
"name": "Turn Left",
|
|
"description": "Make the robot turn left at specified angular speed",
|
|
"category": "movement",
|
|
"parameters": [
|
|
{
|
|
"name": "speed",
|
|
"type": "number",
|
|
"description": "Angular speed in rad/s",
|
|
"required": true,
|
|
"min": 0.1,
|
|
"max": 1.0,
|
|
"default": 0.3,
|
|
"step": 0.1
|
|
},
|
|
{
|
|
"name": "duration",
|
|
"type": "number",
|
|
"description": "Duration to turn in seconds (0 = indefinite)",
|
|
"required": false,
|
|
"min": 0,
|
|
"max": 30,
|
|
"default": 0,
|
|
"step": 0.1
|
|
}
|
|
],
|
|
"implementation": {
|
|
"topic": "/naoqi_driver/cmd_vel",
|
|
"messageType": "geometry_msgs/Twist",
|
|
"messageTemplate": {
|
|
"linear": { "x": 0, "y": 0, "z": 0 },
|
|
"angular": { "x": 0, "y": 0, "z": "{{speed}}" }
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": "turn_right",
|
|
"name": "Turn Right",
|
|
"description": "Make the robot turn right at specified angular speed",
|
|
"category": "movement",
|
|
"parameters": [
|
|
{
|
|
"name": "speed",
|
|
"type": "number",
|
|
"description": "Angular speed in rad/s",
|
|
"required": true,
|
|
"min": 0.1,
|
|
"max": 1.0,
|
|
"default": 0.3,
|
|
"step": 0.1
|
|
},
|
|
{
|
|
"name": "duration",
|
|
"type": "number",
|
|
"description": "Duration to turn in seconds (0 = indefinite)",
|
|
"required": false,
|
|
"min": 0,
|
|
"max": 30,
|
|
"default": 0,
|
|
"step": 0.1
|
|
}
|
|
],
|
|
"implementation": {
|
|
"topic": "/naoqi_driver/cmd_vel",
|
|
"messageType": "geometry_msgs/Twist",
|
|
"messageTemplate": {
|
|
"linear": { "x": 0, "y": 0, "z": 0 },
|
|
"angular": { "x": 0, "y": 0, "z": "-{{speed}}" }
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": "stop_movement",
|
|
"name": "Stop Movement",
|
|
"description": "Immediately stop all robot movement",
|
|
"category": "movement",
|
|
"parameters": [],
|
|
"implementation": {
|
|
"topic": "/naoqi_driver/cmd_vel",
|
|
"messageType": "geometry_msgs/Twist",
|
|
"messageTemplate": {
|
|
"linear": { "x": 0, "y": 0, "z": 0 },
|
|
"angular": { "x": 0, "y": 0, "z": 0 }
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": "move_head",
|
|
"name": "Move Head",
|
|
"description": "Control head orientation (yaw and pitch)",
|
|
"category": "movement",
|
|
"parameters": [
|
|
{
|
|
"name": "yaw",
|
|
"type": "number",
|
|
"description": "Head yaw angle in radians",
|
|
"required": true,
|
|
"min": -2.09,
|
|
"max": 2.09,
|
|
"default": 0,
|
|
"step": 0.1
|
|
},
|
|
{
|
|
"name": "pitch",
|
|
"type": "number",
|
|
"description": "Head pitch angle in radians",
|
|
"required": true,
|
|
"min": -0.67,
|
|
"max": 0.51,
|
|
"default": 0,
|
|
"step": 0.1
|
|
},
|
|
{
|
|
"name": "speed",
|
|
"type": "number",
|
|
"description": "Movement speed (0.1 = slow, 1.0 = fast)",
|
|
"required": false,
|
|
"min": 0.1,
|
|
"max": 1.0,
|
|
"default": 0.3,
|
|
"step": 0.1
|
|
}
|
|
],
|
|
"implementation": {
|
|
"topic": "/naoqi_driver/joint_angles",
|
|
"messageType": "naoqi_bridge_msgs/JointAnglesWithSpeed",
|
|
"messageTemplate": {
|
|
"joint_names": ["HeadYaw", "HeadPitch"],
|
|
"joint_angles": ["{{yaw}}", "{{pitch}}"],
|
|
"speed": "{{speed}}"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"id": "move_arm",
|
|
"name": "Move Arm",
|
|
"description": "Control arm joint positions",
|
|
"category": "movement",
|
|
"parameters": [
|
|
{
|
|
"name": "arm",
|
|
"type": "select",
|
|
"description": "Which arm to control",
|
|
"required": true,
|
|
"options": [
|
|
{ "value": "left", "label": "Left Arm" },
|
|
{ "value": "right", "label": "Right Arm" }
|
|
],
|
|
"default": "right"
|
|
},
|
|
{
|
|
"name": "shoulder_pitch",
|
|
"type": "number",
|
|
"description": "Shoulder pitch angle in radians",
|
|
"required": true,
|
|
"min": -2.09,
|
|
"max": 2.09,
|
|
"default": 1.4,
|
|
"step": 0.1
|
|
},
|
|
{
|
|
"name": "shoulder_roll",
|
|
"type": "number",
|
|
"description": "Shoulder roll angle in radians",
|
|
"required": true,
|
|
"min": -0.31,
|
|
"max": 1.33,
|
|
"default": 0.2,
|
|
"step": 0.1
|
|
},
|
|
{
|
|
"name": "elbow_yaw",
|
|
"type": "number",
|
|
"description": "Elbow yaw angle in radians",
|
|
"required": true,
|
|
"min": -2.09,
|
|
"max": 2.09,
|
|
"default": 0,
|
|
"step": 0.1
|
|
},
|
|
{
|
|
"name": "elbow_roll",
|
|
"type": "number",
|
|
"description": "Elbow roll angle in radians",
|
|
"required": true,
|
|
"min": -1.54,
|
|
"max": -0.03,
|
|
"default": -0.5,
|
|
"step": 0.1
|
|
},
|
|
{
|
|
"name": "speed",
|
|
"type": "number",
|
|
"description": "Movement speed (0.1 = slow, 1.0 = fast)",
|
|
"required": false,
|
|
"min": 0.1,
|
|
"max": 1.0,
|
|
"default": 0.3,
|
|
"step": 0.1
|
|
}
|
|
],
|
|
"implementation": {
|
|
"topic": "/naoqi_driver/joint_angles",
|
|
"messageType": "naoqi_bridge_msgs/JointAnglesWithSpeed",
|
|
"messageTemplate": {
|
|
"joint_names": [
|
|
"{{arm === 'left' ? 'L' : 'R'}}ShoulderPitch",
|
|
"{{arm === 'left' ? 'L' : 'R'}}ShoulderRoll",
|
|
"{{arm === 'left' ? 'L' : 'R'}}ElbowYaw",
|
|
"{{arm === 'left' ? 'L' : 'R'}}ElbowRoll"
|
|
],
|
|
"joint_angles": ["{{shoulder_pitch}}", "{{shoulder_roll}}", "{{elbow_yaw}}", "{{elbow_roll}}"],
|
|
"speed": "{{speed}}"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"safety": {
|
|
"maxSpeed": 0.3,
|
|
"emergencyStop": {
|
|
"action": "stop_movement",
|
|
"description": "Immediately stops all movement"
|
|
},
|
|
"jointLimits": {
|
|
"HeadYaw": { "min": -2.09, "max": 2.09 },
|
|
"HeadPitch": { "min": -0.67, "max": 0.51 },
|
|
"LShoulderPitch": { "min": -2.09, "max": 2.09 },
|
|
"RShoulderPitch": { "min": -2.09, "max": 2.09 },
|
|
"LShoulderRoll": { "min": -0.31, "max": 1.33 },
|
|
"RShoulderRoll": { "min": -1.33, "max": 0.31 },
|
|
"LElbowYaw": { "min": -2.09, "max": 2.09 },
|
|
"RElbowYaw": { "min": -2.09, "max": 2.09 },
|
|
"LElbowRoll": { "min": 0.03, "max": 1.54 },
|
|
"RElbowRoll": { "min": -1.54, "max": -0.03 }
|
|
}
|
|
}
|
|
}
|