Announcement

Collapse
No announcement yet.

Control Hub IMU GYRONLY

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Control Hub IMU GYRONLY

    Hello!

    Trying to leverage the Control Hub IMU functionality in Gyro only mode (a.k.a. NO_FUSION per Bosch BNO055 datasheet). Cannot set registers in Blocks therefore seeking some advice from experts.

    When SensorMode is IMU, the calibration status is reported as s0 g3 a0 m0. In others words, Gyro is calibrated which is confirmed by a subsequent call to isGyroCalibrated. However, when I used SensorMode as GYRONLY, the calibration status is s0 g0 a0 m0 and isGyroCalibrated never returns true (i.e. register never changes to 0011b). If I skip the check as mentioned in the manufacturer's datasheet then all the Euler angles are constant at 0 even though the robot motors are rotating per code. I would like to use the instantaneous value of Heading (i.e. first angle in AxesOrder set to XYZ) to constrain the rotation of the robot.

    I am presently limited to using Blocks and therefore seeking advice on how to use Gyro only with IMU not in the default horizontal flat position. I do not need accelerometer or magnetometer data. Any suggestions? Thanks.

    Kind regards.

  • #2

    The SDK currently defaults to Z-rotation being robot heading, whether the Hub is horizontal or vertical. It can do this because the gravity vector is known.

    Suggest you simply try using firstAngle of ZYX, with no special settings. See if this meets your needs:



    W_vertical_hub_heading.png



    There are other reported issues that may arise with the Hub being vertical, but these might not affect your current goals:

    https://github.com/FIRST-Tech-Challe...ler/issues/251

    https://github.com/FIRST-Tech-Challe...iscussions/277

    Comment

    Working...
    X