Skip to content

bryantolmos/ur10

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UR10 Modular Welding Simulation (V1)

A ROS 2 and Gazebo-based simulation pipeline for automated robotic welding using a UR10 manipulator.

This project provides a clean, modular foundation for trajectory generation and execution. It uses MoveIt 2 for inverse kinematics and a custom unidirectional data pipeline to translate sparse waypoints into executable Cartesian weave patterns.

System Architecture

This repository follows a decoupled "Brain" and "Body" paradigm. This separation ensures that mathematical trajectory generation, safety validation, and physical robot execution remain completely isolated.

  • The Body (ur10_moveit_config & ur10_description): Handles the physical simulated environment (Gazebo), the Robot State Publisher, controller managers, and the MoveIt 2 backend.
  • The Brain (ur10_planner): A custom three-node pipeline that reads data, generates complex paths, and commands the robot.

Data Flow Diagram

Diagram


Planner Pipeline: Implementation Details

The ur10_planner package contains the core logic center, using three specialized, single-responsibility nodes:

  1. Path Generator Node (path_generator_node.cpp)

    • Role: Pure mathematics and file I/O.
    • Function: Reads sparse XYZ coordinates from a YAML file, calculates a perpendicular trajectory vector, and applies a mathematical weave algorithm (amplitude and step length).
    • Output: Publishes a dense geometry_msgs::msg::PoseArray of the final weld path.
  2. Trajectory Supervisor Node (trajectory_supervisor_node.cpp)

    • Role: Kinematics and execution control.
    • Function: Subscribes to the Cartesian path and interfaces with MoveIt 2's MoveGroupInterface. It executes movement in two phases:
      • Phase 1 (Approach): Uses joint-space planning to navigate the arm safely from its home position to the starting coordinate of the weld.
      • Phase 2 (Weld): Uses computeCartesianPath to trace the woven waypoints while maintaining strict end-effector orientation.
  3. Safety Validator Node (safety_validator_node.cpp)

    • Role: Independent watchdog.
    • Function: Subscribes to the planned RobotTrajectory generated by the supervisor. It iterates through every computed joint angle to ensure no hardware limits (e.g., ±2π radians) are violated before physical execution.

Prerequisites

To run this simulation, ensure your system meets the following requirements:

  • OS: Ubuntu 24.04 (Noble Numbat)
  • ROS 2: Jazzy Jalisco
  • Simulation: Gazebo Harmonic (ros-jazzy-ros-gz)
  • Motion Planning: MoveIt 2 (ros-jazzy-moveit)

Build and Installation

  1. Clone this repository into your ROS 2 workspace src directory:

    cd ~/your_ws/src
    git clone <your-repository-url> .
  2. Install dependencies using rosdep:

    cd ~/your_ws
    rosdep install --from-paths src --ignore-src -r -y
  3. Build the workspace:

    colcon build --symlink-install
  4. Source your workspace:

    source install/setup.bash

Running the Simulation

Due to the decoupled architecture, launching the project requires two separate terminals.

Note: The pipeline uses use_sim_time: True to ensure MoveIt synchronizes with the Gazebo simulation clock.

Terminal 1: Boot the Environment

This script locates your package paths, exports the correct Gazebo resource variables, and launches the simulated world alongside MoveIt and RViz.

cd ~/your_ws
./launch_sim.sh

Wait until the Gazebo simulation is fully loaded and the UR10 is stationary before proceeding.

Terminal 2: Execute the Weld

This script triggers the modular pipeline. The nodes will generate the path, compute kinematics, validate safety, and execute the movement in Gazebo.

cd ~/your_ws
./launch_pipeline.sh

Configuration

To change the shape or location of the weld, modify the data file located at:

src/ur10_planner/config/weld_path.yaml

You can adjust parameters such as weave_amplitude and weave_step_length, and define the absolute path to your your_ws/data/selected_points.yaml file containing the raw spatial coordinates.

About

Capstone + Post Capstone project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors