# Inverse kinematics python

**URL:** <https://forum.universal-robots.com/t/inverse-kinematics-python/24735>\
**Category:** Technical Questions\
**Created:** [November 1, 2022, 11:16am UTC](https://forum.universal-robots.com/t/inverse-kinematics-python/24735 "2022-11-01T11:16:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![erikkockar](https://avatars.discourse-cdn.com/v4/letter/e/a88e4f/32.png) [@erikkockar](https://forum.universal-robots.com/u/erikkockar)\
**Post date:** [November 1, 2022, 11:16am UTC](https://forum.universal-robots.com/t/inverse-kinematics-python/24735/1 "2022-11-01T11:16:37Z")

</div>

Hi,

I have question regarding inverse kinematics computation. In my application I have some pre-recorded poses. I would like to compute inverse kinematics with some implemented heuristics (joint angles). I am now sending poses trough RTDE and in thread in real-time compute inverse kinematics thanks to `get_inverse_kin()`.

What to do in the case when I want to compute inverse kinematics locally on my laptop using python? I know about ur\_rtde library but this requires to have robot in remote which I am trying to avoid. I can think about just to compute it on the robot and send result to my laptop by following idea:

run loop into which I will send pose → compute inv kinematics → save into registers → read registers.

Does my idea makes sense ? Is there some better way how to compute inv. kinematics locally ? I do not want to reinvent the wheel tough.

Thanks

---

<div class="post-metadata">

**Author:** ![mr.magnuso](https://avatars.discourse-cdn.com/v4/letter/m/ed8c4c/32.png) [@mr.magnuso](https://forum.universal-robots.com/u/mr.magnuso)\
**Post date:** [November 1, 2022, 12:06pm UTC](https://forum.universal-robots.com/t/inverse-kinematics-python/24735/2 "2022-11-01T12:06:22Z")

</div>

A UR robot is factory calibrated and the information about the individual robot is described in a file in the controller file system called _calibration.conf_. The _get\_inverse\_kin()_ will give different result on different robot individuals. It is quite easy to implement an inverse kinematics routine for the nominal robot model, but to have the exact same results as you will obtain on the current UR script call you need a numerical/iterative algorithm and take the _calibration.conf_ file into account.

If your accuracy requirements are not that high, using the nominal robot model perhaps could be ok.

---

<div class="post-metadata">

**Author:** ![erikkockar](https://avatars.discourse-cdn.com/v4/letter/e/a88e4f/32.png) [@erikkockar](https://forum.universal-robots.com/u/erikkockar)\
**Post date:** [November 1, 2022, 12:16pm UTC](https://forum.universal-robots.com/t/inverse-kinematics-python/24735/3 "2022-11-01T12:16:56Z")

</div>

Thanks for answer.  
So my idea makes sense then to compute it locally on the robot and send values back trough registers.
