I'm trying to figure out to to convert a cart pos from one frame to another.
I have an application which is using a rob mounted cam to locate a product on tray. The tray is a calculated user frame, so the uframe can change based on the tray. The vision process is setup to use world for the offset frame. The issue is that the robot is told where to go on the tray by a parent system and it needs to report back the found pos to the parent. My issue is in trying to convert the found pos in world to the tray uframe. I was trying to take the inverse of the uframe and matrix against the world found pos but am not having any luck.
Does anyone know of a solution for this? I need a nudge in the right direction but I'm not opposed to just telling how to do it either Any help is appreciated!
Here's the current logic.
The part is located in UF2 but needs to be pick in UF3
PR[228]=VR[1].OFFSET (Found Pos Vis Proc)
PR[230]=UF[3] (UF3 Changes based on cart geometry)
PR[230],13=0 (Extended Rail 7th Axis)
CALL INVERSE (230,230)
PR[233]=UF[2] (Static, never changes)
PR[233],13=0
CALL INVERSE (233,233)
PR[234]=PR[230]-PR[233]
CALL MATRIX (234,228,60,160)
I'm off in the X axis and not sure why
PS. The reason inspecting this in world is due to error in the original setup. I changed the vis process offs frame to a static frame that doesn't change.