Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Axis Alignment in UR5 robot

#1
Is it possible to align the UR5 robot with a base coordinate axis only using the 'setPose' command in the python API? If yes, would a target need to be set? Any information on approach is helpful.
#2
Hello, 

Following is one way to align the robot with Base Reference Frame. Let me know if this helps.


Code:
from robolink import *    # RoboDK API
from robodk import *      # Robot toolbox
RDK = Robolink()

robot = RDK.Item("UR5e")
frame = RDK.Item("UR5e Base")


basepose = frame.Pose()
print(basepose)
xyzabc = Pose_2_UR(basepose)
x1,y1,z1,a1,b1,c1 = xyzabc

pose1 = robot.Pose()
poselist1 = Pose_2_UR(pose1)
x2,y2,z2,a2,b2,c2 = poselist1

xyz_list = [x2,y2,z2,a1,b1,c1]
xyz_pose = UR_2_Pose(xyz_list)
print(xyz_pose)
robot.setPose(xyz_pose)
  




Users browsing this thread:
1 Guest(s)