# pspals02/hw5_rbe4540 architecture

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

- Interactive diagram: https://gitdiagram.com/pspals02/hw5_rbe4540
- Repository: https://github.com/pspals02/hw5_rbe4540

## Overview

This ROS 2 package provides robot-motion interfaces and a pick-and-place demo. The principal workflow is a caller triggering the demo, which receives camera images and issues Cartesian/joint motion and gripper commands. A separate motion node exposes pose control, plans Cartesian paths, tracks joint state, and sends trajectory actions. Service schemas are generated in multiple language bindings. The demo and motion-node excerpts are partial; relationships are shown only where the excerpts or source index support them, and the behavior of move_hover is not sampled.

Main entry points: [`hover_above/hover_above/hover_func.py`](https://github.com/pspals02/hw5_rbe4540/blob/main/hover_above/hover_above/hover_func.py) (Pick-place runner), [`hover_above/hover_above/ur_move_simple_interface.py`](https://github.com/pspals02/hw5_rbe4540/blob/main/hover_above/hover_above/ur_move_simple_interface.py) (Motion service node), [`install/common_interfaces_merlab/lib/python3.12/site-packages/common_interfaces_merlab/srv`](https://github.com/pspals02/hw5_rbe4540/tree/main/install/common_interfaces_merlab/lib/python3.12/site-packages/common_interfaces_merlab/srv) (Motion service schemas), [`install/common_interfaces_merlab/lib/python3.12/site-packages/common_interfaces_merlab/_common_interfaces_merlab_s.ep.rosidl_typesupport_introspection_c.c`](https://github.com/pspals02/hw5_rbe4540/blob/main/install/common_interfaces_merlab/lib/python3.12/site-packages/common_interfaces_merlab/_common_interfaces_merlab_s.ep.rosidl_typesupport_introspection_c.c) (Generated service bindings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_demo["Pick-place demo"]
  node_hover["Pick-place runner<br/>[hover_func.py]"]
  node_move_hover["Hover motion<br/>[move_hover.py]"]
end

subgraph group_motion["Robot motion"]
  node_motion_node["Motion service node"]
end

subgraph group_interfaces["ROS interfaces"]
  node_service_schemas["Motion service schemas<br/>[srv]"]
  node_rosidl_bindings["Generated service bindings"]
end

node_caller(("Demo caller"))
node_camera["Camera topic"]
node_gripper["Gripper controller"]
node_joint_state["Joint states"]
node_cartesian_planner["Cartesian planner"]
node_trajectory_action["Trajectory action"]

node_caller -.->|"triggers"| node_hover
node_camera -->|"publishes images"| node_hover
node_hover -->|"commands"| node_gripper
node_hover -.->|"requests motion"| node_motion_node
node_joint_state -->|"publishes state"| node_motion_node
node_motion_node -->|"requests path"| node_cartesian_planner
node_motion_node -->|"sends goals"| node_trajectory_action
node_hover -->|"uses services"| node_service_schemas
node_motion_node -->|"serves pose"| node_service_schemas
node_service_schemas -->|"has type support"| node_rosidl_bindings

click node_hover "https://github.com/pspals02/hw5_rbe4540/blob/main/hover_above/hover_above/hover_func.py"
click node_move_hover "https://github.com/pspals02/hw5_rbe4540/blob/main/hover_above/hover_above/move_hover.py"
click node_motion_node "https://github.com/pspals02/hw5_rbe4540/blob/main/hover_above/hover_above/ur_move_simple_interface.py"
click node_service_schemas "https://github.com/pspals02/hw5_rbe4540/tree/main/install/common_interfaces_merlab/lib/python3.12/site-packages/common_interfaces_merlab/srv"
click node_rosidl_bindings "https://github.com/pspals02/hw5_rbe4540/blob/main/install/common_interfaces_merlab/lib/python3.12/site-packages/common_interfaces_merlab/_common_interfaces_merlab_s.ep.rosidl_typesupport_introspection_c.c"

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_hover,node_move_hover toneBlue
class node_motion_node toneAmber
class node_service_schemas,node_rosidl_bindings toneMint
class node_caller,node_camera,node_gripper,node_joint_state,node_cartesian_planner,node_trajectory_action toneIndigo
```

## Components

### Pick-place demo

- [Pick-place runner](https://github.com/pspals02/hw5_rbe4540/blob/main/hover_above/hover_above/hover_func.py): `hover_above/hover_above/hover_func.py`
- [Hover motion](https://github.com/pspals02/hw5_rbe4540/blob/main/hover_above/hover_above/move_hover.py): `hover_above/hover_above/move_hover.py`

### Robot motion

- [Motion service node](https://github.com/pspals02/hw5_rbe4540/blob/main/hover_above/hover_above/ur_move_simple_interface.py): `hover_above/hover_above/ur_move_simple_interface.py`

### ROS interfaces

- [Motion service schemas](https://github.com/pspals02/hw5_rbe4540/tree/main/install/common_interfaces_merlab/lib/python3.12/site-packages/common_interfaces_merlab/srv): `install/common_interfaces_merlab/lib/python3.12/site-packages/common_interfaces_merlab/srv`
- [Generated service bindings](https://github.com/pspals02/hw5_rbe4540/blob/main/install/common_interfaces_merlab/lib/python3.12/site-packages/common_interfaces_merlab/_common_interfaces_merlab_s.ep.rosidl_typesupport_introspection_c.c): `install/common_interfaces_merlab/lib/python3.12/site-packages/common_interfaces_merlab/_common_interfaces_merlab_s.ep.rosidl_typesupport_introspection_c.c`

### Other components

- **Demo caller**
- **Camera topic**
- **Gripper controller**
- **Joint states**
- **Cartesian planner**
- **Trajectory action**

## Connections

- Demo caller → Pick-place runner: triggers
- Camera topic → Pick-place runner: publishes images (evidence: `hover_above/hover_above/hover_func.py`)
- Pick-place runner → Gripper controller: commands (evidence: `hover_above/hover_above/hover_func.py`)
- Pick-place runner → Motion service node: requests motion
- Joint states → Motion service node: publishes state (evidence: `hover_above/hover_above/ur_move_simple_interface.py`)
- Motion service node → Cartesian planner: requests path (evidence: `hover_above/hover_above/ur_move_simple_interface.py`)
- Motion service node → Trajectory action: sends goals (evidence: `hover_above/hover_above/ur_move_simple_interface.py`)
- Pick-place runner → Motion service schemas: uses services (evidence: `hover_above/hover_above/hover_func.py`)
- Motion service node → Motion service schemas: serves pose (evidence: `hover_above/hover_above/ur_move_simple_interface.py`)
- Motion service schemas → Generated service bindings: has type support (evidence: `install/common_interfaces_merlab/lib/python3.12/site-packages/common_interfaces_merlab/_common_interfaces_merlab_s.ep.rosidl_typesupport_introspection_c.c`)
