TCP reorientation tool?



Hi,
 
I hear there is a program you can use to invert the orientation of a TCP quickly - does anyone know where I can get it from?  On other robots where rotation is done through Euler angles, not Q1-4, you just invert the X, Y or Z value, depnding on which way you want to the robot to move in tool..

Comments

  • There are ways that you can mathematically invert your pose.  ABB uses the quaternion method (q1,q2,q,3,q4), other robots use a homogeneous transform matrix (HTM).

    Are you trying to invert the positions during execution or offline?




  • Offline.
     
    I think i've managed it offline with converting the pose to Euler angles, inverting the relevant one, then converting back to quaternions.  A little messy, but looks like I'll get there.
  • szily85
    szily85 Norway
    Hello buddys :)

    I faced a problem and cant resolv.
    I want to read the angles of the robot with the GetEuler but I always have a error message:
    Unexpected identifier ":="...

    my code is:

    VAR num anglex;
    VAR pose object;

    anglex:=GetEuler(X,object.rot);

    Why is this error appears? "Object" should be some exact data in my prog or just a VAR like above? I`m stucked and can`t move on. image

    Can someone help, please? It`s urgent!

    Thanks
    Regards Szily
  • I think it may be a typo in the manual.

    there is no instruction "GetEuler", but there is a "EulerZYX".  Try changing "GetEuler" command to "EulerZYX"


  • szily85
    szily85 Norway
    The error message still appears! I tried many ways, but nothing. I have no idea what is wrong. image

    My task is to get the actual angle of the axis 5 and compare it with on predifined angle.

    This is what I want to manage.

    Idea???
    Regards Szily
  • Hello,
     

    While you have probably solved the problem by now,  the problem was most likely in another part of the code above the line in question.

     

    The following code has no errors and compiles:

    Proc TestProc()

    VAR num anglex;

    VAR pose object;

    anglex:=EulerZYX(X,object.rot);

    endproc

     

      Steve

     

  • [QUOTE=szily85]The error message still appears! I tried many ways, but nothing. I have no idea what is wrong. image

    My task is to get the actual angle of the axis 5 and compare it with on predifined angle.

    This is what I want to manage.

    Idea???
    [/QUOTE]

    If all you want is the motor angle, just use the "ReadMotor" command

    [code]VAR num MotorAngle_5;
    ...
    MotorAngle_5:=ReadMotor(5);

    [/code]
    It returns the motor angle in radians.
  • szily85
    szily85 Norway
    Yeah, I already changed to this option, it`s more simple. I founded this also in documentation. But anyway thanks a lot guys image
    Regards Szily
  • Ramazan
    Ramazan Turkey
    Hello 
    if u wanna know target orieantation or u wanna change it 

    This is my example i used

    VAR robtarget object;
    VAR num anglex;
    VAR num angley;
    VAR num anglez;
    VAR orient angles;

    object:=Target_27; 
    anglex := EulerZYX(\X, object.rot);
    angley := EulerZYX(\Y, object.rot);
    anglez := EulerZYX(\Z, object.rot);
    angley:=angley+45;  yada ! angley:=+45;
            
    object.rot:= OrientZYX(anglez , angley , anglex);
    target27:=object;

    OR
    tool tooldata

    angles:=tooldata_1.tframe.rot;
    anglex:=EulerZYX(\X,angles);
    angley:=EulerZYX(\Y,angles);
    anglez:=EulerZYX(\Z,angles);