Home Programming

Discussion

Left ArrowBack to discussions page
dahonoradahonora Posts: 17 Apprentice
edited November 2019 in Programming
I am working with a UR10e. I am using a stereo camera to align the TCP with the plane in front of it. After this operation, the x-y plane of the TCP is parallel to the working plane, but the z-axis is keeping the same orientation it has at the beginning. Now, I want to change the TCP z-axis orientation to align the TCP y-axis with the base z-axis rotating only around the z-axis of the TCP to keep the TCP x-y plane parallel to the working plane. Any idea how to do that?

Thank you in advance

Comments

  • matthewd92matthewd92 Founding Pro, Tactile Sensor Beta Testers Posts: 1,267 Handy
    Assume you are calculating your moves in script, if so, use pose_trans instead of pose_add as that will translate around the feature you are trying to use versus base coordinates.
  • dahonoradahonora Posts: 17 Apprentice
    Hi @Matthewd
    I think that you didn't get my point. I am actually using pose_trans to move w.r.t the actual TCP pose, but it is always a relative movement. Following your idea I can do:

    pose = get_actual_tcp_pose()
    newpose = pose_trans(pose, p[0,0,0,0,0,d2r(zdegrees)])

    The problem is how to find the angle zdegrees in order to align the TCP y-axis with the base z-axis rotating only around the z-axis of the TCP to keep the TCP x-y plane parallel to the working plane.

    I will try to explain better why do I need this. The robot starts the movements in a random position in front of a vertical working plane with random orientation and position. I use the stereo camera to align the x-y TCP plane with the vertical working plane. The used tool has a one-side asymmetry, so I need to approach the final point with a specific ‘rz’ tool orientation. That’s why I want to align the TCP y-axis with the base z-axis.

    I hope it is clear now. Thank you for your help.

  • matthewd92matthewd92 Founding Pro, Tactile Sensor Beta Testers Posts: 1,267 Handy
    Don’t use the tool frame as your relative position, use the plane you want to move relative to. Another option is pose_sub your plane from the tool, then add your relative motion to that pose and then add that back to the tool pose. This will get your tool aligned to the plane of interest. 
Sign In or Register to comment.
Left ArrowBack to discussions page