Universal Robots+

Creating a simple URCap showing the force value

Hi everyone,

I just wanted to ask if you have ever done an URCap that is showing the force value from the force sensor present in eSeries. If you did it, I would have some questions, maybe you have some example code to share :slight_smile:

Regards

What are you trying to display? There are two native functions in URScript that will display the forces, get_tcp_force() returns a list of the 6 forces as [Fx, Fy, Fz, Tx, Ty, Tz] or force() which returns the normal force using norm(get_tcp_force())

Yes, exactly. The second one, and I would like to display it on URCap.

Where on a URCAp are you trying to display it?

In the toolbar node.

Any hints or exampleā€™s code?

You can get some hints by going through the URCaps SDK specific swing/html examples from the ā€œURCapsStarterPackageā€. The ā€œURCapsStarterPackageā€ can be downloaded from the following website link and used as a virtual machine.

Assuming you have the ā€œURCapsStarterPackageā€ running as a virtual machine on your host machine. When you go to the home folder of the ā€œURCapsStarterPackageā€, you will find a child folder ā€˜sdkā€™. There you will find the URCaps SDK specific swing/html examples. For more details, please refer to the following Figures 1 and 2.


Figure 1: Path to the swing and html folders which contain respective examples of URCaps SDK


Figure 2: Path to the swing examples of URCaps SDK

You can get the values by using ā€œactual_TCP_forceā€ of RTDE.