From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Get angle with PmodCMPS myRio

Hi, i am trying to get rotation angle of my robot with PmodCMPS. But i have only 3 coords X, Y and Z and don`t know what to do with it. How can i convert this coords to global rotation angle? I am using default example for compass in "Part II - NI myRIO Mechatronics Kit"

0 Kudos
Message 1 of 4
(2,705 Views)

Just for clarification, are you wanting to convert the x, y, and z (Cartesian) coordinates to spherical coordinates? If so, there is a VI that you can use for that:

 

3D Coordinate Conversion VI

http://zone.ni.com/reference/en-XX/help/371361J-01/gmath/3d_coordinate_conversion/

 

It is under Mathematics > Geometry.

Madison T
0 Kudos
Message 2 of 4
(2,663 Views)

I just want to get angle to the global North to create rotation on some value of degrees for my robot. It`s like if I want to rotate on 90 degrees I have to move my motors and getting value from compass while delta of degrees is less then 90. Or maybe you have some better ideas how to rotate my robot? (I think getting value from encoders is not right way because it`s not too accurate if I will change size between wheels)

 

Thank you for your help 

0 Kudos
Message 3 of 4
(2,659 Views)

I actually haven't worked with the PmodCMPS before, so I may need to do a bit more research. In the meantime, have you taken a look at any of these examples?

 

Pmod CMPS

https://reference.digilentinc.com/reference/pmod/pmodcmps/start

Madison T
0 Kudos
Message 4 of 4
(2,646 Views)