RobotStudio event

targets on workobject and quaternions space

k_schmid
k_schmid
edited April 2020 in RAPID Programming
hi,
I am failing to understand what the rotation targets on workobject mean?
Docs say  "The orientation is specified in relation to the current object coordinate system including
program displacement." Can i query that space somehow?
What does that mean for a rotating positioner?
Can i query the space somehow?
TASK PERS wobjdata Workobject_1:=[FALSE,FALSE,"PartMoverSim",[[0,0,0],[1,0,0,0]],[[0,0,0],[1,0,0,0]]];

I seem to not follow the second quaternion example in the docs either




Comments

  • For a rotating positioner the user frame of the workobject follows the rotation of the positioner (so any definition in the user frame fields are overwritten by the system).
    As the object frame sits on top of the user frame it also rotates with the positioner but you can have linear and rotational displacements from the user frame defined here - they will not be over-written by the system.
  • Thanks so much . Can i query the parent frame somehow? Or visualize the axes?
  • Just to clarify the parent frame is the user frame then?
  • graemepaulin
    edited April 2020
    Yes the parent frame is the user frame (it ultimately is related back to the base frame of the robot).
    If by Query you mean obtain the value in RAPID then yes you can for both frames:
    user frame
    num_variable:=wobjTest.uframe.trans.x; (x,y,or z)
    num_variable:=wobjTest.uframe.rot.q1;  (q1,q2,q3,or q4)
    object frame
    num_variable:=wobjTest.oframe.trans.x;
    num_variable:=wobjTest.oframe.rot.q1;
  • k_schmid
    k_schmid
    edited April 2020
    So in my workobject neither oframe nor uframe is rotated still targets orient different from wobj0.
    I am surprised. Is there any more magic?
    2 axis Positoner holds the workobject

        num_variable_orx :=EulerZYX(\X, Workobject_1.oframe.rot);
        num_variable_ory :=EulerZYX(\y, Workobject_1.oframe.rot);
        num_variable_orz :=EulerZYX(\z, Workobject_1.oframe.rot);
       
        num_variable_urx :=EulerZYX(\X, Workobject_1.uframe.rot);
        num_variable_ury :=EulerZYX(\y, Workobject_1.uframe.rot);
        num_variable_urz :=EulerZYX(\z, Workobject_1.uframe.rot);

  • Can i query in world space somehow?
  • You might be able to use the PoseMult function to do this?
  • I dont see a rotation in either frames maybe its the axis direction in the positioner?
  • graemepaulin
    edited April 2020
    The axis direction and where the zero angle is of the positioner will be determined by the base frame calibration for the positioner.
  • then it makes more sense
  • So here is a target with a unit quaternion in world space, can i get these gui values (x -180) from code?


  • num_variable:=test_1111_IO.trans.x; (x,y,or z)
    num_variable:=test_1111_IO.rot.q1;  (q1,q2,q3,or q4)
    If you want the Euler angles you will need to use the above Euler function