Articles Download Safety & Security Forum myUR Go to Main Site

Universal Robots A/S
Energivej 51
DK-5260 Odense S

T: +45 8993 8989
sales@universal-robots.com

 
  • Articles
  • Download
  • Safety & Security
  • Forum
  • myUR
  • Go to Main Site
  • Support
  • Articles
  • Interpolate a position using script

Interpolate a position using script

This how to describes the use and functionality of the interpolate pose function, used for calculating a point between two waypoints.

Last modified on Jan 29, 2025

Examples are valid for:

CB3 Software version: 3.1.17779
e-Series Software version: All versions

Note that older or newer software versions may behave differently

The interpolate pose function is a script, that returns a position between two waypoints.
It may be used for following a linear trajectory between two points or for (line) palletizing.

The function takes three arguments:
variable_pose = interpolate_pose(<Waypoint_A>,<Waypoint_B>,<alpha>)

If alpha is 0, the result is Waypoint_A, if alpha is 1 the result is Waypoint_B.
If alpha is 0.5, the function will return the point directly in the middle between the two waypoints.

The function can also be used to extrapolate positions, if alpha e.g. is equal to -1.0 or 1.5.

Interpolateillustration

The program illustrated below, will go in 11 steps from WP_A to WP_B, starting at WP_A, where alpha is 1/10.0, and ending in WP_B where alpha is 10//10.0. The robot will wait for 0.1 second, at each position.
The contents of the “If False” statement will never be run. 

Interpolatea
Interpolateb

If the robot were to follow a linear trajectory, the number of loops could be increased and the waypoint “interpoint” should be made with a blend radius. However it should be noted that the blend radius cannot be larger, than the distance between each of the points.

Attached files


interpolate_pose.urp

Attached files

interpolate_pose.urp

Related articles

Examples of Script Commands
Interpolate a square or lattice using scripts
logo

Product

  • UR3e Robot
  • UR5e Robot
  • UR10e Robot
  • UR16e Robot
  • UR20 Robot
  • UR+ Products

Company

  • About us
  • Contact us
  • Careers We're hiring
  • UR merchandise

Training / Resources

  • Academy
  • Technical Resources
  • Articles
  • FAQ

Insights

  • Blog
  • Case stories
  • Content library
  • News centre
  • Podcast
  • Webinars & Events

Get in touch

  • Ask an Expert
  • Schedule a no-cost assessment
  • Find a distributor
  • Customer support

Connect with us

  • LinkedIn
  • Facebook
  • Twitter
  • YouTube
  • Instagram
  • Universal Robots A/S
  • Energivej 51
  • DK-5260 Odense S
  • T: +45 89 93 89 89
  • sales@universal-robots.com
  • US Corporate Office
  • 27-43 Wormwood St.
  • 02210 Boston, MA.
  • +1-844-GO-COBOT
  • ur.na@universal-robots.com
  • Copyright @ Universal Robots 2025
  • Cookie policy
  • Privacy policy
  • Universal Robots A/S
  • Energivej 51
  • DK-5260 Odense S
  • T: +45 89 93 89 89
  • sales@universal-robots.com
  • US Corporate Office
  • 27-43 Wormwood St.
  • 02210 Boston, MA.
  • +1-844-GO-COBOT
  • ur.na@universal-robots.com

Copyright © Universal Robots 2025

Cookie policy
Privacy policy