Pigeon2 User's Guide
Pigeon2 User's Guide
Pigeon 2.0
User’s Guide
Revision 1.2
www.ctr-electronics.com
Table of Contents
1. Device description .....................................................................................................................................................5
1.1. Kit Contents ........................................................................................................................................................5
1.2. Features ..............................................................................................................................................................6
1.3. Electrical/Inertial Specifications .........................................................................................................................7
1.4. General/Mechanical Specifications ....................................................................................................................7
1.5. LED States ...........................................................................................................................................................8
1.6. Functional Diagram ............................................................................................................................................9
1.6.1. Mount Orientated Signals ...........................................................................................................................9
1.6.2. Enclosure Orientated Signals ......................................................................................................................9
1.7. Changes between Pigeon 1 and Pigeon 2 ........................................................................................................10
2. IMU Error Sources....................................................................................................................................................11
2.1. Location – Center of Rotation ..........................................................................................................................11
2.2. Temperature ....................................................................................................................................................11
2.3. Gyroscope Sensitivity Error ..............................................................................................................................12
2.4. Avoid Magnetic/Ferromagnetic materials .......................................................................................................13
2.5. Vibration ...........................................................................................................................................................14
2.6. Saturated inputs ...............................................................................................................................................14
3. Calibration ...............................................................................................................................................................15
3.1. Temperature Calibration ..................................................................................................................................15
3.2. Gyroscope Bias Calibration...............................................................................................................................15
3.3. Gyroscope Sensitivity Calibration .....................................................................................................................15
3.4. Accelerometer Calibration ...............................................................................................................................15
3.5. Compass Calibration .........................................................................................................................................15
4. Boot behavior ..........................................................................................................................................................16
4.1. Boot behavior - Test Results ........................................................................................................................17
5. Wiring ......................................................................................................................................................................19
6. Orientation Convention ...........................................................................................................................................20
6.1. World Frame Reference .............................................................................................................................20
6.2. Euler Angles ................................................................................................................................................20
6.3. Gimble Lock ................................................................................................................................................20
6.4. Does X/Y Axis placement matter? ..............................................................................................................21
6.5. Default Mounting Orientation ...................................................................................................................21
6.6. Custom Mounting Orientation ...................................................................................................................21
6.6.1. Custom Mounting Orientation – Explicit Values ...............................................................................22
6.6.2. Custom Mounting Orientation – Phoenix Tuner ...............................................................................23
7. FAQ ..........................................................................................................................................................................24
It is our intention to provide our valued customers with the best documentation possible to
ensure successful use of your CTRE products. To this end, we will continue to improve our
publications, examples, and support to better suit your needs.
If you have any questions or comments regarding this document, or any CTRE product, please
contact [email protected]
1. Device description
The Pigeon 2.0 is an inertial measurement unit (IMU) that can sense acceleration, angular velocity, and magnetic
fields. With this information, Pigeon 2.0 can be used to sense a mobile platform’s pose, which then can be used for
a variety of applications.
1.2. Features
• Nine Degrees of Freedom (3 Axis Accelerometer, 3 Axis Gyroscope, 3 Axis Magnetometer)
• Full AHRS: Yaw, Pitch, Roll
• Quaternion Output
• Gravity Vector Output
• Boot-up does not require stillness. Get useful heading information as soon as it is powered on.
• Kalman Filter fusion algorithm
• Gyro automatically re-biases after 4 seconds of no-motion
• Temperature Compensation for temperature sensitive components
• Temperature factory-calibrated
• Accelerometer factory-calibrated
• Gyroscope factory-calibrated
• No user-calibration required for accurate 6-axis fusion.
• Mount IMU in any orientation (not limited to horizontal or vertical orientation) (Note 1,2)
• Heading and Yaw are continuous, ideal for robot heading servos and motion control.
• Enclosure protects against debris
• Wide Input Voltage Range 6V – 28V
• Protection Reverse Input Power Protection
• Polycarbonate housing prevents debris from entering inside device
• One wire lead-pair for power
• Two wire lead-pairs for CAN Bus (3-pin connector, one male, one female) for daisy chaining devices
• Robust bootloader and reliable field-upgrade (no physical button required, no “stuck states” that
requires user intervention)
• Wirelessly check, configure and field-upgrade using roboRIO Wi-Fi and Phoenix Tuner.
• Users can download software API binaries on our reliable Maven server (99.9% reliability)
• Hardware Simulation Support
• Supports CAN bus and CAN FD bus.
• Supported by CANivore and roboRIO use case
Note 1: Pigeon 2.0 can be configured for any mounting orientation. Other IMUs provide a fixed number of orientations, but
Phoenix Tuner/ Phoenix API can be used to select any orientation.
Note 2: When using Euler angles, user must avoid Gimble Lock conditions for valid Yaw, Pitch, Roll values. This is a limitation of
expressing pose using Euler angles, and not a limitation of the Pigeon IMU.
Yellow/Green Only one LED will blink this Device is in bootloader, most likely because field-
pattern. upgrade failed in middle of event.
Red Blink Check CAN Bus health and connection to the Pigeon
2.0.
Yellow Alternate Blinking (Note 1) CAN bus detected.
Robot controller is not present on CAN bus, or Pigeon2
software object not created in user application.
Yellow Simultaneous Blinking (Note 2) CAN bus detected.
Robot is disabled.
Green Blink CAN bus detected.
Robot is enabled.
Note 1: Only one LED is on at any given moment.
Note 2: Both LEDs are on at the same time.
User
Requirements Temperature None for best performance.
(Indoor 6-axis Calibration for best
applications) performance. Select Mount Orientation if using non-default orientation.
Note 1: Both Pigeon 1 and Pigeon 2 use a right-handed orientation, and Pigeon 2 defaults to Z-axis up (similar to Pigeon 1). However, Pigeon
2 uses an X forward orientation to better match the academic research papers used in the development of the product.
Below is information and instructions for how to root-cause each error source using features of Pigeon 2.0
Alternatively, the accumulated gyro Z value can be printed/plotted while performing a sustained high-speed
rotation. If the accumulated gyro Z value is more correct than the Yaw, it sufficiently confirms the root cause.
Procedure:
1. First drive the robot to immoveable flat obstacle. A wall works best against the robot’s flattest surface
2. Zero the yaw and accumulated gyro Z
3. Drive the robot in a zero turn at max speed for ~30 seconds
4. Drive the robot in the opposite direction at max speed until it approaches 0 heading.
5. Drive back up against the obstacle and read Yaw and accumulated gyro Z.
6. If root-cause is confirmed, move IMU closer to COR and repeat procedure.
2.2. Temperature
IMUs (in general) also drift due to subtle changes in temperature. This is primarily due to the temperature’s impact
on the zero-bias for the gyroscope. However, it can also affect accelerometer and magnetometer. One strategy to
reduce this is to continually re-bias the gyroscope whenever a no-motion event is detected (Pigeon 2.0 does this
along with other market IMUs). This combined with an environment where temperature does not change rapidly
can be adequate depending on the application.
Another strategy is on-the-fly compensation for changes in temperature. Pigeon 2.0 supports this as well and
comes out of the box with a temperature calibration. If the temperature calibration is called into question, the
user can disable it through a configuration parameter.
Pigeon 2.0 gyroscope sensitivities are factory calibrated. However different applications may require end-user to
provide additional trimming. The procedure below can be used to measure and trim the sensitivity error
correction.
Next place the mechanical compass in the location where the IMU is meant to be placed. While the robot is
placed on blocks, drive all motors, chains, and articulators while watching the compass. If the compass needle
reacts to robot actuation, then IMU should be relocated, or simply avoid relying on compass features if the
application will allow it.
Phone compass applications (software) can be used to a lesser degree; however, a mechanical compass is best,
and are widely available for <$5.
Another means of confirming this source of error is to print/plot the compass magnitude as reported by the IMU
while moving the robot into various poses. This can be compared with the expected magnetic field strength which
can be determined with a Phone compass application, or with an online search such as…
http://www.ngdc.noaa.gov/geomag-web/
Any massive dip or rise in the magnetic norm may indicate magnetic disturbance.
However, it should be noted that there can be magnetic disturbance despite the norm not changing by much. For
this reason, the mechanical compass testing above is recommended.
2.5. Vibration
Vibration of an IMU can cause errors by contributing noise to the accelerometer, gyro, and magnetometer.
Additionally, if the vibration is severe enough, a sensor input may see a saturated value. A common example of
this is vibration in the airframe of a UAV/drone (for example, and unbiased propeller).
3. Calibration
3.1. Temperature Calibration
Pigeon 2.0 is factory temperature calibrated. Additional user calibration is not necessary.
Additionally, the gyroscope’s bias calibration is automatically adjusted by firmware during runtime.
If sensitivity error correction needs to be trimmed, calculate how many degrees your test rotation
overshot/undershot the expected result per rotation. Then configure the device with the overshot/undershot per-
rotation value.
Note that sensitivity error is positive if measurement overshot or produced a magnitude above expected value.
Similarly, sensitivity error is negative if measurement undershot or produced a magnitude below expected value.
Example below:
Compass can then be enabled via software configuration. Note that the 9-axis compass is recommend for outdoor
robotics applications where stray magnetic fields caused by the environment are minimized.
We recommend leaving the compass disabled for indoor robotics applications as this means customers can use
the Pigeon 2 as is, with no supplemental calibration procedures.
4. Boot behavior
Most IMUs requires no-motion during boot-up to tare the gyroscope, thereby reducing yaw drift. This includes the
original Pigeon IMU (version 1.0), and several competitor IMUs.
Pigeon 2.0, however, does not require no-motion during boot-up. This is because Pigeon 2.0 can predict the
gyroscope bias during boot-up. This allows it to produce reasonable heading information immediately on boot,
even when in motion.
For more information on the drift rates in various configurations, see Section 1.3. Electrical Specifications.
All three IMUs were mounted on a fixture that vibrates at approximately 7 Hz. IMUs were all power booted during
vibration and drift was tracked over time. The ongoing vibration prevents all three IMUs from performing no-
motion calibration.
Note 1: Pigeon 1.0 User’s Guide clearly states that IMU requires no-motion on bootup. We do not recommend deviating from
the product documentation during use. The gyro bias prediction is only a feature with Pigeon 2.0
Note 2: Competitor IMU Documentation clearly states that IMU requires no-motion on bootup. We do not recommend deviating
from the product documentation during use.
Legend
Note 1: Source of vibration is in the Y and Z axis, therefore X-
axis measurements are reduced in comparison. ax Pigeon 2 Accelerometer: X Axis
ay Pigeon 2 Accelerometer: Y Axis
az Pigeon 2 Accelerometer: Z Axis
X axis 0.5 seconds per gradient
Y axis 2.5 mg per gradient
5. Wiring
Pigeon 2.0 comes with wires pre-installed on it. The leads should be wired following the table below.
Color Signal
Red Vdd
Black Ground
Yellow (Note 1, 2) CANH
Green (Note 1, 2) CANL
Note 1: The two yellow wires are electrically common.
Note 2: The two green wires are electrically common.
6. Orientation Convention
When the Pigeon is using the Default Mount Orientation, these axes match
the XYZ logo on the enclosure.
• First calculate Yaw by rotating about +Z in the world frame reference. (Turning to the left is positive).
• From this new body frame, calculate Pitch about the IMU’s local reference Y’ (Pitching nose down is positive,
diagram demonstrates a negative pitch).
• Calculate a final Roll about the IMU’s local reference X’’.
Note that because Yaw is calculated first, it is done so in the world frame
reference (defined by gravity). Because of this, Yaw is defined as travel
about the plane orthogonal to gravity. Therefore, the Pigeon 2.0 does not
require being aligned to gravity for reliable Yaw.
At this location the tip of the airplane would be aligned with World Frame
Reference Z Axis. At this point Roll and Yaw cannot be distinguished from each other. As a result, the Euler
Angles are not reliable near this orientation.
For applications that require 360 degrees of vertical travel, it is strongly recommended to use Roll instead of
Pitch. Roll allows for complete 360 rotation with no risk of ambiguity. This is because Roll is the final calculated
angle and cannot introduce ambiguity if Pitch is sufficiently away from Gimble Lock.
Note that Gimble Lock is a limitation of using Euler Angles. In other words, there is always a location that
produces this erroneous condition. More advanced applications may avoid this by using:
- Gravity Vector
- Quaternion – which can provide the Line of Rotation (LOR), and amount of rotation over LOR
- Combinations of the above with or without Euler Angles
But for relatively simple applications (ground vehicle, single axis arms, etc.), simply choosing an IMU orientation
that will not encounter Gimble Lock is sufficient.
If deploying multiple platforms, the best strategy is to be consistent with the mounting orientation across the
entire fleet of vehicles, or individually tune configuration so Yaw, Pitch, Roll behave the same on each vehicle.
If the orientation ensures enclosure X axis is not near parallel to gravity, then the default Mount Orientation
settings are acceptable. This includes common orientations where the Pigeon 2.0 is Z-up, Z-down, Y-up, and Y-
down.
Alterative orientations that risk enclosure X axis reaching near parallel to gravity should use a Custom Mounting
Orientation configuration to avoid Gimble Lock.
This is important if the mounted orientation of the Pigeon risks placing the IMU into Gimble Lock. In fact, this
method essentially moves where Gimble Lock occurs, ideally to a position your mechanism will never reach.
Custom mount orientation may also be used to effectively zero Pitch and Roll. This can be useful for balance
applications (arm for example).
If the Mount Orientation Configuration Values (Yaw, Pitch, Roll) are set to (0 deg, 0 deg, +90 deg) Note (1,2), the
Pigeon 2 will re-orient the Euler Angles (and Gravity Vector / Quaternion) so that Pitch and Roll will report 0 deg.
Additionally, rotation about the top-robot axis will be measured as Yaw (ideal for ground vehicles).
Note 1: The Mount Orientation Angles can be specified with Phoenix Tuner or with Phoenix API.
Note 2: The order of the signals in Tuner may be alphabetically ordered, and not Yaw/Pitch/Roll. Take care when entering values manually.
Note 1: The order of the signals in Tuner may be alphabetically ordered, and not Yaw/Pitch/Roll. Take care when reading values.
7. FAQ
7.1. Is there a way to tell if the device is present/powered?
To determine visually if the device is powered and functioning, check the built-in LED, see Section 1.5.
7.3. What changes do I need to make when upgrading from Pigeon (1) IMU to Pigeon
2.0?
The bottom of the table in Section 1.7 has general software guidance on this.
7.4. What are the requirements of Pigeon 2.0 when booting up?
Pigeon 2.0 has no hard requirements when booting. This means Pigeon 2.0 will start providing useful orientation
information as soon as power is applied to it. For more information on the drift rates of Pigeon 2.0, look at Section
1.3. Electrical Specifications.
In advanced cases, software can be developed to prevent the robot from tipping by monitoring the Gravity Vector.
If the robot is upright, the Z component will contain nearly the entire magnitude of gravity (1.0 g). If the robot is
tipping, the X and Y component will reflect this. Pitch and Roll may also be used for this purpose.
Alternatively using the Gravity Vector may also prove useful as this cleanly provides the individual X, Y, Z
components of the arm orientation, and may be used as a direct feed-forward for closed-loops.
8. Mechanical Drawings
9. Revision History