# External force RTDE injection not working with get\_tcp\_force() for ursim 5.9.4 & 5.4.0

**URL:** <https://forum.universal-robots.com/t/external-force-rtde-injection-not-working-with-get-tcp-force-for-ursim-5-9-4-5-4-0/13438>\
**Category:** Report a Bug\
**Created:** [April 6, 2021, 9:55am UTC](https://forum.universal-robots.com/t/external-force-rtde-injection-not-working-with-get-tcp-force-for-ursim-5-9-4-5-4-0/13438 "2021-04-06T09:55:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![miol](https://avatars.discourse-cdn.com/v4/letter/m/f14d63/32.png) [@miol](https://forum.universal-robots.com/u/miol)\
**Post date:** [April 6, 2021, 9:55am UTC](https://forum.universal-robots.com/t/external-force-rtde-injection-not-working-with-get-tcp-force-for-ursim-5-9-4-5-4-0/13438/1 "2021-04-06T09:55:57Z")

</div>

Hi

When using enable\_external\_ft\_sensor(True) / ft\_rtde\_input\_enable(True) for ursim 5.9.4 and 5.4.0 I cant get the values when calling get\_tcp\_force().

I can get the same code to work for the CB3 ursim 3.10.1.

Code to reproduce:  
[force\_inject.zip](https://forum.universal-robots.com/uploads/short-url/vFiOOXvAiE7eNJZcdkRgr4CJGd3.zip) (67.7 KB)

**Software version** : 5.9.4 and 5.4.0  
**Robot generation** : ur5 E

**Steps to reproduce** :  
Start ursim  
run python3 force\_inject.py  
run external\_force\_test.urp in sim

**Expected behavior** :  
In log:  
Force: p[0,0,0, -0.999685, -0.0000470508, -0.0250784]  
 ![CB3](https://us1.discourse-cdn.com/flex020/uploads/universal_robots/original/2X/0/0ce0aec240a399484485849b2a1cd8a398263ca1.png)

**Actual behavior** :  
Force: p[0,0,0,0,0,0]

 ![URE](https://us1.discourse-cdn.com/flex020/uploads/universal_robots/original/2X/0/09a07e6b717199b905578e0a54d8be93bb55da73.png)

I’ve looked at [External force-torque sensor implementation](https://forum.universal-robots.com/t/external-force-torque-sensor-implementation/59) and [REAL-TIME DATA EXCHANGE (RTDE) GUIDE](https://www.universal-robots.com/articles/ur/interface-communication/real-time-data-exchange-rtde-guide/) but could not find a solution.

---

<div class="post-metadata">

**Author:** ![Ebbe](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/ebbe/32/1413_2.png) [@Ebbe](https://forum.universal-robots.com/u/Ebbe)\
**Post date:** [June 23, 2021, 10:15am UTC](https://forum.universal-robots.com/t/external-force-rtde-injection-not-working-with-get-tcp-force-for-ursim-5-9-4-5-4-0/13438/3 "2021-06-23T10:15:32Z")

</div>

Hi @miol

Thank you for you input! We will take a look at your findings.

Ebbe

---

<div class="post-metadata">

**Author:** ![miol](https://avatars.discourse-cdn.com/v4/letter/m/f14d63/32.png) [@miol](https://forum.universal-robots.com/u/miol)\
**Post date:** [July 6, 2022, 12:06pm UTC](https://forum.universal-robots.com/t/external-force-rtde-injection-not-working-with-get-tcp-force-for-ursim-5-9-4-5-4-0/13438/4 "2022-07-06T12:06:42Z")

</div>

Hi @Ebbe  
I tried this out on [5.11.1](https://hub.docker.com/layers/ursim_e-series/universalrobots/ursim_e-series/5.11.1/images/sha256-3facbf6ac6062c56c605f98d2d33da8dd6579399e4ed9f81a457aaec342b95cf?context=explore) which gives the same results.

I was hoping to make some unit test in a simulation with a UR cap using force/tourqe control. Do you think the ft\_rtde\_input\_enable in ursim is something that will be looked into?

Best regards  
Mikkel

---

<div class="post-metadata">

**Author:** ![Ebbe](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/ebbe/32/1413_2.png) [@Ebbe](https://forum.universal-robots.com/u/Ebbe)\
**Post date:** [July 8, 2022, 7:47am UTC](https://forum.universal-robots.com/t/external-force-rtde-injection-not-working-with-get-tcp-force-for-ursim-5-9-4-5-4-0/13438/5 "2022-07-08T07:47:45Z")

</div>

Hi Mikkel,

It should be fix in version 5.11.2.

Best Regards  
Ebbe
