Home Programming

Discussion

Left ArrowBack to discussions page
gauravbgauravb Posts: 9 Apprentice
I am trying to write script code to align my robot's tcp along the normal of a given plane. I know there is a feature(align tcp) in UR5 which does this job. I want to know if it can be done using script or from programming.
Tagged:

Comments

  • bcastetsbcastets Vacuum Beta tester Posts: 674 Expert
    If you have Robotiq Copilot software you could do that with a contact offset node.

    Here below is a elearning video presenting this function:
    https://elearning.robotiq.com/course/view.php?id=7&section=14
  • gauravbgauravb Posts: 9 Apprentice
    You have answered in the condition when normal is not known. In my case normal is known already.  Only thing needed to be done is align tcp z axis along the normal to approach the robot
  • bcastetsbcastets Vacuum Beta tester Posts: 674 Expert
    If you know the perpendicular, you could create a feature point and move the robot along its direction. You could also orient the robot to have same orientation as the feature point.
  • gauravbgauravb Posts: 9 Apprentice
    Yeah that's what i want. How to orient tcp programmatically
  • bcastetsbcastets Vacuum Beta tester Posts: 674 Expert
    If you when to have the robot with same orientation as a feature, you can do it like this:


    Not sure if this will answer your question.



  • gauravbgauravb Posts: 9 Apprentice
    Thanks for the reply. Actually I was having only plane normal. And in movej the last three are rotation vector coordinates. So I was looking for something to convert the plane normal into the rotation vector. Anyways I got my solution by using function "rotationMatrixToVector" in Matlab. I converted my normal vector along with the x & y axis vector into matrix form and then using the above function converted it to rotation vector. I am now able to orient my robot perfectly.
Sign In or Register to comment.
Left ArrowBack to discussions page