# Problem with get\_inv\_kin

**URL:** <https://forum.universal-robots.com/t/problem-with-get-inv-kin/16586>\
**Category:** URCap Development\
**Created:** [September 20, 2021, 1:04pm UTC](https://forum.universal-robots.com/t/problem-with-get-inv-kin/16586 "2021-09-20T13:04:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon2067394](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@anon2067394](https://forum.universal-robots.com/u/anon2067394)\
**Post date:** [September 20, 2021, 1:04pm UTC](https://forum.universal-robots.com/t/problem-with-get-inv-kin/16586/1 "2021-09-20T13:04:18Z")

</div>

Hi,

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](https://www.youtube.com/watch?v=LnsB-q6D7ts)

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](https://github.com/danielstankw/Servoj_RTDE_UR5)

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

DB

---

<div class="post-metadata">

**Author:** ![ajp](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/ajp/32/471_2.png) [@ajp](https://forum.universal-robots.com/u/ajp)\
**Post date:** [September 24, 2021, 1:51am UTC](https://forum.universal-robots.com/t/problem-with-get-inv-kin/16586/2 "2021-09-24T01:51:09Z")

</div>

Hi @anon2067394,

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?

---

<div class="post-metadata">

**Author:** ![anon2067394](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@anon2067394](https://forum.universal-robots.com/u/anon2067394)\
**Post date:** [November 25, 2021, 12:55pm UTC](https://forum.universal-robots.com/t/problem-with-get-inv-kin/16586/3 "2021-11-25T12:55:25Z")

</div>

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.
