Problem with get_inv_kin


I need to control my UR3-e series via RTDE and I found this gem : Universal Robot RTDE tutorial #5 (Full program implementation Part 2/4) - YouTube

which explains rtde control with an UR5.

I am currently using his example code implementation: GitHub - danielstankw/Servoj_RTDE_UR5: Implementation of servoj() using RTDE in python for YouTube video purpouses

and have recurring problem with the get_inv_kin function. I get an error message which says that the given coordinates are not reachable. The example starting position does not work which is probably easy to explain with differing dimensions between the UR3e and UR5e. I tried to use two positions which I determined with the get_actual_tcp_pose :

start_pose = [-0.45, -2.03799,0.22476, 3.13112, 0.17959, -0.05049]
desired_pose = [0.07764, -0.35116, 0.23508, 3.13112, 0.17959, -0.05049]

but those positions dont work either.

After this I used the example coordinates from the manual:

start_pose = [0.1, 0.2, 0.2, 0, 3.14, 0]

and those worked just fine until a singularity was reached.

Maybe someone is able to shine a light to this problem.

update: It is definetly a problem with the xyz coordinates. I have tested my rx,ry,rz values with “0.1, 0.2, 0.2” from the manual and they work fine.

Best greetings


Hi @daniel.bergmann,

One immediately obvious issue with your start pose is that your Y value is 2 metres from the robot base frame origin. The reach of the UR3e is 500mm, so it definitely won’t be able to reach this (it would even be out of reach of a UR10e). Possibly a typo when you re-entered the values that you got from the tcp pose?

Many thanks for the quick answer. Yes it was a typo but just in my post here. It was correct in my program. I discovered that switching to free drive mode and reposition the tcp seems to be the solution.