Getting Plane points

Hello,

Not sure if this is possible to actually do, but once you create a plane in the PolyScope. Is it possible to get the 3 points used to create the plane in the feature of the plane that you just created?

So like basically getting the three points (0,0), (x,0) and (0,y) from simply just sending the plane variable into your URCap? I know you can just find these values by going onto the plane and modifying it and moving it to each point and use that same plane as the feature, but is it possible to get these values through URScript/java (and without moving the robot after the plane was created).

Thank you.

I am not sure if you can do it in a script, but in java you can.

FeaturePoint FP1 = myFP.getPoint1();

Will give you the coordinates for the first point, the two remaining can be found by replacing 1 with 2 and 3.

1 Like

@michael.andresen
Thanks.

The api says this is deprecated, but I’m using SDK 1.4.4 so I should be fine.
Is there a way to get the x and y values as a double separately from a FeaturePoint in respect to the planes feature?

You can try the Feature.getPose() method, this should return the Cartesian location of the feature.

This location will be relative to the base. You can try some transforms to the plane feature by using the script functions pose_trans()/pose_inv().

Here is an example for converting from the base coordinate system to the tool coordinate system:

https://www.universal-robots.com/how-tos-and-faqs/how-to/ur-how-tos/get-force-and-torque-values-in-tool-coordinate-system-44911/

image

I don’t have much experience with this subject but this may be a good starting point. I can dig into the question a bit more and get back to you if I get a working sample.

Doesn’t getPose() get p[x,y,z[rx,ry,rz] of the feature? I’m not entirely sure, but if you use getPose() on a feature plane wouldn’t it just give you the one single pose?

I want the x,y values of the 3 points used to make the plane in respect of the plane itself:

These 3 points in respect to the plane itself. I really only need the 2nd and 3rd point because the 1st point is going to be x=0 and y=0 in respect to the plane itself.

@inu

I just noticed that I am unable to use Feature.getPose() because I have API version 1.4 .4 and UR 5.1.2…