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

Adjusting TCP Rotation Angle with RoboDK API for KUKA Robot

#1
Hello,
I have a question about the Python-based RoboDK API for transforming TCP coordinates. Currently, I am using a KUKA robot model and have installed a TOOL on the robot. I need to rotate the angle shown in'Tool Frame with respect to Reference Frame' as shown in the attached picture.
In this state, I want the angle value of 'Tool Frame [R7] with respect to Robot Flange' to remain unchanged, but I only want to adjust the angle value of 'Tool Frame with respect to Reference Frame.' Essentially, I want to adjust only the rotation angle of the TCP.
Could you please guide me on which RoboDK API function I should use to achieve this?
Thank you for your continuous support.
Have a good day.


Attached Files Thumbnail(s)
   
#2
Hello JaeHong, so the tool wrt flange remains unchanged, and you want to set the pose of the tool wrt a reference frame. I assume you mean to move the robot to accomplish this (and not move the frame towards the robot instead), and the reference frame is not attached to the robot flange.

Then, with the tool active, this should work:

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

robot = RDK.Item('your_robot', robolink.ITEM_TYPE_ROBOT) # Get robot item.
frame = RDK.Item('your_frame', robolink.ITEM_TYPE_FRAME) # Get frame item.
robot.setPoseFrame(frame) # Set the "frame" as the active reference frame.

pose = robomath.xyzrpw_2_pose([10, 20, 30, 30, 45, 60]) # Define the XYZ position and RPW angles of the pose you would like the tool to take wrt the frame.
robot.MoveJ(pose) # Move the robot to "pose".

Kind regards,

Maarten
  




Users browsing this thread:
1 Guest(s)