Commit Graph

79 Commits

Author SHA1 Message Date
cc58593891 Update robot-plugins submodule 2026-03-21 20:21:38 -04:00
bbbe397ba8 Various improvements: study forms, participant management, PDF generator, robot integration 2026-03-21 20:21:18 -04:00
bbc34921b5 Fix branching logic and robot action timing
- Remove onCompleted() call after branch selection to prevent count increment
- Add proper duration estimation for speech actions (word count + emotion overhead)
- Add say_with_emotion and wave_goodbye to built-in actions
- Add identifier field to admin.ts plugin creation
2026-03-21 20:15:39 -04:00
8e647c958e Fix seed script to include identifier for system plugins 2026-03-21 20:04:46 -04:00
4e86546311 Add identifier column to plugins table for cleaner plugin lookup
- Added 'identifier' column (unique) for machine-readable plugin ID
- 'name' now used for display name only
- Updated trial-execution to look up by identifier first, then name
- Added migration script for existing databases
2026-03-21 20:03:33 -04:00
e84c794962 Load plugin from local file first (not remote) 2026-03-21 19:32:13 -04:00
70064f487e Fix say_with_emotion with proper NAOqi markup, add transform functions, update seed script for linear branching 2026-03-21 19:29:28 -04:00
91d03a789d Redesign experiment structure and add pending trial
- Both branch choices now jump to Story Continues (convergence point)
- Add Story Continues step with expressive actions
- Add pre-seeded pending trial for immediate testing
- Fix duplicate comments in seed script
- Update step ordering (Conclusion now step6)
2026-03-21 19:15:41 -04:00
31d2173703 Fix branching and add move_arm builtin
- Branching: mark source step as completed when jumping to prevent revisiting
- Add move_arm as builtin for arm control
2026-03-21 19:09:26 -04:00
4a9abf4ff1 Restore builtins for standard ROS actions
- Re-add say_text, walk_forward, walk_backward, turn_left, turn_right, move_head, turn_head as builtins
- These use standard ROS topics (/speech, /cmd_vel, /joint_angles) that work with most robots
- Plugin-specific actions should still be defined in plugin config
2026-03-21 19:04:51 -04:00
487f97c5c2 Update robot-plugins submodule 2026-03-21 18:58:29 -04:00
db147f2294 Update robot-plugins submodule 2026-03-21 18:57:00 -04:00
a705c720fb Make wizard-ros-service robot-agnostic
- Remove NAO-specific hardcoded action handlers
- Remove helper methods (executeMovementAction, executeTurnHead, executeMoveArm)
- Keep only generic emergency_stop as builtin
- All robot-specific actions should be defined in plugin config
2026-03-21 18:55:52 -04:00
e460c1b029 Update robot-plugins submodule 2026-03-21 18:54:18 -04:00
eb0d86f570 Clean up debug logs 2026-03-21 18:52:16 -04:00
e40c37cfd0 Fix branching logic and add combo robot actions
- Fix handleNextStep to handle both string and object options in conditions
- Add say_with_emotion, bow, wave, nod, shake_head, point combo actions
- Update seed data with nextStepId in wizard_wait_for_response options
2026-03-21 18:51:27 -04:00
f8e6fccae3 Update robot-plugins submodule 2026-03-21 18:28:07 -04:00
3f87588fea fix: Update ROS topics and robot configuration
ROS Topic Fixes:
- wizard-ros-service.ts: Use correct ROS topics (/cmd_vel, /joint_angles, /speech)
- ros-bridge.ts: Update subscriptions to match naoqi_driver topics
- Fixes action execution (movement, speech, head control)

Robot Configuration:
- robots.ts: Use NAO_IP/NAO_ROBOT_IP env vars instead of hardcoded 'nao.local'
- robots.ts: Use NAO_PASSWORD env var for SSH authentication
- Improves Docker integration with NAO6

