Skip to content

Considering the difficulty of manually creating path points for a UR robot, this project aims to simplify the process using python code instead.

Notifications You must be signed in to change notification settings

Orlyse/UR-toolpath-generation

Repository files navigation

English Wheel Toolpath Generation (Python)

This project generates toolpaths for an English wheel forming process on sheet metal.
The Python script creates position and orientation waypoints that can be sent to a robot (e.g., a UR robot) to trace:

  • Triangular / zig-zag paths across a sheet,
  • Straight lines along a chosen axis, or
  • Pure rotational motions about a given axis.

The code also includes functions to compensate for the robot wrist rotation so that the desired motion is expressed correctly in the tool coordinate frame.


Features

  • Triangular/zig-zag toolpath generation
    Generate a zig-zag pattern between two edges of the sheet based on:

    • Sheet length in x
    • Sheet width in y
    • Number of peaks (triangles) across the width
  • Straight line path generation
    Generate a straight line along the x, y, or z axis with user-defined:

    • Total length
    • Division count (number of segments/points)
  • Pure rotation sequences
    Generate a sequence of rotation waypoints about the x, y, or z axis with:

    • Total rotation angle
    • Step size (number of increments)
  • Wrist rotation compensation
    Functions to adjust both:

    • Translations (2D and 3D)
    • Rotations

    so that the motion is correctly expressed in the robot tool frame, given a wrist angle.


File Overview

  • main.py (or your script name)
    Contains:
    • Rotation compensation helpers:
      • compensate_wrist_rotation2(dx, dy, theta)
      • compensate_wrist_rotation3(dx, dy, dz, theta)
    • Rotation matrix helpers:
      • Rx(theta), Ry(theta), Rz(theta)
    • Rotation compensation for rotational motion:
      • compensate_wrist_rotation_v2(rx, ry, rz, theta)
    • Path generators:
      • generate_line()
      • rotate()
      • generate_tp() (triangular / zig-zag path)
    • Setpoint builder:
      • convert_to_setp()

convert_to_setp() assembles the generated data into an N x 6 array of setpoints:

[x, y, z, rx, ry, rz]

About

Considering the difficulty of manually creating path points for a UR robot, this project aims to simplify the process using python code instead.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages