RobotStudio event

Read joint values from an addin

Hi, <?:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

I have a question regarding how to read the joint values of a mechanism in Robot Studio from an addin. I use the Mechanism.GetJointValues() method and receive an array of doubles that represent each joint in my mechanism. The problem is that the joint values do not correspond to the joint values in e.g. the "joint Jog" dialog.

For example: in the joint jog dialog the current value of a joint is -203,2 degrees, what I receive in my addin is -3,5467305640914. I probably could create some algorithm for converting between the two if I start comparing the different values (I guess they are comparable), I could for example interpolate between max and min values. But is there any easier/better way of doing this? Why are there different representations of the joint values?

 

Best regard,

Mikael

 

Comments

  • Hi

    I believe the value in your addin is the angle in radians. If you calculate (360/2*Pi)*-3,5467305640914 you will receive your angle in degrees (-203,2).

     

    -Osku

  • Hi,

     

    thanks, that is of course correct!

    -3,5467305640914* (180/Pi) = the angle in degrees.

     

    Thanks!

    BR

    Mikael