Orientation

This section goes over the fundamentals of determining the Orientation of a sensor. This may be accomplished by using one or more Inertial Measurement Units(IMUs).

  1. Sensor Calibration
    1. Accelerometer
    2. Magnetometer
    3. Gyroscope
  2. Euler Angles, Coordinate Frames, & Rotation Basics
    1. Euler Angles
    2. Coordinate Frames & Rotations
  3. Quaternion Basics
    1. Quaternion Fundamentals
    2. Quaternion Properties
    3. Quaternion Arithmetic
  4. Quaternion Rotations
    1. Euler-Quaternion Conversions
    2. Quaternion Rotations
  5. Extended Kalman Filter
    1. EKF Algorithm Overview
    2. Defining the System Model
    3. Algorithm Explanation
    4. Error Correction
    5. Implementation

Initial Thoughts

Sometimes it can be difficult to understand exactly what we want to accomplish when designing alogrithms for any process we decide to work on. Something that I’ve found useful when developing robotics type applications is to relate the processes that a robot may perform to how I, or another individual, may perform a process.

Here’s an example of my thought processes as they relate to how a robot relates to the movement of a human from Point A to Point B.

Always ask questions, even if they seem redunant. Asking questions starts your brain’s processes of conceptualizing, deciphering, and decoding information from some external process.

For example,

What is the process that we go through after deciding that we are going to walk from Point A (living room) to Point B (dining room)?

Initially, we orient ourselves in the room either by noticing that we are laying down, sitting on a couch, or doing something else. After we’ve oriented ourselves in the Global environment (Global Frame of Reference), we adjust our bodies (Local Frame of Reference) to complete the task that we’ve initiated, in this context walking to the dining room.

For example, we are initially laying on the couch in the living room and need to go to the dining room. After we’ve initialized our position, that we are laying down, we then have to adjust our position so that we will be able to start the walking operation. This results in us arranging our bodies so that we are in the sititng position, which will then have to be adjusted once more to the standing position. All while this is occuring, our internal orientation processes control our balance and allow us to perform these tasks without falling over.

Let’s say that our internal processes are not calibrated, such that the small crystals contained within our ears are not properly positioned so that when we move our head in a specific manner the crystals dislodge, which then results in the sensation of vertigo, or dizziness. This is not synonymous with an incorrectly calibrated IMU, but it illustrates how improperly functioning sensors can cause undesireable results.

With this in mind, we can deduce that there is an operation taking place in our brains that constantly checks our orientation and notifies us when something undesireable occurs, in this case with the sensation of dizziness. This same operation, when combined with our vision, allows us to infer the direction that we are moving while walking, running, riding a bike, in a car, etc. These bodily operations are some what synonomous with the functioning of an IMU’s Gyroscope and Accelerometer, they provide us with orientation in a Local reference frame.

How are we able to get an absolute position in the Global reference frame?

Let’s say we are driving our car north on the interstate highway. The highway begins to veer to the east which then throws off our initial idea that we are heading north. We now have an incorrect Global reference frame, which may only be able to be updated if we know the position of an external object. This will then allow us to re-orient ourselves in the Global frame, or alternatively we could look at a map and compass. This same issue occurs with algorithms that use the IMU’s Accelerometer and Gyroscope sensors, they are capable of providing us with a local frame of reference, but soon sensor drift and other sources of noise cause our Global reference frame to diverge from reality. Luckily, some IMU’s come with a Magnetometer which we can use to re-orient ourselves with respect to the Earth’s North Magnetic Field. When we combine this with the Earth’s gravity, we are able to deduce a decent estimation of our position with respect to the Global reference frame, just as our vision or a map and compass allows us to re-orient ourselves to the Earth’s global reference frame. Moreover, we can get more accurate results if we add another sensor, such as a GPS unit, to our system. We will discuss this in a later section.