Go to Post I pumped my fist to cheer - but since I was a ref at the time it looked like I signaled a red foul... - Tom Ore [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 06-01-2017, 18:17
Richard100 Richard100 is offline
Registered User
FRC #0836 (RoboBees)
Team Role: Mentor
 
Join Date: Nov 2009
Rookie Year: 2008
Location: Southern Maryland
Posts: 79
Richard100 is a splendid one to beholdRichard100 is a splendid one to beholdRichard100 is a splendid one to beholdRichard100 is a splendid one to beholdRichard100 is a splendid one to beholdRichard100 is a splendid one to behold
Got Quaternions?

If you have an IMU or other sensor that produces something called Quaternions, you might want to use them to track the orientation of your robot as it moves in all 3 dimensions. The RoboBees Team 836 is releasing LabVIEW software that converts between quaternions and more conventional Euler Angles (such as Roll, Pitch, and Yaw) since these conversions don’t currently exist in the LabVIEW or WPI libraries.

The three-dimensional spatial orientation of an object can be expressed using quaternions. The quaternion is an extension of complex numbers, from one of the less mainstream branches of mathematics. (The quaternion represents a point on the surface of a four-dimensional hyper-sphere.) You can think of a quaternion as a complex number, which has real and imaginary components, where each of these components is itself a complex number. One could say a quaternion is a hyper-complex number!

Quaternions are useful in avoiding mathematical singularities like gimbal lock and for smoothly interpolating rotations, and quaternion data may be produced by Inertial Measurement Unit (IMU) sensors. Unit quaternions, where the root-sum-square of all elements is one, are always used for rotation applications. Sir William Hamilton is credited with the discovery of quaternions in 1843. They’re used extensively today in computer gaming applications.

The software is attached. There is a Quaternion to Euler conversion vi as well as a Euler to Quaternion conversion vi. There is also a Test vi that allows one to explore the conversion process. Just unzip the file, load the Project File and run QuaternionTest. Bunch of documentation included to understand the process and code.

In addition to the conversion software, I thought I would share a document I received during my research. It tells the story how the Odyssey orbiter maintained real time communication with Curiosity during its dramatic descent to Mars. It has great engineering story elements - equipment failure complicated by manufacturing issues overcome by creative maneuvers to achieve the objective under a hard deadline … (sound familiar?). Hamilton would be amazed, I think, at this application of his research, how mission success depends so critically on ‘the right rotation’!

The document is authored by Noel Hughes, a senior aerospace engineer for Lockheed Martin. It was his algorithm that I referenced to create the quaternion conversion code, which I am thankful for.

A good illustration of where a STEM career can take you. The RoboBees look forward to seeing you on the field of STEAMworks!
Attached Files
File Type: zip Quaternion Conversion.zip (103.7 KB, 3 views)
File Type: pdf AAS paper01_05.pdf (2.78 MB, 10 views)
Reply With Quote
  #2   Spotlight this post!  
Unread 09-01-2017, 08:50
aeastet aeastet is offline
Programming Mentor
AKA: Tim Easterling
FRC #6043 (Allegan Tigers Robotics)
Team Role: Coach
 
Join Date: Jan 2015
Rookie Year: 2011
Location: Holland, MI
Posts: 116
aeastet is an unknown quantity at this point
Re: Got Quaternions?

Hi Richard,

We at Kauai Labs thought the same thing. The navX-MXP and the navX-MICRO both output quaternions. We have also developed a complete library to use these components called the Sensor Fusion Framework (SF2) to correct for video latency. The libraries can be found here. We have a full library of quaternion math functions as well as the convert to yaw, pitch and roll. THe library is written for LabVIEW, Java and C++.

The link on Chief Delphi for complete libraries for navX and SF2 (Sensor Fusion Framework) are available here:

https://www.chiefdelphi.com/forums/s...highlight=NavX

You do not need to use the navX to take advantage of the SF2 libraries. It has been written to take advantage of the navX but can be modified to use other third party sensors.

Tim
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 03:44.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi