3
$\begingroup$

This may be a very basic question, however I am having great difficulty to find the right answer.

I have a functioning python code for the inverse kinematics of a 6 axis UR Robot. For any transformation matrix in space I get the corresponding joint values. However: I do not know how I can add the TCP transformation to the calculation. I have a tool attached to the robot and the IK solution should of course account for that. How do I do this? can I simply transform the coordinates before I send them to the inverse kinematics function or does this need to happen inside of the IK function? This feels like it is super easy but I am drawing a blank for the last few days.

So far I have taken the dot product of the coordinates I want to approach and the TCP transformation. However this only works without any rotation as soon as rotation is added this doesn't work anymore what am I missing? My googling skills have failed me so far.

$\endgroup$
3
$\begingroup$

A fixed (not dependent on any changing parameter) coordinate system transformation can be defined between the TCP and the "end of the robot" coordinate system. Depending on how you formulate CS transformations this can be a 4x4 transformation matrix or a double quaternion or any other form of expressing coordinate system transformations.

Two possibilities exist which are equivalent in results but one of them may be preferred based on current implementation:

  • Transform the TCP coordinates to "end of robot" coordinates using the fixed transformation. Since you probably want to transform also orientation not just position, the simplest would be to take the unit vectors of the desired TCP coordinate system axes and transform them to capture both position and rotation. That maps all unit vectors to the coordinate system you have the inverse kinematics for, you just need to rewrite the unit vector coordinates to the convention you use to describe orientation (e.g. Euler angles)

  • Add the fixed transformation to the inverse kinematics problem. You can just add another fixed transformation to the kinematics problem. This will not affect the math, since is is a matrix (if you used the 4x4 matrices) with all elements known.

| improve this answer | |
$\endgroup$
  • $\begingroup$ Thank you for your answer. I had already done the first option you proposed but I was still getting incorrect values. After you assured me this was the correct method, I looked for other reasons why the values could be wrong and found a mistake elsewhere in the program (zyx instead of xyz). Thank you very much for helping me out. $\endgroup$ – robyll Dec 14 '19 at 11:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.