# sirsiit/fast-handover architecture

> Architecture diagram of the GitHub repository sirsiit/fast-handover, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sirsiit/fast-handover
- Repository: https://github.com/sirsiit/fast-handover

## Overview

Fast Human-Robot Handover is a ROS Noetic system split across a vision PC and a robot-control PC. Camera streams feed hand estimation and object segmentation; hand poses can be fused across cameras, while object point clouds can be combined into object pose and bounds. The handover state machine dispatches motion, tracking, grasp, and placement actions to robot action servers. The excerpts show individual ROS topics and action calls, but not a complete vision-to-controller topic connection; that system-level link is therefore not asserted.

Main entry points: [`handover_vision/scripts/object_detector.py`](https://github.com/sirsiit/fast-handover/blob/main/handover_vision/scripts/object_detector.py) (Object extraction), [`handover_robot/smach_handover_ctrl/scripts/controller_server.py`](https://github.com/sirsiit/fast-handover/blob/main/handover_robot/smach_handover_ctrl/scripts/controller_server.py) (Robot action servers), [`handover_vision/scripts/hand_detector.py`](https://github.com/sirsiit/fast-handover/blob/main/handover_vision/scripts/hand_detector.py) (Hand estimation), [`handover_robot/smach_handover_ctrl/scripts/planner.py`](https://github.com/sirsiit/fast-handover/blob/main/handover_robot/smach_handover_ctrl/scripts/planner.py) (Handover state machine)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_vision["Vision perception"]
  node_hand_estimation["Hand estimation<br/>[hand_detector.py]"]
  node_object_segmentation["Object segmentation"]
  node_object_extraction["Object extraction<br/>[object_detector.py]"]
  node_pose_utils["Vision utilities<br/>[utils.py]"]
  node_hand_fusion["Hand pose fusion"]
  node_cloud_fusion["Point-cloud fusion"]
end

subgraph group_coordination["Handover coordination"]
  node_planner["Handover state machine<br/>[planner.py]"]
  node_action_servers["Robot action servers"]
  node_action_specs["Robot action definitions"]
end

subgraph group_motion["Robot motion"]
  node_moveit["MoveIt planning<br/>[move_group.launch]"]
  node_servo["Servo control<br/>[servo.launch]"]
end

subgraph group_setup["Robot configurations"]
  node_ur_driver["UR driver bringup<br/>[ur5_bringup.launch]"]
  node_franka_control["Franka control"]
  node_robot_models["Robot descriptions"]
end

node_camera(("RGB-D cameras"))
node_ros_camera(("ROS camera topics"))
node_ros_actions(("ROS action servers"))
node_fk_service["MoveIt FK service"]
node_servo_server["Servo server"]
node_robot_hardware["Robot hardware"]

node_camera -->|"supplies images"| node_hand_estimation
node_ros_camera -->|"supplies camera data"| node_hand_estimation
node_hand_estimation -->|"uses transforms"| node_pose_utils
node_hand_estimation -->|"publishes hand poses"| node_hand_fusion
node_hand_fusion -.->|"handover input"| node_planner
node_camera -->|"supplies images"| node_object_extraction
node_object_extraction -->|"runs segmentation"| node_object_segmentation
node_object_extraction -->|"uses transforms"| node_pose_utils
node_object_extraction -->|"publishes camera clouds"| node_cloud_fusion
node_cloud_fusion -.->|"handover input"| node_planner
node_planner -->|"dispatches actions"| node_action_servers
node_planner -->|"sends action goals"| node_ros_actions
node_action_servers -->|"calls FK"| node_fk_service
node_action_servers -->|"publishes velocity commands"| node_servo_server
node_action_servers -.->|"plans motion"| node_moveit
node_servo -.->|"configures"| node_servo_server
node_moveit -.->|"uses description"| node_robot_models
node_ur_driver -.->|"controls"| node_robot_hardware
node_franka_control -.->|"controls"| node_robot_hardware

click node_hand_estimation "https://github.com/sirsiit/fast-handover/blob/main/handover_vision/scripts/hand_detector.py"
click node_object_segmentation "https://github.com/sirsiit/fast-handover/blob/main/handover_vision/scripts/Segmentator_YOLOv8.py"
click node_object_extraction "https://github.com/sirsiit/fast-handover/blob/main/handover_vision/scripts/object_detector.py"
click node_pose_utils "https://github.com/sirsiit/fast-handover/blob/main/handover_vision/scripts/utils.py"
click node_hand_fusion "https://github.com/sirsiit/fast-handover/blob/main/handover_vision/scripts/kalman_filter_node.py"
click node_cloud_fusion "https://github.com/sirsiit/fast-handover/blob/main/handover_vision/scripts/pointcloud_merger.py"
click node_planner "https://github.com/sirsiit/fast-handover/blob/main/handover_robot/smach_handover_ctrl/scripts/planner.py"
click node_action_servers "https://github.com/sirsiit/fast-handover/blob/main/handover_robot/smach_handover_ctrl/scripts/controller_server.py"
click node_action_specs "https://github.com/sirsiit/fast-handover/tree/main/handover_robot/handover_action/action"
click node_moveit "https://github.com/sirsiit/fast-handover/blob/main/handover_robot/panda_moveit_config/launch/move_group.launch"
click node_servo "https://github.com/sirsiit/fast-handover/blob/main/handover_robot/servo_ctrl/launch/servo.launch"
click node_ur_driver "https://github.com/sirsiit/fast-handover/blob/main/handover_robot/Universal_Robots_ROS_Driver/ur_robot_driver/launch/ur5_bringup.launch"
click node_franka_control "https://github.com/sirsiit/fast-handover/blob/main/handover_robot/franka_ros/franka_control/launch/franka_control.launch"
click node_robot_models "https://github.com/sirsiit/fast-handover/blob/main/handover_robot/franka_ros/franka_description/robots/panda_arm.urdf.xacro"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_hand_estimation,node_object_segmentation,node_object_extraction,node_pose_utils,node_hand_fusion,node_cloud_fusion toneBlue
class node_planner,node_action_servers,node_action_specs toneAmber
class node_moveit,node_servo,node_ros_actions,node_servo_server toneMint
class node_ur_driver,node_franka_control,node_robot_models toneRose
class node_camera,node_ros_camera,node_fk_service,node_robot_hardware toneIndigo
```

## Components

### Vision perception

- [Hand estimation](https://github.com/sirsiit/fast-handover/blob/main/handover_vision/scripts/hand_detector.py): `handover_vision/scripts/hand_detector.py`
- [Object segmentation](https://github.com/sirsiit/fast-handover/blob/main/handover_vision/scripts/Segmentator_YOLOv8.py): `handover_vision/scripts/Segmentator_YOLOv8.py`
- [Object extraction](https://github.com/sirsiit/fast-handover/blob/main/handover_vision/scripts/object_detector.py): `handover_vision/scripts/object_detector.py`
- [Vision utilities](https://github.com/sirsiit/fast-handover/blob/main/handover_vision/scripts/utils.py): `handover_vision/scripts/utils.py`
- [Hand pose fusion](https://github.com/sirsiit/fast-handover/blob/main/handover_vision/scripts/kalman_filter_node.py): `handover_vision/scripts/kalman_filter_node.py`
- [Point-cloud fusion](https://github.com/sirsiit/fast-handover/blob/main/handover_vision/scripts/pointcloud_merger.py): `handover_vision/scripts/pointcloud_merger.py`

### Handover coordination

- [Handover state machine](https://github.com/sirsiit/fast-handover/blob/main/handover_robot/smach_handover_ctrl/scripts/planner.py): `handover_robot/smach_handover_ctrl/scripts/planner.py`
- [Robot action servers](https://github.com/sirsiit/fast-handover/blob/main/handover_robot/smach_handover_ctrl/scripts/controller_server.py): `handover_robot/smach_handover_ctrl/scripts/controller_server.py`
- [Robot action definitions](https://github.com/sirsiit/fast-handover/tree/main/handover_robot/handover_action/action): `handover_robot/handover_action/action`

### Robot motion

- [MoveIt planning](https://github.com/sirsiit/fast-handover/blob/main/handover_robot/panda_moveit_config/launch/move_group.launch): `handover_robot/panda_moveit_config/launch/move_group.launch`
- [Servo control](https://github.com/sirsiit/fast-handover/blob/main/handover_robot/servo_ctrl/launch/servo.launch): `handover_robot/servo_ctrl/launch/servo.launch`

### Robot configurations

- [UR driver bringup](https://github.com/sirsiit/fast-handover/blob/main/handover_robot/Universal_Robots_ROS_Driver/ur_robot_driver/launch/ur5_bringup.launch): `handover_robot/Universal_Robots_ROS_Driver/ur_robot_driver/launch/ur5_bringup.launch`
- [Franka control](https://github.com/sirsiit/fast-handover/blob/main/handover_robot/franka_ros/franka_control/launch/franka_control.launch): `handover_robot/franka_ros/franka_control/launch/franka_control.launch`
- [Robot descriptions](https://github.com/sirsiit/fast-handover/blob/main/handover_robot/franka_ros/franka_description/robots/panda_arm.urdf.xacro): `handover_robot/franka_ros/franka_description/robots/panda_arm.urdf.xacro`

### Other components

- **RGB-D cameras**
- **ROS camera topics**
- **ROS action servers**
- **MoveIt FK service**
- **Servo server**
- **Robot hardware**

## Connections

- RGB-D cameras → Hand estimation: supplies images (evidence: `handover_vision/scripts/hand_detector.py`)
- ROS camera topics → Hand estimation: supplies camera data (evidence: `handover_vision/scripts/hand_detector.py`)
- Hand estimation → Vision utilities: uses transforms (evidence: `handover_vision/scripts/hand_detector.py`)
- Hand estimation → Hand pose fusion: publishes hand poses (evidence: `handover_vision/scripts/kalman_filter_node.py`)
- Hand pose fusion → Handover state machine: handover input
- RGB-D cameras → Object extraction: supplies images (evidence: `handover_vision/scripts/object_detector.py`)
- Object extraction → Object segmentation: runs segmentation (evidence: `handover_vision/scripts/object_detector.py`)
- Object extraction → Vision utilities: uses transforms (evidence: `handover_vision/scripts/object_detector.py`)
- Object extraction → Point-cloud fusion: publishes camera clouds (evidence: `handover_vision/scripts/pointcloud_merger.py`)
- Point-cloud fusion → Handover state machine: handover input
- Handover state machine → Robot action servers: dispatches actions (evidence: `handover_robot/smach_handover_ctrl/scripts/planner.py`)
- Handover state machine → ROS action servers: sends action goals (evidence: `handover_robot/smach_handover_ctrl/scripts/planner.py`)
- Robot action servers → MoveIt FK service: calls FK (evidence: `handover_robot/smach_handover_ctrl/scripts/controller_server.py`)
- Robot action servers → Servo server: publishes velocity commands (evidence: `handover_robot/smach_handover_ctrl/scripts/controller_server.py`)
- Robot action servers → MoveIt planning: plans motion
- Servo control → Servo server: configures
- MoveIt planning → Robot descriptions: uses description
- UR driver bringup → Robot hardware: controls
- Franka control → Robot hardware: controls
