03-14-2023, 03:29 PM
Hello,
im trying to controll a Kuka using a 3D mouse. I use a python crypt to control the Kuka in roboDK live.
Currently I can move the tool, but when I turn the coordinates turn aswell. making my upward movement, sideways. i don't understand how I can change that.
current code:
new_pos = robot.Pose() * transl(moveXYZ) * rotz(moveR)
robot.MoveL(new_pos, blocking=False)
where moveXYZ is an array consisting of 3 numbers, -1, 0 or 1. example [0, 1, -1].
this array is based on the input of my mouse, so when I point upward and right, the array becomes [-1, 1, 0]
this works ofcourse when the tool has no angle. when I turn the tool 90 degrees for example. my array will still be [-1 1, 0] meaning I want to go to the upper right corner(as seen from behind the robotic arm base. but I will now move to the top left(as seen from behind the robotic arm base).
How do I move my tool upward? As seen from the robotic base instead of the normal flange/tool frame.
im trying to controll a Kuka using a 3D mouse. I use a python crypt to control the Kuka in roboDK live.
Currently I can move the tool, but when I turn the coordinates turn aswell. making my upward movement, sideways. i don't understand how I can change that.
current code:
new_pos = robot.Pose() * transl(moveXYZ) * rotz(moveR)
robot.MoveL(new_pos, blocking=False)
where moveXYZ is an array consisting of 3 numbers, -1, 0 or 1. example [0, 1, -1].
this array is based on the input of my mouse, so when I point upward and right, the array becomes [-1, 1, 0]
this works ofcourse when the tool has no angle. when I turn the tool 90 degrees for example. my array will still be [-1 1, 0] meaning I want to go to the upper right corner(as seen from behind the robotic arm base. but I will now move to the top left(as seen from behind the robotic arm base).
How do I move my tool upward? As seen from the robotic base instead of the normal flange/tool frame.