RobotStudio event

Get actual Euler and Quaternion angles

Hello,

I have a list of targets(Targets 001-127), and I have a TRAP routine set up to constantly update and print out the position (X,Y,Z) of the robot, even while it is in the middle of a move. My question is, can I also update and print out the current Euler and Quaternion Angles, even while the robot is moving? I am updating the status 10 times a second, and I am trying to compare the commanded vs. actual for position and the angles. I got the position part, just not sure what to do about the angles?

Thanks for any help,
SM

Best Answer

Answers

  • jsph
    jsph
    edited June 2016
    Yes, you can use the RAPID function CRobT, which "returns a  robtarget value with position (x, y, z), orientation (q1 ... q4), robot axes configuration, and external axes position." It would then be straightforward to convert the orientations into Euler angles, if required.
  • SteveMob
    SteveMob
    edited June 2016
    jsph,

    Thank you for your reply. I am using CRobT just like you said. I am trying to send the data as a string to LabVIEW via sockets. I get an error saying that the string is too long. How can I break the data into multiple strings, 1 string for position, 1 string for quaternions, etc.?

    Also, how can I parse the Quaternion angles and then convert to Euler angles?

    Thanks for the help!
    SM
    Post edited by SteveMob on
  • Or is there a way to eliminate some of the values from CRobT, such as the External Axes values or Axis Configurations? That would shorten the string.

    Thanks,
    SM