RobotStudio event

Posemult help please

I'm trying to create a program that will stitch weld around a circle teaching only 3 points and a user defined stitch length.
I've been successful in as far as I can get the robot to follow the path but now I'm trying to get the tool orientation correct for each point. I found code here Quaternions — ABB Robotics User Forums (robotstudio.com)that appears  to do this. 

My problem is as he states after his code...
If points A and B are not defined relative to the point they are rotated around it just adds extra steps to first define them relative to that point, then rotate, then convert them back to their original work object coordinates, still using PoseMult and also PoseInv. 

I do have the center point of the circle but its pos data  created from the Fitcircle function I used to find my radius.  I'm  unsure how create a temp wobj from the center position data and to use the PoseMult and PoseInv functions properly to convert my points to the temp wobj and back again. 

Any help would be appreciated.
Thanks

Answers

  • so i've managed the center workobj ....not very elegant but it works

         rob_center_x2.trans:=center;
         jt_center:= CalcJointT(rob_center_x2, tWeldGun\WObj:=wobj00700062);
         rob_center_x2 := CalcRobT(jt_center, tWeldGun\WObj:=wobj0);
         rob_center_x1:=rob_center_x2;
         rob_center_y1:=rob_center_x2;
         rob_center_x1.trans.x:=rob_center_x2.trans.x-200;
         rob_center_y1.trans.y:=rob_center_x2.trans.y-200;
         framecenter:=DefFrame(rob_center_x2,rob_center_x1,rob_center_y1);
         wobjCenter.oframe:=framecenter;

    getting there...