Wizard Interface:
- useWizardRos.ts: Enhanced wizard interface for robot control
- WizardInterface.tsx: Updated wizard controls
- Add comprehensive event listeners for robot actions
2026-03-21 17:58:29 -04:00
18e5aab4a5 feat: Convert robot-plugins to proper git submodule
- Removes nested .git directory from robot-plugins
- Adds robot-plugins as a proper submodule of hristudio
- Points to main branch of soconnor0919/robot-plugins repository
- This enables proper version tracking and updates of robot plugins
2026-03-21 17:57:54 -04:00
c16d0d2565 feat: Add uuid package and its types to dependencies. 2026-03-19 17:40:39 -04:00
c37acad3d2 feat: Enforce study membership access for file uploads and integrate live system statistics. 2026-03-06 00:22:22 -05:00
0051946bde feat: Implement digital signatures for participant consent and introduce study forms management. 2026-03-02 10:51:20 -05:00
61af467cc8 feat: enhance experiment designer action definitions, refactor trial analysis UI, and update video playback controls 2026-03-01 19:00:23 -05:00
60d4fae72c feat: Enhance trial event display with improved formatting and icons, refine trial wizard panels, and update dashboard page layouts. 2026-02-20 00:37:33 -05:00
72971a4b49 feat(analytics): refine timeline visualization and add print support 2026-02-17 21:17:11 -05:00
568d408587 feat: Add guided tour functionality for analytics and wizard components, including new tour steps and triggers. 2026-02-12 00:53:28 -05:00
93de577939 feat: Add a new onboarding tour for participant creation and refactor consent form uploads to use sonner for toasts and XMLHttpRequest for progress tracking. 2026-02-11 23:49:51 -05:00
85b951f742 refactor: restructure study and participant forms into logical sections with separators and enhance EntityForm's layout flexibility for sidebar presence. 2026-02-10 16:31:43 -05:00
a8c868ad3f feat: Implement trial event logging, archiving, experiment soft deletion, and new analytics/event data tables. 2026-02-10 16:14:31 -05:00
0f535f6887 feat: introduce conditional steps and branching logic to the experiment wizard and designer, along with new core and WoZ plugins. 2026-02-10 10:24:09 -05:00
388897c70e feat: Implement collapsible left and right panels with dynamic column spanning, updated styling, and integrated a bottom status bar in the DesignerRoot. 2026-02-03 13:58:47 -05:00
0ec63b3c97 feat: Redesign the designer layout using a grid system, adding explicit left, center, and right panels with collapse functionality. 2026-02-02 15:48:17 -05:00
89c44efcf7 feat: Implement responsive design for the experiment designer and enhance general UI components with hover effects and shadows. 2026-02-02 12:51:53 -05:00
7fd0d97a67 feat: Implement dynamic plugin definition loading from remote/local sources and standardize action IDs using plugin metadata. 2026-02-02 12:05:52 -05:00
54c34b6f7d add help mode 2026-02-01 23:27:00 -05:00
5b7d4e79fe Merge master into nao_ros2 (Redesign & Fixes) 2026-02-01 22:33:20 -05:00
dbfdd91dea feat: Redesign Landing, Auth, and Dashboard Pages
Also fixed schema type exports and seed script errors.
2026-02-01 22:28:19 -05:00
4fbd3be324 Break work 2026-01-20 09:38:07 -05:00
d83c02759a feat: Introduce dedicated participant, experiment, and trial detail/edit pages, enable MinIO, and refactor dashboard navigation. 2025-12-11 20:04:52 -05:00
5be4ff0372 refactor: simplify wizard UI by removing trial monitoring and robot control tabs, and streamlining monitoring panel props. 2025-11-20 14:52:08 -05:00
1108f4d25d fix: prevent auto-connect from getting stuck in connecting state
Added comment to clarify that connection state updates happen via
event handlers. Auto-connect now properly handles failures without
retrying automatically, allowing users to manually connect if needed.
2025-11-19 22:56:24 -05:00
5631c69a76 fix: remove invalid battery subscription causing ROS Bridge error
The naoqi_bridge_msgs/BatteryState message type doesn't exist in the
NAO6 ROS2 package, causing subscription errors. Removed the battery
topic subscription for now. Battery info can be obtained through
diagnostics or other means if needed in the future.
2025-11-19 22:52:21 -05:00
18fa6bff5f fix: migrate wizard from polling to WebSocket and fix duplicate ROS connections
- Removed non-functional trial WebSocket (no server exists)
- Kept ROS WebSocket for robot control via useWizardRos
- Fixed duplicate ROS connections by passing connection as props
- WizardMonitoringPanel now receives ROS connection from parent
- Trial status uses reliable tRPC polling (5-15s intervals)
- Updated connection badges to show 'ROS Connected/Offline'
- Added loading overlay with fade-in to designer
- Fixed hash computation to include parameter values
- Fixed incremental hash caching for parameter changes

Fixes:
- WebSocket connection errors eliminated
- Connect button now works properly
- No more conflicting duplicate connections
- Accurate connection status display
2025-11-19 22:51:38 -05:00
b21ed8e805 feat: Relocate experiment designer routes under studies, update ROS2 topic paths, and enhance designer hashing and performance. 2025-11-19 18:05:19 -05:00
86b5ed80c4 nao6 ros2 integration updated 2025-11-13 10:58:45 -05:00
70882b9dbb chore: Update robot-plugins submodule to v2.1.0 with enhanced NAO6 integration
- Enhanced NAO6 plugin with 15+ actions for comprehensive robot control
- Advanced movement controls: directional walking, precise head/arm positioning
- Speech enhancements: emotional expression, multilingual support, volume control
- Ready for production HRIStudio integration with wizard interface
2025-10-17 11:45:08 -04:00
7072ee487b feat: Complete NAO6 robot integration with HRIStudio platform
MAJOR INTEGRATION COMPLETE:

🤖 Robot Communication System:
- RobotCommunicationService for WebSocket ROS bridge integration
- Template-based message generation from plugin definitions
- Real-time action execution with error handling and reconnection

🔧 Trial Execution Engine:
- Updated TrialExecutionEngine to execute real robot actions
- Plugin-based action discovery and parameter validation
- Complete event logging for robot actions during trials

🎮 Wizard Interface Integration:
- RobotActionsPanel component for live robot control
- Plugin-based action discovery with categorized interface
- Real-time parameter forms auto-generated from schemas
- Emergency controls and safety features

📊 Database Integration:
- Enhanced plugin system with NAO6 definitions
- Robot action logging to trial events
- Study-scoped plugin installations

🔌 API Enhancement:
- executeRobotAction endpoint in trials router
- Parameter validation against plugin schemas
- Complete error handling and success tracking

 Production Ready Features:
- Parameter validation prevents invalid commands
- Emergency stop controls in wizard interface
- Connection management with auto-reconnect
- Complete audit trail of robot actions

TESTING READY:
- Seed script creates NAO6 experiment with robot actions
- Complete wizard interface for manual robot control
- Works with or without physical robot hardware

Ready for HRI research with live NAO6 robots!
2025-10-17 11:35:36 -04:00
c206f86047 feat: Complete NAO6 ROS2 integration for HRIStudio
🤖 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.
2025-10-16 17:37:52 -04:00
816b2b9e31 Add ROS2 bridge 2025-10-16 16:08:49 -04:00
9431bb549b Refactor trial routes to be study-scoped and update navigation 2025-09-24 15:19:55 -04:00