From 6be3ceef18937f59eb413a4829c444103c035370 Mon Sep 17 00:00:00 2001 From: Westside Robotics Date: Tue, 22 Nov 2022 12:44:47 -0800 Subject: [PATCH] 11-22-22 update links --- Universal-IMU-Interface.md | 53 +++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/Universal-IMU-Interface.md b/Universal-IMU-Interface.md index f717ab4..2811798 100644 --- a/Universal-IMU-Interface.md +++ b/Universal-IMU-Interface.md @@ -41,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. -[

Return to Top](#introduction)

+ +

[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/Universal-IMU-Interface]]

+ + ## Potential Usage @@ -71,7 +74,7 @@ The FTC SDK can also provide values for **angular velocity**, which is the rate Let's get started! -[

Return to Top](#introduction)

+

[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/Universal-IMU-Interface]]

## Configure IMU @@ -91,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._ -[

Return to Top](#introduction)

+

[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/Universal-IMU-Interface]]

## Axes Definition @@ -115,7 +118,7 @@ _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. -[

Return to Top](#introduction)

+

[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/Universal-IMU-Interface]]

## Physical Hub Mounting @@ -123,7 +126,7 @@ Under SDK 8.1, you can specify the **physical orientation** of the Hub on the ro 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**. -[

Return to Top](#introduction)

+

[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/Universal-IMU-Interface]]

**Orthogonal Mounting** @@ -143,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**. -[

Return to Top](#introduction)

+

[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/Universal-IMU-Interface]]

**Non-Orthogonal Mounting** @@ -157,7 +160,7 @@ Here are some scenarios, ranging from simple to complex: 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. -[

Return to Top](#introduction)

+

[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/Universal-IMU-Interface]]

## IMU Programming @@ -174,7 +177,7 @@ The programming steps include: The following sections cover these topics in order. -[

Return to Top](#introduction)

+

[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/Universal-IMU-Interface]]

## Parameters @@ -184,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]] -[

Return to Top](#introduction)

+

[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/Universal-IMU-Interface]]

### Parameters for Method 1, Orthogonal @@ -209,7 +212,7 @@ IMU.Parameters myIMUparameters; myIMUparameters = new IMU.Parameters(new RevHubOrientationOnRobot(RevHubOrientationOnRobot.LogoFacingDirection.UP, RevHubOrientationOnRobot.UsbFacingDirection.FORWARD)); ``` -[

Return to Top](#introduction)

+

[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/Universal-IMU-Interface]]

### Hub Axes for Setting Parameters @@ -231,7 +234,7 @@ 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._ -[

Return to Top](#introduction)

+

[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/Universal-IMU-Interface]]

### Parameters for Method 2, Angles @@ -273,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._ -[

Return to Top](#introduction)

+

[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/Universal-IMU-Interface]]

### Parameters for Method 3, Quaternion @@ -304,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**. --> -[

Return to Top](#introduction)

+

[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/Universal-IMU-Interface]]

## Initialize IMU @@ -330,7 +333,7 @@ imu.initialize(new IMU.Parameters(new RevHubOrientationOnRobot(RevHubOrientation imu.initialize(myIMUparameters); ``` -[

Return to Top](#introduction)

+

[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/Universal-IMU-Interface]]

## Read IMU Angles - Basic @@ -374,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._ -[

Return to Top](#introduction)

+

[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/Universal-IMU-Interface]]

## Read IMU Angles - Flexible @@ -407,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._ -[

Return to Top](#introduction)

+

[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/Universal-IMU-Interface]]

## Read Angular Velocity @@ -439,7 +442,7 @@ myRobotAngularVelocity.yRotationRate These are also shown in each of the Java **Sample OpModes** listed in a section below. -[

Return to Top](#introduction)

+

[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/Universal-IMU-Interface]]

## Reset Heading @@ -494,7 +497,7 @@ There does seem to be some weirdness with the yaw reset, if both pitch and roll --> -[

Return to Top](#introduction)

+

[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/Universal-IMU-Interface]]

## Sample OpModes @@ -506,15 +509,13 @@ 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) [**[draft link]**](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) [**[draft link]**](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) [**[draft link]**](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. - -[

Return to Top](#introduction)

+

[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/Universal-IMU-Interface]]

## SDK Resources @@ -536,7 +537,7 @@ The new universal IMU classes for SDK 8.1 are: The Javadocs describe other IMU methods and variables not covered in this basic tutorial. -[

Return to Top](#introduction)

+

[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/Universal-IMU-Interface]]

## Summary @@ -554,7 +555,7 @@ Updating to SDK 8.1 is **optional** for POWERPLAY, if you are not planning to us 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. -[

Return to Top](#introduction)

+

[[Return to Top|https://github.com/FIRST-Tech-Challenge/FtcRobotController/wiki/Universal-IMU-Interface]]

Questions, comments and corrections to westsiderobotics@verizon.net