Home Programming


Left ArrowBack to discussions page
cianmartincianmartin Unconfirmed Posts: 2 Recruit
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.  


  • iLikeWafflesiLikeWaffles Posts: 3 Apprentice
    I would also like to know if there's a way to do this.

    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?
  • matthewd92matthewd92 Founding Pro, Tactile Sensor Beta Testers Posts: 1,267 Handy
    @cianmartin I can't say if that is the best approach, I would have to think about it some.  Yes you can access array elements like that, you just have to do it in a script line, not using the assignment button.

    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?

Sign In or Register to comment.
Left ArrowBack to discussions page