Author Topic: Converting from Tool to World Coordinates  (Read 1586 times)

0 Members and 1 Guest are viewing this topic.

Offline howie

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 32
Converting from Tool to World Coordinates
« on: August 10, 2017, 08:46:54 PM »
If I have a position represented in the tool coordinate frame, what is the formula for converting it to the world coordinate frame.  Positions are represented as Adept x, y, z, yaw, pitch, roll.  Note, Adept uses Z-Y-Z Euler rotation.  In the end I want the raw calculations behind the following Adept V+ code:

SET loc_in_tool = loc_in_world:INVERSE(tool_offset)

loc_in_world is the original position in world coordinates

loc_in_tool is the converted position in tool coordinates

tool_offset is the tool offset from the mounting flange

Any help you can provide is appreciated.

Offline TygerDawg

  • Sr. Member
  • ****
  • Thank You
  • -Given: 1
  • -Receive: 47
  • Posts: 398
Re: Converting from Tool to World Coordinates
« Reply #1 on: August 11, 2017, 12:17:25 AM »
Unless I'm missing something, it seems you're getting tangled up in transforms, locations, and their relationships.

TOOL tool_offset              ;invoke the transform tool_offset as the TCP
HERE loc_in_world           ;set loc_in_world = the current location of the TCP
SET loc_in_world = HERE ;records the current TCP location to the transform variable loc_in_world
Blue Technik
Virtuoso Robotics Engineering

Offline robotero

  • Sr. Member
  • ****
  • Thank You
  • -Given: 43
  • -Receive: 73
  • Posts: 306
Converting from Tool to World Coordinates
« Reply #2 on: August 15, 2017, 12:44:53 PM »
Howie: I don't understang how you get a position in TOOL frame coordinates

The controller reads the encoders and uses a direct kinematic algorithm to find the position of the faceplate in WORLD coordinates, then multiplies by  the TOOL offset transformation.
The result is the position of the TCP in WORLD coordinates for the given values of the encoders.

If you have the location (of the TCP) in WORLD coordinates and multiply by the inverse of the TOOL offset
what you get is the position of the FACEPLATE in WORLD coordinates.
From there you can use and inverse kinematic algorithm to find the encoder values that you need to move the tool in that position.

Usually you get  Positions in world coordinates from a simulation for example

please explain what exactly you want to do or need
« Last Edit: August 15, 2017, 04:47:17 PM by robotero »

Offline SkyeFire

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 32
  • -Receive: 935
  • Posts: 6347
Re: Converting from Tool to World Coordinates
« Reply #3 on: August 15, 2017, 08:48:12 PM »
Howie:  it sounds to me as if you want to predict the results of a "Tool Relative" motion, in World, before/without actually performing the motion.  That's quite simple.  All you need do is take the starting position as the frame of reference, and "multiply" it by the planned motion.

I usually do this in KUKA KRL, but the Adept V+ language looks to be similar in this instance. So:
Code: [Select]
Shift = {X 10,Y 15,Z 20,A 1,B 2,C 3}
PTP P1 ; move to point P1
LIN_REL Shift #TOOL ; move along and rotate around the TCP axes
P2 = $POS_ACT ; Set P2 to robot current position in World
P3 = P1 : Shift ; mathematically generate P3 from P1

P2 and P3 will end up being identical points in World (within rounding error).

I've often used this technique to predict a LIN_REL #TOOL move before making the motion, in order to check it against range limits.