|
|
|
@ -1,18 +1,23 @@
|
|
|
|
|
|
|
|
|
|
## Introduction
|
|
|
|
|
|
|
|
|
|
<!--
|
|
|
|
|
converted to RTD, published 11/21/22
|
|
|
|
|
http://ftc-docs.firstinspires.org/programming_resources/imu/imu.html
|
|
|
|
|
-->
|
|
|
|
|
|
|
|
|
|
In September 2022, REV Robotics began shipping [**Control Hubs**](https://www.revrobotics.com/rev-31-1595/) with a different internal Inertial Measurement Unit (IMU). An IMU can measure many aspects of device motion; here we focus on **rotation**.
|
|
|
|
|
|
|
|
|
|
The new IMU chip is designated [BHI260AP](https://www.bosch-sensortec.com/products/smart-sensors/bhi260ap/), replacing the old Hub's IMU chip [BNO055](https://www.bosch-sensortec.com/products/smart-sensors/bno055/). Both are from Bosch Sensortec.
|
|
|
|
|
|
|
|
|
|
The new [**FTC SDK**](https://github.com/FIRST-Tech-Challenge/FtcRobotController/releases) **version 8.1** provides a **universal interface** that supports both the BHI260AP and BNO055 IMU. This basic tutorial introduces some new features:
|
|
|
|
|
The new [**FTC SDK**](https://github.com/FIRST-Tech-Challenge/FtcRobotController/releases) **version 8.1.1** provides a **universal interface** that supports both the BHI260AP and BNO055 IMU. This basic tutorial introduces some new features:
|
|
|
|
|
- robot configuration allows selection of IMU type
|
|
|
|
|
- universal classes and methods supporting both IMU types
|
|
|
|
|
- three ways to specify Hub mounting orientation on the robot
|
|
|
|
|
|
|
|
|
|
Teams using the new Control Hub IMU must use the new SDK 8.1.
|
|
|
|
|
Teams using the new Control Hub IMU must use the new SDK 8.1.1.
|
|
|
|
|
|
|
|
|
|
Updating to SDK 8.1 is **optional** for POWERPLAY, if you are not planning to use the new Control Hub IMU.
|
|
|
|
|
Updating to SDK 8.1 or 8.1.1 is **optional** for POWERPLAY, if you are not planning to use the new Control Hub IMU.
|
|
|
|
|
|
|
|
|
|
However **all teams** are encouraged to begin using the universal IMU classes and methods for **new** Blocks and Java code. And, migrating **existing code** would allow you to switch easily (and perhaps urgently) to a new Control Hub during the season.
|
|
|
|
|
|
|
|
|
@ -27,7 +32,7 @@ Each Hub's IMU type is listed there, as of FTC SDK 8.0.
|
|
|
|
|
|
|
|
|
|
_Reminder: REV Expansion Hubs purchased after December 2021 have no internal IMU._
|
|
|
|
|
|
|
|
|
|
Do you have existing OpModes using the old IMU? Your code can run unchanged, using Hubs with the BNO055. The new SDK 8.1 fully supports legacy Blocks and Java code using classes and methods for the BNO055 IMU.
|
|
|
|
|
Do you have existing OpModes using the old IMU? Your code can run unchanged, using Hubs with the BNO055. The new SDK 8.1.1 fully supports legacy Blocks and Java code using classes and methods for the BNO055 IMU.
|
|
|
|
|
|
|
|
|
|
The SDK 8.1 README provides more technical background:
|
|
|
|
|
>Unlike the old `BNO055IMU` interface, which only worked correctly when the REV Hub was mounted flat on your robot, the `IMU` interface allows you to specify the orientation of the REV Hub on your robot. It will account for this, and give you your orientation in a Robot Coordinate System, instead of a special coordinate system for the REV Hub. As a result, your pitch and yaw will be 0 when your *robot* is level, instead of when the REV Hub is level, which will result in much more reliable orientation angle values for most mounting orientations.
|
|
|
|
@ -36,7 +41,10 @@ The SDK 8.1 README provides more technical background:
|
|
|
|
|
|
|
|
|
|
>Because of the new robot-centric coordinate system, the pitch and roll angles returned by the `IMU` interface will be different from the ones returned by the `BNO055IMU` interface. When you are migrating your code, pay careful attention to the documentation.
|
|
|
|
|
|
|
|
|
|
[<p align="right"><i>Return to Top</i>](#introduction)<p>
|
|
|
|
|
|
|
|
|
|
<p align="right"><i>[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/Universal-IMU-Interface]]</i><p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Potential Usage
|
|
|
|
|
|
|
|
|
@ -66,7 +74,7 @@ The FTC SDK can also provide values for **angular velocity**, which is the rate
|
|
|
|
|
|
|
|
|
|
Let's get started!
|
|
|
|
|
|
|
|
|
|
[<p align="right"><i>Return to Top</i>](#introduction)<p>
|
|
|
|
|
<p align="right"><i>[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/Universal-IMU-Interface]]</i><p>
|
|
|
|
|
|
|
|
|
|
## Configure IMU
|
|
|
|
|
|
|
|
|
@ -86,7 +94,7 @@ When done, **save** and **activate** this configuration.
|
|
|
|
|
|
|
|
|
|
_If a Blocks OpMode is open at the computer's programming screen, close and re-open that OpMode to capture this updated configuration. Blocks are provided only for devices in the configuration that's active **upon opening** an OpMode._
|
|
|
|
|
|
|
|
|
|
[<p align="right"><i>Return to Top</i>](#introduction)<p>
|
|
|
|
|
<p align="right"><i>[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/Universal-IMU-Interface]]</i><p>
|
|
|
|
|
|
|
|
|
|
## Axes Definition
|
|
|
|
|
|
|
|
|
@ -110,15 +118,15 @@ _Fun fact: the IMU is located approximately under the word "PROUD", near the low
|
|
|
|
|
|
|
|
|
|
This tutorial will **not** discuss the FTC [Field Coordinate System](https://github.com/FIRST-Tech-Challenge/FtcRobotController/blob/master/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/FTC_FieldCoordinateSystemDefinition.pdf). Your OpModes might relate robot orientation to the overall field or ['global coordinates'](https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/Vuforia-for-Blocks#vuforia-introduction) for navigation, but that's beyond the focus here on using the IMU.
|
|
|
|
|
|
|
|
|
|
[<p align="right"><i>Return to Top</i>](#introduction)<p>
|
|
|
|
|
<p align="right"><i>[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/Universal-IMU-Interface]]</i><p>
|
|
|
|
|
|
|
|
|
|
## Physical Hub Mounting
|
|
|
|
|
|
|
|
|
|
Under SDK 8.1, you can specify the **physical orientation** of the Hub on the robot. This allows you to receive IMU angle values expressed in **robot axes**, useful for understanding and managing the robot's movement.
|
|
|
|
|
Under SDK 8.1.1, you can specify the **physical orientation** of the Hub on the robot. This allows you to receive IMU angle values expressed in **robot axes**, useful for understanding and managing the robot's movement.
|
|
|
|
|
|
|
|
|
|
Before jumping into programming, let's discuss your options for physically mounting the Hub on the robot. In general, the Hub's mounting can be considered **Orthogonal** or **Non-Orthogonal**.
|
|
|
|
|
|
|
|
|
|
[<p align="right"><i>Return to Top</i>](#introduction)<p>
|
|
|
|
|
<p align="right"><i>[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/Universal-IMU-Interface]]</i><p>
|
|
|
|
|
|
|
|
|
|
**Orthogonal Mounting**
|
|
|
|
|
|
|
|
|
@ -138,7 +146,7 @@ Here are some common examples:
|
|
|
|
|
|
|
|
|
|
With six cube faces, and four 90-degree positions on each face, there are **24 possible Orthogonal orientations**.
|
|
|
|
|
|
|
|
|
|
[<p align="right"><i>Return to Top</i>](#introduction)<p>
|
|
|
|
|
<p align="right"><i>[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/Universal-IMU-Interface]]</i><p>
|
|
|
|
|
|
|
|
|
|
**Non-Orthogonal Mounting**
|
|
|
|
|
|
|
|
|
@ -150,13 +158,13 @@ Here are some scenarios, ranging from simple to complex:
|
|
|
|
|
|
|
|
|
|
- The Hub is tilted at multiple angles, with or without in-plane rotation.
|
|
|
|
|
|
|
|
|
|
For any Non-Orthogonal scenarios, SDK 8.1 provides **two ways** to describe the Hub's orientation. See below for the **Angles** method and the **Quaternion** method.
|
|
|
|
|
For any Non-Orthogonal scenarios, SDK 8.1.1 provides **two ways** to describe the Hub's orientation. See below for the **Angles** method and the **Quaternion** method.
|
|
|
|
|
|
|
|
|
|
[<p align="right"><i>Return to Top</i>](#introduction)<p>
|
|
|
|
|
<p align="right"><i>[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/Universal-IMU-Interface]]</i><p>
|
|
|
|
|
|
|
|
|
|
## IMU Programming
|
|
|
|
|
|
|
|
|
|
SDK 8.1 offers new classes and methods that apply **universally** to both types of IMU. Once configured, the IMU type will not affect your programming.
|
|
|
|
|
SDK 8.1.1 offers new classes and methods that apply **universally** to both types of IMU. Once configured, the IMU type will not affect your programming.
|
|
|
|
|
The programming steps include:
|
|
|
|
|
|
|
|
|
|
- set the IMU **parameters**, or use defaults
|
|
|
|
@ -169,7 +177,7 @@ The programming steps include:
|
|
|
|
|
|
|
|
|
|
The following sections cover these topics in order.
|
|
|
|
|
|
|
|
|
|
[<p align="right"><i>Return to Top</i>](#introduction)<p>
|
|
|
|
|
<p align="right"><i>[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/Universal-IMU-Interface]]</i><p>
|
|
|
|
|
|
|
|
|
|
## Parameters
|
|
|
|
|
|
|
|
|
@ -179,7 +187,7 @@ In the FTC Blocks menu, under `Sensors` and `IMU`, see the three methods for spe
|
|
|
|
|
|
|
|
|
|
[[/images/Universal-IMU-Interface/045-Blocks-parameters-toolbox-labels.png]]
|
|
|
|
|
|
|
|
|
|
[<p align="right"><i>Return to Top</i>](#introduction)<p>
|
|
|
|
|
<p align="right"><i>[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/Universal-IMU-Interface]]</i><p>
|
|
|
|
|
|
|
|
|
|
### Parameters for Method 1, Orthogonal
|
|
|
|
|
|
|
|
|
@ -204,7 +212,7 @@ IMU.Parameters myIMUparameters;
|
|
|
|
|
myIMUparameters = new IMU.Parameters(new RevHubOrientationOnRobot(RevHubOrientationOnRobot.LogoFacingDirection.UP, RevHubOrientationOnRobot.UsbFacingDirection.FORWARD));
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
[<p align="right"><i>Return to Top</i>](#introduction)<p>
|
|
|
|
|
<p align="right"><i>[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/Universal-IMU-Interface]]</i><p>
|
|
|
|
|
|
|
|
|
|
### Hub Axes for Setting Parameters
|
|
|
|
|
|
|
|
|
@ -224,9 +232,9 @@ In this starting orientation, the Hub axes are **aligned with** the Robot Coordi
|
|
|
|
|
|
|
|
|
|
Hub rotations also follow the right-hand rule.
|
|
|
|
|
|
|
|
|
|
_The legacy `BNO055IMU` driver used **different Hub axes**: its X axis pointed to the USB port, and Y axis pointed to the left-side motor ports. The new SDK 8.1 universal IMU driver uses the above Hub axes for BNO055 and BHI260AP._
|
|
|
|
|
_The legacy `BNO055IMU` driver used **different Hub axes**: its X axis pointed to the USB port, and Y axis pointed to the left-side motor ports. The new SDK 8.1.1 universal IMU driver uses the above Hub axes for BNO055 and BHI260AP._
|
|
|
|
|
|
|
|
|
|
[<p align="right"><i>Return to Top</i>](#introduction)<p>
|
|
|
|
|
<p align="right"><i>[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/Universal-IMU-Interface]]</i><p>
|
|
|
|
|
|
|
|
|
|
### Parameters for Method 2, Angles
|
|
|
|
|
|
|
|
|
@ -268,7 +276,7 @@ myIMUparameters = new IMU.Parameters(new RevHubOrientationOnRobot(new Orientatio
|
|
|
|
|
|
|
|
|
|
_This example does not use the final Java parameter `acquisitionTime`, here set to 0._
|
|
|
|
|
|
|
|
|
|
[<p align="right"><i>Return to Top</i>](#introduction)<p>
|
|
|
|
|
<p align="right"><i>[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/Universal-IMU-Interface]]</i><p>
|
|
|
|
|
|
|
|
|
|
### Parameters for Method 3, Quaternion
|
|
|
|
|
|
|
|
|
@ -290,7 +298,7 @@ Or, consider a single rotation of +30 degrees about the X axis. Namely, the Hub
|
|
|
|
|
new RevHubOrientationOnRobot(new Quaternion(0.9659258f, 0.258819f, 0.0f, 0.0f, 0));
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
This basic tutorial does not cover the math behind Quaternions, an advanced substitute for Euler Angles described above. The SDK 8.1 IMU interface supports the use of Quaternions, for FTC teams familiar with them.
|
|
|
|
|
This basic tutorial does not cover the math behind Quaternions, an advanced substitute for Euler Angles described above. The SDK 8.1.1 IMU interface supports the use of Quaternions, for FTC teams familiar with them.
|
|
|
|
|
|
|
|
|
|
<!--
|
|
|
|
|
This text does not appear at the published wiki.
|
|
|
|
@ -299,7 +307,7 @@ Here's a Quaternion-related **side note** from the SDK 8.1 README:
|
|
|
|
|
>The `IMU` interface is also suitable for implementation by **third-party vendors for IMUs** that support providing the orientation in the form of a **quaternion**.
|
|
|
|
|
-->
|
|
|
|
|
|
|
|
|
|
[<p align="right"><i>Return to Top</i>](#introduction)<p>
|
|
|
|
|
<p align="right"><i>[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/Universal-IMU-Interface]]</i><p>
|
|
|
|
|
|
|
|
|
|
## Initialize IMU
|
|
|
|
|
|
|
|
|
@ -325,7 +333,7 @@ imu.initialize(new IMU.Parameters(new RevHubOrientationOnRobot(RevHubOrientation
|
|
|
|
|
imu.initialize(myIMUparameters);
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
[<p align="right"><i>Return to Top</i>](#introduction)<p>
|
|
|
|
|
<p align="right"><i>[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/Universal-IMU-Interface]]</i><p>
|
|
|
|
|
|
|
|
|
|
## Read IMU Angles - Basic
|
|
|
|
|
|
|
|
|
@ -369,7 +377,7 @@ Note that the robot's orientation is described here **intrinsically**; the axes
|
|
|
|
|
|
|
|
|
|
_Again, the IMU **output** results are given in the **Robot Coordinate System**, or Robot axes. Only for a non-Orthogonal orientation, **Hub axes** were used temporarily for **input** parameters, describing the Hub's rotation to achieve its mounted orientation._
|
|
|
|
|
|
|
|
|
|
[<p align="right"><i>Return to Top</i>](#introduction)<p>
|
|
|
|
|
<p align="right"><i>[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/Universal-IMU-Interface]]</i><p>
|
|
|
|
|
|
|
|
|
|
## Read IMU Angles - Flexible
|
|
|
|
|
|
|
|
|
@ -402,7 +410,7 @@ myRobotOrientation.thirdAngle
|
|
|
|
|
|
|
|
|
|
_Pay close attention to the selection of **axes order**, which greatly affects the IMU results. If you care mostly about Heading (Yaw), choose an axes order that starts with Z._
|
|
|
|
|
|
|
|
|
|
[<p align="right"><i>Return to Top</i>](#introduction)<p>
|
|
|
|
|
<p align="right"><i>[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/Universal-IMU-Interface]]</i><p>
|
|
|
|
|
|
|
|
|
|
## Read Angular Velocity
|
|
|
|
|
|
|
|
|
@ -434,7 +442,7 @@ myRobotAngularVelocity.yRotationRate
|
|
|
|
|
|
|
|
|
|
These are also shown in each of the Java **Sample OpModes** listed in a section below.
|
|
|
|
|
|
|
|
|
|
[<p align="right"><i>Return to Top</i>](#introduction)<p>
|
|
|
|
|
<p align="right"><i>[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/Universal-IMU-Interface]]</i><p>
|
|
|
|
|
|
|
|
|
|
## Reset Heading
|
|
|
|
|
|
|
|
|
@ -489,11 +497,11 @@ There does seem to be some weirdness with the yaw reset, if both pitch and roll
|
|
|
|
|
|
|
|
|
|
-->
|
|
|
|
|
|
|
|
|
|
[<p align="right"><i>Return to Top</i>](#introduction)<p>
|
|
|
|
|
<p align="right"><i>[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/Universal-IMU-Interface]]</i><p>
|
|
|
|
|
|
|
|
|
|
## Sample OpModes
|
|
|
|
|
|
|
|
|
|
The SDK 8.1 contains Sample OpModes demonstrating the above. In FTC Blocks, a simple example is called `SensorIMU`.
|
|
|
|
|
The SDK 8.1.1 contains Sample OpModes demonstrating the above. In FTC Blocks, a simple example is called `SensorIMU`.
|
|
|
|
|
|
|
|
|
|
<p align="center">[[/images/Universal-IMU-Interface/350-Blocks-IMU-Sample.png]]
|
|
|
|
|
|
|
|
|
@ -501,41 +509,39 @@ Here's an [**image**](https://raw.githubusercontent.com/wiki/FIRST-Tech-Challeng
|
|
|
|
|
|
|
|
|
|
In Java, three Sample OpModes demonstrate the new universal IMU interface:
|
|
|
|
|
|
|
|
|
|
- [**ConceptExploringIMUOrientation.java**](https://github.com/FIRST-Tech-Challenge/FtcRobotController/blob/master/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptExploringIMUOrientation.java) [**<i>[draft link]</i>**](https://github.com/WestsideRobotics/Universal-IMU-Interface/blob/main/Examples/ConceptExploringIMUOrientation.java) provides a tool to experiment with setting your Hub orientation on the robot
|
|
|
|
|
- [**ConceptExploringIMUOrientation.java**](https://github.com/FIRST-Tech-Challenge/FtcRobotController/blob/master/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/ConceptExploringIMUOrientation.java) provides a tool to experiment with setting your Hub orientation on the robot
|
|
|
|
|
|
|
|
|
|
- [**SensorIMUOrthogonal.java**](https://github.com/FIRST-Tech-Challenge/FtcRobotController/blob/master/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SensorIMUOrthogonal.java) [**<i>[draft link]</i>**](https://github.com/WestsideRobotics/Universal-IMU-Interface/blob/main/Examples/SensorIMUOrthogonal.java) shows how to define your Hub orientation on the robot, for simple orthogonal (90 degree) mounting
|
|
|
|
|
- [**SensorIMUOrthogonal.java**](https://github.com/FIRST-Tech-Challenge/FtcRobotController/blob/master/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SensorIMUOrthogonal.java) shows how to define your Hub orientation on the robot, for simple orthogonal (90 degree) mounting
|
|
|
|
|
|
|
|
|
|
- [**SensorIMUNonOrthogonal.java**](https://github.com/FIRST-Tech-Challenge/FtcRobotController/blob/master/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SensorIMUNonOrthogonal.java) [**<i>[draft link]</i>**](https://github.com/WestsideRobotics/Universal-IMU-Interface/blob/main/Examples/SensorIMUNonOrthogonal.java) shows how to define (with the Angles method) your Hub orientation on the robot for a non-orthogonal orientation
|
|
|
|
|
- [**SensorIMUNonOrthogonal.java**](https://github.com/FIRST-Tech-Challenge/FtcRobotController/blob/master/FtcRobotController/src/main/java/org/firstinspires/ftc/robotcontroller/external/samples/SensorIMUNonOrthogonal.java) shows how to define (with the Angles method) your Hub orientation on the robot for a non-orthogonal orientationThese three Java samples include extensive comments describing the IMU interface, consistent with this tutorial. In particular, `SensorIMUNonOrthogonal.java` describes three helpful examples.
|
|
|
|
|
|
|
|
|
|
These three Java samples include extensive comments describing the IMU interface, consistent with this tutorial. In particular, `SensorIMUNonOrthogonal.java` describes three helpful examples.
|
|
|
|
|
|
|
|
|
|
[<p align="right"><i>Return to Top</i>](#introduction)<p>
|
|
|
|
|
<p align="right"><i>[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/Universal-IMU-Interface]]</i><p>
|
|
|
|
|
|
|
|
|
|
## SDK Resources
|
|
|
|
|
|
|
|
|
|
Advanced programmers are invited to browse the FTC [**Javadocs documentation**](https://javadoc.io/doc/org.firstinspires.ftc) (API), particularly in:
|
|
|
|
|
|
|
|
|
|
- `com.qualcomm.robotcore.hardware`
|
|
|
|
|
- [`com.qualcomm.robotcore.hardware`](https://javadoc.io/static/org.firstinspires.ftc/RobotCore/8.1.1/index.html?com/qualcomm/robotcore/hardware/package-summary.html)
|
|
|
|
|
|
|
|
|
|
- `org.firstinspires.ftc.robotcore.external.navigation`
|
|
|
|
|
- [`org.firstinspires.ftc.robotcore.external.navigation`](https://javadoc.io/static/org.firstinspires.ftc/RobotCore/8.1.1/index.html?org/firstinspires/ftc/robotcore/external/navigation/package-summary.html)
|
|
|
|
|
|
|
|
|
|
The new universal IMU classes for SDK 8.1 are:
|
|
|
|
|
The new universal IMU features for SDK 8.1.1 are:
|
|
|
|
|
|
|
|
|
|
- `IMU`
|
|
|
|
|
- [`IMU`](https://javadoc.io/static/org.firstinspires.ftc/RobotCore/8.1.1/index.html?com/qualcomm/robotcore/hardware/IMU.html) (interface)
|
|
|
|
|
|
|
|
|
|
- `ImuOrientationOnRobot`
|
|
|
|
|
- [`ImuOrientationOnRobot`](https://javadoc.io/static/org.firstinspires.ftc/RobotCore/8.1.1/index.html?com/qualcomm/robotcore/hardware/IMU.Parameters.html) (parameter field)
|
|
|
|
|
|
|
|
|
|
- `YawPitchRollAngles`
|
|
|
|
|
- [`YawPitchRollAngles`](https://javadoc.io/static/org.firstinspires.ftc/RobotCore/8.1.1/index.html?org/firstinspires/ftc/robotcore/external/navigation/YawPitchRollAngles.html) (class)
|
|
|
|
|
|
|
|
|
|
- `RevHubOrientationOnRobot`
|
|
|
|
|
- [`RevHubOrientationOnRobot`](https://javadoc.io/static/org.firstinspires.ftc/Hardware/8.1.1/index.html?com/qualcomm/hardware/rev/RevHubOrientationOnRobot.html) (class)
|
|
|
|
|
|
|
|
|
|
The Javadocs describe other IMU methods and variables not covered in this basic tutorial.
|
|
|
|
|
|
|
|
|
|
[<p align="right"><i>Return to Top</i>](#introduction)<p>
|
|
|
|
|
<p align="right"><i>[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/Universal-IMU-Interface]]</i><p>
|
|
|
|
|
|
|
|
|
|
## Summary
|
|
|
|
|
|
|
|
|
|
The FTC SDK 8.1 provides a universal interface that supports both the BHI260AP and BNO055 IMU. This basic tutorial introduced some new features:
|
|
|
|
|
The FTC SDK 8.1.1 provides a universal interface that supports both the BHI260AP and BNO055 IMU. This basic tutorial introduced some new features:
|
|
|
|
|
|
|
|
|
|
- robot configuration allows selection of IMU type
|
|
|
|
|
|
|
|
|
@ -543,13 +549,13 @@ The FTC SDK 8.1 provides a universal interface that supports both the BHI260AP a
|
|
|
|
|
|
|
|
|
|
- new Blocks and Java methods to read data from both IMU types
|
|
|
|
|
|
|
|
|
|
Teams using the new Control Hub IMU must use the new SDK 8.1.
|
|
|
|
|
Teams using the new Control Hub IMU must use the new SDK 8.1.1.
|
|
|
|
|
|
|
|
|
|
Updating to SDK 8.1 is **optional** for POWERPLAY, if you are not planning to use the new Control Hub IMU.
|
|
|
|
|
Updating to SDK 8.1 or 8.1.1 is **optional** for POWERPLAY, if you are not planning to use the new Control Hub IMU.
|
|
|
|
|
|
|
|
|
|
However **all teams** are encouraged to begin using the universal IMU classes and methods for **new** Blocks and Java code, and consider migrating **existing** code.
|
|
|
|
|
|
|
|
|
|
[<p align="right"><i>Return to Top</i>](#introduction)<p>
|
|
|
|
|
<p align="right"><i>[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/Universal-IMU-Interface]]</i><p>
|
|
|
|
|
|
|
|
|
|
<i>Questions, comments and corrections to westsiderobotics@verizon.net</i>
|
|
|
|
|
|