Home› Programming
Discussion
Back to discussions page
Dieter
Unconfirmed Posts: 7 Apprentice
pose_trans for a reference drive |
71 views
|
Answered | |
/ Most recent by jelms
in Programming
|
1 comment |

in Programming
Hello,
I am using a UR3e and some UR_script functions. My program is supposed to drive to three positions of a Surface, calculate the normalvector (nx, ny, nz) and then calculating the rotation around x and y of normal Vector:
- Rx is calculated by Rx= -arctan(ny/nz)
- Ry is calculated by Ry=arctan(nx/nz)
Now i want to drive to a pose "p1" relative to the calculated rotation of the global coordinate System rot_cs = p[0,0,0,Rx,Rx,0]. So I am calculating the new pose by using pose_trans(rot_cs, p1). But it's not working. I cannot find the mistake. What am I missing when I want to do the Transformation?
Thank you
Dieter
I am using a UR3e and some UR_script functions. My program is supposed to drive to three positions of a Surface, calculate the normalvector (nx, ny, nz) and then calculating the rotation around x and y of normal Vector:
- Rx is calculated by Rx= -arctan(ny/nz)
- Ry is calculated by Ry=arctan(nx/nz)
Now i want to drive to a pose "p1" relative to the calculated rotation of the global coordinate System rot_cs = p[0,0,0,Rx,Rx,0]. So I am calculating the new pose by using pose_trans(rot_cs, p1). But it's not working. I cannot find the mistake. What am I missing when I want to do the Transformation?
Thank you
Dieter
I think this will help. It wasn't completely clear you goal, but this shows how to take a normal vector `n` and generate a pose transformation that should takes the unit z vector to the normal vector.