Universal Robots Forum

How to rotate the existing Plane by variable

I have created the one plane with respect to the base and tool on one table.
and I wanted to rotated the enter plan by some degree(by sending the some values through variable) with respect to the earlier…

and I have tried that by overwriting the RZ value of plane by variable but it is not working…

Is there a way or something else? Any help is appreciated thanks.

Hi vinaykumar, Welcome to the forum!

It sounds like you might be trying to manipulate the value of the plane constant.
When you record a plane it generates a Variable e.g. Plane_1 and Plane_1_Const.

You can change the values of each of the 6 values
e.g. Plane_1[#] = Plane_1[#] (+,-,*,/) value

you cant do
e.g. Plane_1_const[#] = Plane_1_const[#] (+,-,*,/) value

but you can reset back.
e.g. Plane_1 = Plane_1_const

Tq for quick reply mr.hammerton !!

I have already tried in this way but it is not working!! with this instead rotating the plan, tool is rotating…!

Actually only the origin value of the plane is there in the plan_1 variable or Plane_1_const, with this only we can modify the X,Y,Z of origin…

You may want to look at using the pose_trans() function if you are trying to rotate the plane based on its coordinate system.
For example:

Plane_1 = pose_trans(Plane_1_const, p[0.0,0.0,0.0,0.0,0.0,d2r(45)])
1 Like

thanks for the instruction!! it is working for rotating the plane by the origin…

Now we are rotating the plane with fixed origin, but I want to rotate the plane by offsetting the origin of plane.


like this :point_up_2:

so,I have tried like this : Plane_1 = pose_trans(Plane_1_const, p[0.30,0.30,0.0,0.0,0.0,d2r(45)]) but this is not working… and I hve used the assignment command like this Plane_1 := p[Plane_1+0.30,Plane_1+0.30,Plane_1[2],Plane_1[3],Plane_1[4],d2r(45)] this is also not working…

and we used the same function for shifting only the origin like this: Plane_1 := p[Plane_1+0.30,Plane_1+0.30,Plane_1[2],Plane_1[3],Plane_1[4],Plane_1[5]] by that time it is working for shifting the origin…
then we use the pose_trans function for rotating the plane from that point(shifted origin) but it is not working…

is there any other way.??

When you are using pose_trans you need to think of the Planes pose data including orientation. For example; using your image I am assuming the Positive x direction is pointed to the right of the origin, positive y is going upwards to the top of the page and positive z is pointing up out of the page. So if you use pose_trans to go to the point you have marked you will want to move in the -x and +y direction and rotate around the z-axis. If 300mm is the distance in the x and y direction then it would be

pose_trans(Plane_1_const, p[-0.30,0.30,0.0,0.0,0.0,d2r(45)])

You should also note that using Plane_1_const is using the saved pose in the installation. If you are wanting to use your updated variable then you should use Plane_1 instead of Plane_1_const.

1 Like