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
  • Get the robot to choose the desired inverse kinematics solution

Get the robot to choose the desired inverse kinematics solution

Last modified on Jan 29, 2025

Introduction

Many applications require the robot to move to 3D poses (e.g. provided from a camera or computed). In application development, you want to control which direction the robot moves to reach the position, while avoiding joint limits, collisions, etc.

If you just make the robot move with a MoveJ to the target position by providing the target 3D pose, you cannot know which of the 8 potential paths the robot will take.

Solution

Use qNear to force the robot to choose a specific path. A way to do that is to define a Waypoint close to the point where you want to move to (you don't have to move to that waypoint)

At line 8, the robot moves to Waypoint_2, the desired way around

In line 13, the robot only knows the 3D pose, and it chooses to move in a different undesired direction around the base

Solution 1: At lines 17 and 18 we compute the inverse kinematics for the target 3D pose with a qNear from Waypoint_2 (which we knew would lead to moving in the right direction

Solution 2: At lines 22 and 23, we set Waypoint_2 to the new position. The generated script code will behind the scenes compute the inverse kinematics with a qNear at the original Waypoint_2

Attached files


IK_example.mp4
ik_example.urp
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