How lo122/hrc_communication works
This is an event-driven human–robot collaboration system: live or supplied recognition results can trigger assistance tasks; the decision layer requests human permission, manages task state and pending work, then dispatches accepted tasks and runtime controls to robot integrations. Communication supports CLI/voice and a browser permission interface. The README documents the intended end-to-end wiring; sampled source confirms recognition-trigger creation, task-manager actions, timers, and voice coordination, but orchestration and several adapters were not sampled, so uncertain internal links are omitted.
Main entry points: task_manager.py Task Manager · recognition_manager.py Recognition Manager · event_queue.py Event Queue · communication_manager.py Communication Manager
Components 33
Recognition
- Recognition Manager
1_recognition/recognition_manager.py - 3D Pose Pipeline
1_recognition/skeleton3d_pipeline.py - MotionBERT Lifter
1_recognition/src/skeleton_pipeline/motionbert_lifter.py - Motion Features
1_recognition/src/skeleton_pipeline/features/h36m_features.py - Step Classifier
1_recognition/best_model/LSTM_model_train.py - Step Stabilizer
1_recognition/step_stablizier.py - Trigger Manager
1_recognition/trigger_manager.py
Decision
- Task Manager
2_decision_making/task_manager.py - State Machine
2_decision_making/state_machine.py - Pending Tasks
2_decision_making/pending_task.py - Task Timers
2_decision_making/timer_manager.py
Communication
- CLI Interface
3_communication/cli_interface.py - Command Parser
3_communication/cmd_parser.py - Message Manager
3_communication/message_manager.py - Voice Interface
3_communication/voice_interface.py - Communication Manager
3_communication/communication_manager.py - Speech Output
3_communication/tts_manager.py - Watch Interface
Interface/app.js - Watch Server
Interface/server.py
Execution
- GH Dispatcher
4_execution/gh_dispatcher.py - UDP Sender
4_execution/udp_sender.py - ROS Communication
4_execution/ros_communication.py - UR Control
4_execution/ur_control.py - UR State Reader
4_execution/ur_state_reader.py
Shared Core
- System Runtime
communication_runtime.py - Event Queue
0_core/event_queue.py - Event Transport
0_core/event_transport.py - Events and Models
0_core/events.py - Event Logger
0_core/logger.py
Other components
- Human
- Camera
- Grasshopper
- Robot / UR
Connections 36
- Camera → Recognition Manager: provides frames
- Recognition Manager → 3D Pose Pipeline: processes frames
- 3D Pose Pipeline → MotionBERT Lifter: lifts pose
- Recognition Manager → Motion Features: extracts features
- Recognition Manager → Step Classifier: classifies steps
- Recognition Manager → Step Stabilizer: stabilizes steps
- Recognition Manager → Trigger Manager: supplies results
- Trigger Manager → Event Queue: queues triggers
- System Runtime → Event Queue: processes events
- System Runtime → Recognition Manager: updates recognition
- Event Queue → Task Manager: delivers events
- Task Manager → State Machine: validates transitions
- Task Manager → Pending Tasks: manages pending
- Task Manager → Task Timers: starts timers
- Task Timers → Event Queue: emits timeout events
- Task Manager → Message Manager: gets message text
- Task Manager → CLI Interface: requests messages
- Human → CLI Interface: enters commands
- CLI Interface → Command Parser: parses commands
- Communication Manager → Voice Interface: controls listening
- Communication Manager → Command Parser: parses speech
- Communication Manager → Event Queue: emits command events
- Communication Manager → Speech Output: speaks messages
- Human → Watch Interface: selects response
- Watch Interface → Watch Server: sends permission
- Watch Server → Event Queue: queues response
- Task Manager → GH Dispatcher: dispatches task
- GH Dispatcher → UDP Sender: sends task data
- UDP Sender → Grasshopper: sends task id and piece
- Task Manager → ROS Communication: publishes controls
- ROS Communication → Robot / UR: controls runtime
- Robot / UR → ROS Communication: reports success
- ROS Communication → Event Queue: queues success event
- UR Control → Robot / UR: controls arm
- Robot / UR → UR State Reader: provides state
- Task Manager → Event Logger: logs transitions