Home› Programming
Discussion
Back to discussions page
cianmartin
Unconfirmed Posts: 2 Recruit
Aligning the TCP to a plane |
325 views
|
Answered | |
/ Most recent by matthewd92
in Programming
|
3 comments |

in Programming
Hi,
It's probably a simple question, but I can't figure it out.
I'm trying to set up the robot whereby an operator manually moves the robot TCP to a position and sets it as waypoint_1.
Then the program automatically orients the TCP so it is parallel to the base X and Y axis.
My thinking is that I can use the following code:
Pos1 = get_actual_tcp_pose() #records the current position to Pos1
Pos1[4] = rotation needed to get parallel to Base X
Pos1[5] = rotation needed to get parallel to Base Y.
And then a MoveL to Pos1 brings the TCP into line.
Firstly I can't see a way to access elements in the array like this, and secondly, I don't know if it's the best approach.
If anyone can tell me what I'm missing here I'd greatly appreciate it.
It's probably a simple question, but I can't figure it out.
I'm trying to set up the robot whereby an operator manually moves the robot TCP to a position and sets it as waypoint_1.
Then the program automatically orients the TCP so it is parallel to the base X and Y axis.
My thinking is that I can use the following code:
Pos1 = get_actual_tcp_pose() #records the current position to Pos1
Pos1[4] = rotation needed to get parallel to Base X
Pos1[5] = rotation needed to get parallel to Base Y.
And then a MoveL to Pos1 brings the TCP into line.
Firstly I can't see a way to access elements in the array like this, and secondly, I don't know if it's the best approach.
If anyone can tell me what I'm missing here I'd greatly appreciate it.
We are using freedrive to set waypoints for different stations for a pick-and-place application, but how to precisely align the gripper parallel or perpendicular to an axis? Or maybe align a wrist joint to an axis?
Probably the easiest way to really do this is to have a taught point that has the axes pointing in the directions you want and then use some pose match against that point. You could basically do a pose_sub between the taught point and the reference point (Set it up as a feature or use the base feature) and then you would zero out the rotations of that difference pose (rx, ry, rz) and then add that new pose back to the feature that you used as the reference. You would only zero out the ones of interest. So if I wanted my tool to be parallel to the base XY plane I could zero out the rotations around that and then do a pose_add back to the reference point.
Does any of that make sense?