RobotStudio event

Set RsRobtarget Orientation by quaternion


Hi,how can i set the RsRobtarget orientation as a quaternion?I tried with
Quaternion q_t3sx = new Quaternion(0.916670034199826,0.0811690875386569,0.241895443865017,-0.307594248752441);

target.Frame.Matrix.Quaternion.Add(q_t3sx);


but the orientation still remains the default one.

IRB1202011-09-28 19:00:20

Comments

  • Hi there, 
    Maybe IA've misunderstood your question but.

    Is this what you are looking for?

    VAR robtarget pRobtarget := [[............

    pRobtarget.rot.q1 := 0.916670034199826;
    and so on...

  • No, i was referring to the C# API and not to the Rapid Editor.Have you any idea about that?


  • Oh,
     
    Im sorry, I just read the question an not your code...
     
    If it's the PC SDK, my experince is that the functions you have in the rapid editor, You also can reach from the PC SDK.
     
    I haveA'nt used the SDK enough to be absolutely sure...
    And I have no example code but...
     
    In the namespace ABB.Robotics.Controllers.RapidDomain:
    You have the type "Robtarget" and to that a member called "Rot".
     
    I think that this is a similar function to the one in the Rapid editor. 
     
    Maybe itA's worth a try...