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

Move tool based on robotbase frame

#1
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.
#2
你可以哈ve a translation towards positive Z axis of your coordinate system by multiplying the translation before the robot pose (pre-multiplication):
Code:
new_pos = transl(0,0,moveZ) * robot.Pose() * rotz(moveR)
robot.MoveL(new_pos)




Users browsing this thread:
1 Guest(s)