Universal Robots Forum

External force RTDE injection not working with get_tcp_force() for ursim 5.9.4 & 5.4.0


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 (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]

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

I’ve looked at External force-torque sensor implementation and REAL-TIME DATA EXCHANGE (RTDE) GUIDE but could not find a solution.