We would like to be able to access limits of the UR Joint/speed limits.
In our tests we would like to:
a) check what are the current joint limits on a robot (to verify it matches our config), and
b) set joint limits in URsim to whatever we have in our config (to make sure it matches real robot settings).
Regarding b), we plan to use suggestions from this topic. Is it a recommended solution?
Regarding a), this topic suggests that there is some undocumented API as part of secondary client interface that contain this type of data. Is it something we could use? Does it contain joint limits? If not, how can we read current joint limits?
I think you can get it from Primary and Secondary Interface from package type 16 Robot_State, subpackage 6 Configuration Data.
You can also find it in installation file, so if you copy the program from robot to ursim limits will be the same. Installation file is a mix of xml and ini format, but it looks easily parsable.
It seems like my example shows the max and min only, not the current joint limit settings. You are probably better off parsing the data from the installation file.
The values will be listed under [SafetyLimits Normal Joints] in the installation tab. Here is a post that covers opening the installation file.
@inu - I’m not sure I understand. Are you saying that this value represents what is max/min of safety limit for joint position and not the actual limit? Does that mean there are 3 types of values:
Sorry for the late response. I need to just retrieve the joint limits.
I tried retrieving them via secondary interface. I do get all the robot state data using c++ in byte string format.
But I’m not able to extract the joint limit from the data returned.
Is there any method equivalent to struct.unpack in c++?
I got the joint limits using the jointMinLimit and jointMaxLimit returned from the secondary interface. You need to extract the joint limits from the Robot State Message -> Configuration Data .
@inu This post #7 example is not really using the secondary client interface ?
The minJointRevolutions and maxJointRevolutions data are not in the secondary client interface and the minJointPosition and maxJointPosition from secondary client interface are not related to the safety settings.