# bryantolmos/ur10 architecture

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

- Interactive diagram: https://gitdiagram.com/bryantolmos/ur10
- Repository: https://github.com/bryantolmos/ur10

## Overview

1. **High-level split: “Body” vs “Brain”**
   - The repository is organized around a strong boundary between robot simulation/control infrastructure and weld-planning logic.
   - **Body:** `ur10_description` + `ur10_moveit_config`
   - **Brain:** `ur10_planner`
   - Communication happens through ROS 2 topics, actions, and MoveIt interfaces rather than direct function calls.

2. **Runtime and simulation stack**
   - The system targets **ROS 2 Jazzy**, **Gazebo Harmonic**, and **MoveIt 2**.
   - Gazebo provides the simulated robot/world.
   - MoveIt provides inverse kinematics, Cartesian path generation, and execution plumbing through controller interfaces.
   - `use_sim_time` is part of the architecture so planning and visualization stay synchronized to the simulator clock.

3. **Robot model layer**
   - `src/ur10_description` defines the UR10 robot model and custom tooling.
   - It contains URDF/Xacro, Gazebo integration, and meshes for a **custom end effector**.
   - This package is the geometric/kinematic source of truth for both simulation and planning.

4. **Motion-planning and execution layer**
   - `src/ur10_moveit_config` packages the MoveIt-ready robot setup.
   - It holds joint limits, kinematics, controller mappings, RViz config, and ROS 2 control wiring.
   - Launch files here bring up the robot state publisher, MoveIt move_group, controller spawning, RViz, and Gazebo-specific integration.

5. **Planner pipeline entry point**
   - `src/ur10_planner` is the application logic for weld execution.
   - The package includes a custom **`Weld.action`**, a behavior-tree XML config (`weld_bt.xml`), and a dedicated launch file (`v2_pipeline.launch.py`).
   - This suggests the planner is exposed as a coordinated workflow rather than a single monolithic node.

6. **Path generation subsystem**
   - `path_generator_node.cpp` reads sparse waypoint data from YAML and transforms it into a dense weld path.
   - Inputs are configured through `config/weld_path.yaml`, which points at `data/selected_points.yaml`.
   - The node computes a perpendicular weave pattern using configurable parameters like amplitude and step length.
   - Output is a `geometry_msgs::msg::PoseArray`, which becomes the shared path representation for downstream nodes.

7. **Trajectory supervision and execution**
   - `trajectory_supervisor_node.cpp` consumes the generated Cartesian path and interfaces with **MoveIt `MoveGroupInterface`**.
   - It performs a two-phase motion plan:
     - approach from home to the weld start in joint space
     - execute the weld path using Cartesian planning
   - This node is the bridge from abstract path geometry to actual robot motion.

8. **Safety validation boundary**
   - `safety_validator_node.cpp` acts as an independent watchdog on planned trajectories.
   - It inspects the planned `RobotTrajectory` joint-by-joint before execution.
   - The explicit architectural goal is to prevent joint-limit violations, with the README calling out limits such as ±2π radians.
   - This is a separate safety gate, not embedded inside the path generator.

9. **Orchestration layer**
   - `bt_weld_orchestrator_node.cpp` and `config/weld_bt.xml` indicate a higher-level coordinator around the planner workflow.
   - The repository is structured so orchestration, path generation, validation, and execution remain separate concerns.
   - The custom action definition likely serves as the control surface for initiating a weld job.

10. **Operational entry points**
   - `launch_sim.sh` boots the environment: simulation world, robot model, MoveIt, and RViz.
   - `launch_pipeline.sh` starts the planner pipeline after the simulated robot is ready.
   - The README explicitly expects two terminals, reinforcing the decoupled startup model.

11. **Configuration and data flow**
   - Raw weld points live in `data/selected_points.yaml`.
   - Weld-shape parameters and the input file location are centralized in `ur10_planner/config/weld_path.yaml`.
   - Downstream packages consume the generated pose path and robot model/configuration; data flows one way from file input to path generation to planning to execution.

12. **External/optional pieces**
   - `src/Universal_Robots_ROS2_Description` appears to be an upstream robot-description dependency vendored into the workspace.
   - `warehouse_db.launch.py` suggests optional MoveIt warehouse support, but it is not the core execution path.
   - The main architecture remains simulation-first and ROS 2-native, with no direct hardware dependency shown in the repository.

Main entry points: [`src/ur10_planner`](https://github.com/bryantolmos/ur10/tree/main/src/ur10_planner) (UR10 planner), [`src/ur10_moveit_config`](https://github.com/bryantolmos/ur10/tree/main/src/ur10_moveit_config) (MoveIt config), [`src/ur10_planner/src/bt_weld_orchestrator_node.cpp`](https://github.com/bryantolmos/ur10/blob/main/src/ur10_planner/src/bt_weld_orchestrator_node.cpp) (Orchestrator), [`src/ur10_description`](https://github.com/bryantolmos/ur10/tree/main/src/ur10_description) (UR10 model)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_grp_runtime["Runtime stack"]
end

subgraph group_grp_body["Robot body"]
  node_n_description["UR10 model<br/>robot description"]
  node_n_desc_urdf["URDF/Xacro<br/>kinematic model"]
  node_n_desc_gazebo["Gazebo hooks<br/>simulation config<br/>[ur10.gazebo.xacro]"]
  node_n_desc_ee["End effector<br/>mesh + urdf"]
  node_n_moveit["MoveIt config<br/>motion config"]
  node_n_moveit_urdf["MoveIt URDF<br/>robot xacro"]
  node_n_moveit_ctrl["Controllers<br/>ros2 control"]
  node_n_moveit_kin["Kinematics<br/>planning config<br/>[kinematics.yaml]"]
  node_n_moveit_launch["MoveIt launch<br/>launch bundle"]
end

subgraph group_grp_brain["Planner brain"]
  node_n_planner["UR10 planner<br/>weld application"]
  node_n_weld_action["Weld action<br/>action interface<br/>[Weld.action]"]
  node_n_bt["BT config<br/>behavior tree<br/>[weld_bt.xml]"]
  node_n_path_gen["Path generator<br/>compute node"]
  node_n_supervisor["Supervisor<br/>motion node"]
  node_n_validator["Safety gate<br/>validation node"]
  node_n_orchestrator["Orchestrator<br/>coordination node"]
end

subgraph group_grp_data["Data & config"]
  node_n_path_cfg["Path config<br/>planner yaml<br/>[weld_path.yaml]"]
  node_n_points["Waypoints<br/>input data"]
end

subgraph group_grp_entry["Entry points"]
  node_n_sim_launch["Sim launch<br/>shell entry<br/>[launch_sim.sh]"]
  node_n_pipeline_launch["Pipeline launch<br/>shell entry<br/>[launch_pipeline.sh]"]
end

node_n_readme["README<br/>repo overview<br/>[README.md]"]

node_n_readme -->|"documents"| node_n_description
node_n_readme -->|"documents"| node_n_moveit
node_n_readme -->|"documents"| node_n_planner
node_n_sim_launch -->|"starts"| node_n_moveit_launch
node_n_pipeline_launch -->|"starts"| node_n_orchestrator
node_n_description -->|"defines"| node_n_desc_urdf
node_n_description -->|"defines"| node_n_desc_gazebo
node_n_description -->|"includes"| node_n_desc_ee
node_n_moveit -->|"consumes"| node_n_moveit_urdf
node_n_moveit -->|"consumes"| node_n_moveit_ctrl
node_n_moveit -->|"consumes"| node_n_moveit_kin
node_n_moveit -->|"packages"| node_n_moveit_launch
node_n_planner -->|"exposes"| node_n_weld_action
node_n_planner -->|"orchestrates"| node_n_bt
node_n_planner -->|"reads"| node_n_path_cfg
node_n_planner -->|"implements"| node_n_path_gen
node_n_planner -->|"implements"| node_n_supervisor
node_n_planner -->|"implements"| node_n_validator
node_n_planner -->|"implements"| node_n_orchestrator
node_n_path_cfg -->|"points to"| node_n_points
node_n_path_gen -->|"reads"| node_n_points
node_n_path_gen -->|"publishes"| node_n_supervisor
node_n_orchestrator -->|"triggers"| node_n_path_gen
node_n_orchestrator -->|"gates"| node_n_validator
node_n_orchestrator -->|"dispatches"| node_n_supervisor
node_n_supervisor -->|"uses"| node_n_moveit
node_n_supervisor -->|"submits"| node_n_validator
node_n_validator -->|"verifies against"| node_n_moveit
node_n_orchestrator -->|"serves"| node_n_weld_action
node_n_moveit_launch -->|"loads"| node_n_description
node_n_moveit_launch -->|"spawns"| node_n_moveit_ctrl

click node_n_readme "https://github.com/bryantolmos/ur10/blob/main/README.md"
click node_n_sim_launch "https://github.com/bryantolmos/ur10/blob/main/launch_sim.sh"
click node_n_pipeline_launch "https://github.com/bryantolmos/ur10/blob/main/launch_pipeline.sh"
click node_n_description "https://github.com/bryantolmos/ur10/tree/main/src/ur10_description"
click node_n_desc_urdf "https://github.com/bryantolmos/ur10/blob/main/src/ur10_description/urdf/robots/custom_ur10.urdf.xacro"
click node_n_desc_gazebo "https://github.com/bryantolmos/ur10/blob/main/src/ur10_description/urdf/ur10.gazebo.xacro"
click node_n_desc_ee "https://github.com/bryantolmos/ur10/blob/main/src/ur10_description/urdf/mech/end_effector.urdf.xacro"
click node_n_moveit "https://github.com/bryantolmos/ur10/tree/main/src/ur10_moveit_config"
click node_n_moveit_urdf "https://github.com/bryantolmos/ur10/blob/main/src/ur10_moveit_config/config/ur10_with_custom_ee.urdf.xacro"
click node_n_moveit_ctrl "https://github.com/bryantolmos/ur10/blob/main/src/ur10_moveit_config/config/ros2_controllers.yaml"
click node_n_moveit_kin "https://github.com/bryantolmos/ur10/blob/main/src/ur10_moveit_config/config/kinematics.yaml"
click node_n_moveit_launch "https://github.com/bryantolmos/ur10/blob/main/src/ur10_moveit_config/launch/ur10_gazebo_moveit.launch.py"
click node_n_planner "https://github.com/bryantolmos/ur10/tree/main/src/ur10_planner"
click node_n_weld_action "https://github.com/bryantolmos/ur10/blob/main/src/ur10_planner/action/Weld.action"
click node_n_bt "https://github.com/bryantolmos/ur10/blob/main/src/ur10_planner/config/weld_bt.xml"
click node_n_path_cfg "https://github.com/bryantolmos/ur10/blob/main/src/ur10_planner/config/weld_path.yaml"
click node_n_points "https://github.com/bryantolmos/ur10/blob/main/data/selected_points.yaml"
click node_n_path_gen "https://github.com/bryantolmos/ur10/blob/main/src/ur10_planner/src/path_generator_node.cpp"
click node_n_supervisor "https://github.com/bryantolmos/ur10/blob/main/src/ur10_planner/src/trajectory_supervisor_node.cpp"
click node_n_validator "https://github.com/bryantolmos/ur10/blob/main/src/ur10_planner/src/safety_validator_node.cpp"
click node_n_orchestrator "https://github.com/bryantolmos/ur10/blob/main/src/ur10_planner/src/bt_weld_orchestrator_node.cpp"

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_n_description,node_n_desc_urdf,node_n_desc_gazebo,node_n_desc_ee,node_n_moveit,node_n_moveit_urdf,node_n_moveit_ctrl,node_n_moveit_kin,node_n_moveit_launch toneAmber
class node_n_planner,node_n_weld_action,node_n_bt,node_n_path_gen,node_n_supervisor,node_n_validator,node_n_orchestrator toneMint
class node_n_path_cfg,node_n_points toneRose
class node_n_sim_launch,node_n_pipeline_launch toneIndigo
class node_n_readme toneNeutral
```

## Components

### Robot body

Robot model and MoveIt-ready robot configuration

- [UR10 model](https://github.com/bryantolmos/ur10/tree/main/src/ur10_description): robot description · URDF/Xacro, Gazebo integration, and custom end effector geometry · `src/ur10_description`
- [URDF/Xacro](https://github.com/bryantolmos/ur10/blob/main/src/ur10_description/urdf/robots/custom_ur10.urdf.xacro): kinematic model · Robot and end-effector model definitions · `src/ur10_description/urdf/robots/custom_ur10.urdf.xacro`
- [Gazebo hooks](https://github.com/bryantolmos/ur10/blob/main/src/ur10_description/urdf/ur10.gazebo.xacro): simulation config · Gazebo-specific robot integration · `src/ur10_description/urdf/ur10.gazebo.xacro`
- [End effector](https://github.com/bryantolmos/ur10/blob/main/src/ur10_description/urdf/mech/end_effector.urdf.xacro): mesh + urdf · Custom tool geometry and mounting definition · `src/ur10_description/urdf/mech/end_effector.urdf.xacro`
- [MoveIt config](https://github.com/bryantolmos/ur10/tree/main/src/ur10_moveit_config): motion config · Planning, kinematics, controllers, and RViz wiring · `src/ur10_moveit_config`
- [MoveIt URDF](https://github.com/bryantolmos/ur10/blob/main/src/ur10_moveit_config/config/ur10_with_custom_ee.urdf.xacro): robot xacro · MoveIt-ready robot description with custom end effector · `src/ur10_moveit_config/config/ur10_with_custom_ee.urdf.xacro`
- [Controllers](https://github.com/bryantolmos/ur10/blob/main/src/ur10_moveit_config/config/ros2_controllers.yaml): ros2 control · Controller mappings and ROS 2 control setup · `src/ur10_moveit_config/config/ros2_controllers.yaml`
- [Kinematics](https://github.com/bryantolmos/ur10/blob/main/src/ur10_moveit_config/config/kinematics.yaml): planning config · Joint limits and IK tuning for MoveIt · `src/ur10_moveit_config/config/kinematics.yaml`
- [MoveIt launch](https://github.com/bryantolmos/ur10/blob/main/src/ur10_moveit_config/launch/ur10_gazebo_moveit.launch.py): launch bundle · Starts robot state publisher, move_group, controllers, and RViz · `src/ur10_moveit_config/launch/ur10_gazebo_moveit.launch.py`

### Planner brain

Weld planning, validation, and orchestration

- [UR10 planner](https://github.com/bryantolmos/ur10/tree/main/src/ur10_planner): weld application · Weld execution logic exposed as a ROS 2 pipeline · `src/ur10_planner`
- [Weld action](https://github.com/bryantolmos/ur10/blob/main/src/ur10_planner/action/Weld.action): action interface · Control surface for triggering weld jobs · `src/ur10_planner/action/Weld.action`
- [BT config](https://github.com/bryantolmos/ur10/blob/main/src/ur10_planner/config/weld_bt.xml): behavior tree · Workflow orchestration for weld execution · `src/ur10_planner/config/weld_bt.xml`
- [Path generator](https://github.com/bryantolmos/ur10/blob/main/src/ur10_planner/src/path_generator_node.cpp): compute node · Expands sparse points into a dense weave PoseArray · `src/ur10_planner/src/path_generator_node.cpp`
- [Supervisor](https://github.com/bryantolmos/ur10/blob/main/src/ur10_planner/src/trajectory_supervisor_node.cpp): motion node · Plans approach and Cartesian weld execution through MoveIt · `src/ur10_planner/src/trajectory_supervisor_node.cpp`
- [Safety gate](https://github.com/bryantolmos/ur10/blob/main/src/ur10_planner/src/safety_validator_node.cpp): validation node · Checks planned joint trajectories against joint limits before execution · `src/ur10_planner/src/safety_validator_node.cpp`
- [Orchestrator](https://github.com/bryantolmos/ur10/blob/main/src/ur10_planner/src/bt_weld_orchestrator_node.cpp): coordination node · Coordinates the weld workflow across planning, validation, and execution · `src/ur10_planner/src/bt_weld_orchestrator_node.cpp`

### Data & config

Input data and planner configuration

- [Path config](https://github.com/bryantolmos/ur10/blob/main/src/ur10_planner/config/weld_path.yaml): planner yaml · Source file and weave parameters for weld path generation · `src/ur10_planner/config/weld_path.yaml`
- [Waypoints](https://github.com/bryantolmos/ur10/blob/main/data/selected_points.yaml): input data · Sparse selected points used to seed the weld path · `data/selected_points.yaml`

### Entry points

Top-level launch scripts

- [Sim launch](https://github.com/bryantolmos/ur10/blob/main/launch_sim.sh): shell entry · Boots simulation, robot, MoveIt, and RViz · `launch_sim.sh`
- [Pipeline launch](https://github.com/bryantolmos/ur10/blob/main/launch_pipeline.sh): shell entry · Starts the weld planning pipeline · `launch_pipeline.sh`

### Other components

- [README](https://github.com/bryantolmos/ur10/blob/main/README.md): repo overview · High-level architecture and usage guidance · `README.md`

## Connections

- README → UR10 model: documents · Describes the robot body and custom end effector
- README → MoveIt config: documents · Describes the motion-planning stack
- README → UR10 planner: documents · Describes the weld planning pipeline
- Sim launch → MoveIt launch: starts · Bootstraps simulation and motion-planning runtime
- Pipeline launch → Orchestrator: starts · Brings up the planner pipeline
- UR10 model → URDF/Xacro: defines · Robot kinematics and geometry
- UR10 model → Gazebo hooks: defines · Gazebo integration layer
- UR10 model → End effector: includes · Custom tool geometry
- MoveIt config → MoveIt URDF: consumes · MoveIt robot model setup
- MoveIt config → Controllers: consumes · Controller interfaces for execution
- MoveIt config → Kinematics: consumes · Kinematics and limit tuning
- MoveIt config → MoveIt launch: packages · Launches runtime components
- UR10 planner → Weld action: exposes · Action interface for weld jobs
- UR10 planner → BT config: orchestrates · Behavior-tree based workflow
- UR10 planner → Path config: reads · Path generation configuration
- UR10 planner → Path generator: implements · Dense path generation node
- UR10 planner → Supervisor: implements · Trajectory planning and execution node
- UR10 planner → Safety gate: implements · Safety validation node
- UR10 planner → Orchestrator: implements · Workflow coordinator node
- Path config → Waypoints: points to · Configured source waypoint file
- Path generator → Waypoints: reads · Consumes sparse weld waypoints
- Path generator → Supervisor: publishes · Produces dense PoseArray path
- Orchestrator → Path generator: triggers · Starts path generation step
- Orchestrator → Safety gate: gates · Requires safety approval before execution
- Orchestrator → Supervisor: dispatches · Hands off validated path for motion planning
- Supervisor → MoveIt config: uses · Relies on MoveIt planning and execution interfaces
- Supervisor → Safety gate: submits · Sends planned trajectory for safety checks
- Safety gate → MoveIt config: verifies against · Checks trajectories with robot limits and model context
- Orchestrator → Weld action: serves · Implements the weld job control contract
- MoveIt launch → UR10 model: loads · Uses robot model at runtime
- MoveIt launch → Controllers: spawns · Starts controllers for execution
