Script function to verify if a pose is valid in force mode

I would like to request a script function to verify if a pose is valid in force mode.

The use case is that our hand guiding mode (Active Drive) is running in force mode and we would like to avoid poses which creates a popup stating “Force mode not possible in singularity”. This can be quite annoying/confusing for our customers.

Thanks.

13 Likes

Thank you for the feature request, @nicolas1

Note: Other users that find the feature request relevant to themselves might “like” the post or provide their own alternate use case below.

Hello, there is still no feature to know if a position will be reachable in force mode.
Could you give us the precise metric use to calculate your dexterity index so we could prevent our guidance system (ActiveDrive) from going in singularity and generating errors. There is planty of dexterity index and we still not find the one you are using…

Hi

@jbm Was this feature ever released?

@nicolas1, @malacasse I’m having a similar issue and glad to find this thread :slight_smile: Have you found a solution or the dex index for this? If you did, it would be really nice if I can get some insights from you guys.

Thank you!

1 Like

Hi @mgskwon,

Welcome to the UR community!

Unfortunately there is still no method for detecting this up front. It might be possible to make a workaround with the same structure that I used here

Ebbe

1 Like

Hello

@mgskwon We developed our own force control which is safe in all configurations.
However I can share this information.

The UR dexterity criteria is given by

dexterity = determinant(transpose(Jacobian) * Jacobian)

We found these threshold

UR3 are consider in singularity if dexterity < 0.00002
UR5 and UR10 are consider in singularity if dexterity < 0.001
UR16 ? I guess its the same as UR5 since kinematic is realy close.

@Ebbe could you confirm this information since it is based on test we did ?
If so, you could provide a script function to calculate the robot dexterity for a specific joint position.

2 Likes

Hi @malacasse

Yes those numbers are correct, was given the same from UR R&D.

@mgskwon you can get the current dexterity value out of the client interface datastreams which are described in the excel file at the bottom of the article linked below. If you haven’t used them before you should be able to find some sample code to help you get started on this forum.

https://www.universal-robots.com/articles/ur/remote-control-via-tcpip/

It would certainly be useful to be able to access this via script in future.

2 Likes

@Ebbe @malacasse @ajp

Thank you so much for the quick responses and the information. I will give those a try and post an update :slight_smile:

I was able to fetch the dex param from the interface. I tested with UR5 and the threshold mentioned here is correct. In case someone needs a sample code for this, @ajp already posted a sample code for it as he mentioned.

sample_code

I was able to compute the dexterity with the information from @malacasse but with a 0.00002 difference from the actual dexterity reported by the robot. I think I will be able to use this to avoid singularity in my grasp planner.

Thanks a lot again, for the quick and informative replies!

Hi,

I would like to avoid “Force mode not possible in singularity” message in Force Mode, but I don’t quite understand what can I do between calling force_mode(…) and end_force_mode() to prevent this type of message which lead to protective stop. Can you give me any hints, please?

Do you mean the “robotDexterity” value as described in Client_InterfacesV3.14andV5.9.xlsx document? What this value represents and what for can I use it?

These values help you to see how close the robot is to force singularity. If they start getting close to the limit values listed below, you would want to take action to avoid the “force mode not possible in singularity message”.

Thank you for quick answer.

By “dexterity” do you mean the “robotDexterity” value as described in Client_InterfacesV3.14andV5.9.xlsx document?

What action can I take to avoid the “force mode not possible in singularity message”? Sorry, but I still don’t understand the main concept of this.

Should the solution of this problem look like this: https://www.youtube.com/watch?v=6Wmw4lUHlX8 ?

Hi @tomasz.molik, apologies it wasn’t clear. Yes I’m referring to the robotDexterity in the client interfaces.

I don’t think there is a whole lot you can do once you’re in force mode approaching the singularity other than jump out of force mode. What you could do is check the dexterity of the poses you’re expecting to start and finish at?

@ajp, thank you for your answer. I deal with the same problem as described by @nicolas1 from Robotiq:

Eventually, as @malacasse has wrote, they developed their own force control:

I have Robotiq Force CoPilot and have tested it, and it works really good (good job gentlemans:) ), but even though it is not so easy to control movements of UR near sigularity positions.

Right now I will choose to jump out of force mode near singularity. It is not perfect solution, but for now it is OK. Thank you for your support.

Hi, @tomasz.molik, sorry for the late response.

It seems @ajp already answered all the questions and your problem is solved as well with the custom force control from Robotiq @malacasse :slight_smile:

We can understand dexterity as an ability to move well in different directions in cartesian space. There are different ways to evaluate it and using Jacobian determinant is one of the commonly used methods. As it approaches zero, movements along some directions may become unreachable. As @malacasse mentioned, UR sets a threshold on this value to prevent the robot from going into the singularity.

As @ajp said, there is nothing you can do really with the robotDexterity value fetched from the client interface because it only tells you the dexterity from the current robot position. If they develop a feature that can compute dexterity from an arbitrary position, maybe we can do something inside the urscript.

What I did was pretty simple. I was solving some kind of bin picking problem and had to apply force_mode for a z-axis-constrained motion. So I computed the dexterity of discrete points along the desired path. If the path is valid, then perform the movement otherwise plan a different grasp pose and approach path. These are done outside of urscript.

Hope this is helpful :slight_smile:

1 Like

Hi @mgskwon, thank you for the information :slight_smile: I appreciate it :slight_smile: