RobotStudio event

wobj definition (rotoation)

Hi people. I need to define a wobj in terms of Z and X instead of X and Y, as available in the Flex Pendant. So, my doubt is: Is there a way to define a wobj using x1, x2 and z1 or the only solution is to calibrate it as an X an Y one and after all rotate it using OrientZYX rapid instruction?

Thanks a lot
Leo


Comments

  • Hello,
     

    There is no method on the FlexPendant to calibrate with Z and X, so your suggestion is probably the best way to do it.    Out of curiosity,  what are you trying to do where you can't point out the Y-axis?

     

    Kind Regards,

     

      Steve

     

  • Hi Steve.
    Thanks for you reply.

    In fact, the solution I adopted is slightly different from that one I first
    suggested. Maybe if I explain my problem you will figure out why.

    Here I have an NDT inspection cell assembled with 2 robots and 2 external axis.
    The robots are placed one in front of the other and the external axis perform
    translation and rotation of the inspected part in between the robots.

    To help me defining the inspection pattern I use Mastercam and Robotmaster
    applications. Theese softwares need the part to be positioned in what is called
    "top" view, that is Z axis pointing to the tool main direction. For
    most of open shell parts, there is absolutly no problem in that.

    The part I'm working with now is a cylinder and for convenience of monipulation,
    I attached it to the rotary axis. In the CAM
    software I need to define thw coordinate system as Z pointing to the radius,
    wich is the main tool path. X and Y are defined in the center of the cylinder
    and of the external axis, so it can rotate about the external axis without
    misalignment. Thus, the final coordinate system would be oriented as the
    baseframe of the robot.



    So, there is the problem. To define X and Y axis on the cylinder shell it wold
    be better if I had a solid phisical point to use as reference. It is ok to
    define X1 and X2 marking the diameter of the cylinder, but Y would be
    "floating" in the air, because there is no reference point for the
    center.

    As you confirmed, my solution was to rotate the wobj defined, but it could not
    be done simply by using OrientZYX, because as the part is attached to the
    trail, it is a coordinated wobj subordinated to the external axis baseframe. Above
    there are the code lines I used to perform the rotation correctly:



    !Coordinated wobj defined by the flex pendant

    TASK PERS wobjdata
    wCilindro:=[FALSE,FALSE,"M8DM1",[[1440,2400,485],[1,0,0,0]],[[18.1519,-168.862,-594.504],[0.69516,-0.023002,0.718019,-0.0259393]]];



    ! dynamic wobj to be used in the isnpection routine

        PERS wobjdata wOrgR1:=[FALSE,FALSE,"M8DM1",[[1440,2400,485],[1,0,0,0]],[[18.1519,-168.862,-594.504],[0.705121,-0.0359002,-0.0130411,-0.708058]]];



    !Rotation angles

        VAR num Rx;

        VAR num Ry;

        VAR num Rz;



    ! Transformation pose used to move from une coord system to other

        PERS pose wtransf := [[0,0,0],[0.5, 0.5, -0.5, -0.5]];



    ! Loads the robot defined cylinder wobj

        wOrgR1 := wCilindro;



    ! Loads original axis orientations

        Rz := EulerZYX(, wCilindro.oframe.rot);

        Ry := EulerZYX(Y, wCilindro.oframe.rot);

        Rx := EulerZYX(X, wCilindro.oframe.rot);



    ! Final orientation = Baserfrmae R1 + WobjRot + ExtAxisRot

    ! New orientation parameter according to the original wobj

        Rz := -90;

        Ry := 0;

        Rx := 90;



    ! Calculates the transformation that would lead to the desired orientation

        wtransf.rot := OrientZYX(Rz, Ry, Rx);



    ! Calculates the direct transformation from base frame to the new orientation,
    bypassing the original wobj.

    ! Sets the new orientation to the wobj to be used.

        wOrgR1.oframe := PoseMult(wOrgR1.oframe, wtransf);




    So, that was my solution. If somebody has an easier one, all tips are welcome!! :)



    Best regards

    Leo

    image





    leonardolt2012-09-04 15:16:16
  • Do you know the euler angle between the X axis of world zone and the x axis of the work object you need,?  we can calculate the Orientation, quaternions to define the work object
     

  •  Hello, Nata-lia! Thaks for your reply.

     I don't know that angle because it changes slightly accorging to the part mounting. As the system is coordinated there are two base transformations to get from The world base frame to the parte wobj.
     I can get the wobj rotation angles using EulerZYX function and then rotate it using OrientZYX. In fact that was the first thing I did, but those angles are refered at the external axis baseframe, and so the transfomation is not that simple. The procedure I've described before is working pretty well up to now.

    Thank you again
    Best regards,
    Leo


  • Thats great, was just my two cents :)