URScript is the programming language used to control Universal Robots arms such as the UR5E. A script is a list of commands that the robot controller runs line by line. The functions below are grouped by what they do.


Motion Commands

How the tool is moved from one waypoint to the next:

  • movej goes to a safe waypoint along a curved path in joint space
  • movel goes in a straight line path to or from an object
  • movep moves at a constant speed, useful for a process path such as dispensing

Pose Utilities

Helpers for building and inverting poses:

  • pose_trans applies an offset to a starting pose, so the new pose is built from a previous pose rather than a new hardcoded pose
  • pose_inv inverts a pose transform

Kinematics

These two functions convert between joint space and Cartesian space, the core of forward and inverse kinematics:

  • get_forward_kin takes joint values and returns the resulting TCP pose , the direction
  • get_inverse_kin takes a desired TCP pose and returns joint values , the direction

State Reads

Functions that read back the live robot state:

  • get_actual_tcp_pose returns the robot's current TCP pose, usually in the pose format
  • get_actual_joint_positions returns the current 6 joint angles, the direct robot state in joint space