RobotStudio event

rotation about an axis

Options
Hi...
I am new to rapid..so i m doing very basic programming right now.
what i want to do is..go to robtarget A with trivial orientation (no orientation)
then go to robtarget B (which has some orientation)
So now imagine the joint 6 of manipulator is not horizontal but at some angle..
So now what i want to do is..give some rotation around the z axis of the wrist coordinate....
How do i do that...
(Think about it as, i just want to jog joint 6...in that orientated position)
Sorry to post under this forum..i actually posted another thread under robotware..but didnt got any reply...so trying out my luck here..
Any sort of help wil be highly appreciated.
Thanks..:)

Comments

  • Kevin
    Kevin ✭✭
    Options
    Hi Martini,

    I think this should work:
    [CODE]VAR jointtarget JointTarget;
    !get current joint positions ...
    JointTarget := CJointT();
    !set axis 6 to +30 degrees ...
    JointTarget.robax.rax_6 := 30;
    !move axis 6 to 30 degrees ...
    MoveAbsJ JointTarget, v1000, Fine, Tool0WObj:=wobj0;[/CODE]

    Regards,

    Kevin


  • martini
    Options
    Hi.. Thanks for replying..
    Hmm. Doing this, i realised the requirements of my program is bit different.
    What i want to do is...

    i go to robtarget A..and then to robtarget B...with some orientation.

    Then i want to rotate about an axis which is (lets say) perpendicular to the both z axis of robtarget A and B axis.

    So.. imagine... now... just z axis.. for A position..it is pointing downwards..(trivial z)

    then for B..the z axis makes some angle with the old z axis..

    now... i want to give  a rotation about an axis which is both perpendicular to z axis of A and z axis of B...

    How do i do this..

    Please help me in this... I have been stuckk in this problem for like a week...

    Thanks
  • mattdavis
    Options
    I think you might want to look at the reltool command. But I dont really understand what your trying to do.

    You either need to specify the new position you want as a position and orientation in the world (or workobject) coordinate system or as and offset of the current tool position in the tool coordinate system.


  • martini
    Options
    Hi.. 
     i will try to be clear of waht i am trying to do..For all description please just imagine z axis of the coordinate system...
    So.. imagine a pose A.. which has no orientation..so in this zA is vertical down..
    now i go to a pose B where zb make some angle with zA (theta).. this angle is mainly because now i have some quaternion orientation...which normally happnes right..
    So..but focus on just z axis..
    so za makes an angle thetha with zb...
    now.. basically.. i want it to give a rotation phi...in an axis which is perpendicular both to za and zb..
    so essentially the cross product...of za*zb...
    Now problems i am facing is..
    how to get an axis perpendicular to both za and zb..
    i am having hard time defining vectors in rapid..as rapid seems to handle positions and orientations..but not vectors.
    again i am just a beginner..so maybe i dont know..
    any sort of help will be appreciated..
    :)
    Please... let me know how to proceed..
  • mattdavis
    Options
    vectors are represented in rapid as pos data ie

    VAR pos vector1;

    vector1 := [x,y,z];

    there are some vector maths function in rapid like dotProd

    hopefully that will enable you to do what you want.
  • martini
    Options
    yeah... but pos essentially gives me the position vector (instead of a directional vector)..
    so its more like a vector pointing towards the point [x,y,z]...
    whereas what i want is that x,y,z represents the directional properties ..of form... xi + yj + zk...
    and yeah.. dot product is there.. but its a scalar product...and there is no cross product..
    for some reason... abb developers have tried to avoid vectors altogether..
    what i have done is.. created a transformation which is of type pos.. but that transoformation takes my coordinate to the position where the x,y,z positions are essentially the vector i need..
    and then.. i have the angle rotation... so i have axis...and i have the rotation angle...so from axis angle definition i should be able to generate the required quaternion.. 
    that was my approach to resolve it...but somehow..its not working in the way i want to..
    it is reaching that particular orientation... but the way it reaches is... unexpected..
    so i am guessing that there is a flaw in my approach.. and since now i am biased towards this appraoch..i need some fresh ideas desperately..
  • mattdavis
    Options
    if its reach the correct position/orientation then your maths is correct. 

    Movement on the way there is controlled by either using movl or movj, movc, or adding some intermediate points is another solution if you can't get the path you want with the other moves

  • hmilton
    Options
    Cross product is available in Rapid.

    The "*" operator returns the cross product when both arguments are vectors:

     

        CONST pos vectorA:=[1,2,3];

        CONST pos vectorB:=[4,5,6];

        VAR pos vectorC;

     

            vectorC:=vectorA*vectorB;

     

    vectorC will then be [-3,6,-3]

     


  • I think you might want to look at the reltool command. I hopefully that will enable you to do what you want.
    ______________________
    Calling cards Switch
    online games





    minhduybk092010-07-13 16:15:09