Code Monkey home page Code Monkey logo

bno055_frc's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

bno055_frc's Issues

Null Pointer post init

I seem to be having a wired null pointer bouncing around after trying to get the sensor's state in auto for testing purposes. assuming the .getInstance is the correct way to instantiate the object, my code seems fine other than the obvious null pointer. i have put the code in a gist. I am trying to get the BNO working for one of our team's side projects. any help you can give would be greatly appreciated.
Thanks,
Cole
Team 4145
electrical and programming
https://gist.github.com/coalman321/e7923d4dcd3adaf0e875b79ca422cca7

Make code non blocking

Code ported from the adafruit arduino library uses lots of time delays during initialization.

Revise code so that any required time delays occur within a separate thread in the sensor class.

Create example that uses CommandBased robot project

The use of the ItterativeRobot project was just to help make the port from the arduino code easier, once #1 is complete, migrate to CommandBased robot project, as that's what we're going to use in season (as well as what's used by most Java/C++ teams).

Provide mechanism for accumulating rotations

Revise source to keep track of multiple rotations.
For example if the robot spins around twice the current X value should read 720 degrees vs providing the position % 360 as it does now.

Make this a configuration option that can be toggled on/off.

X rotation reference resets

While moving the board sensor around, the X position will reset to 270 degrees. This only appears to happen when there's roll and/or yaw on the board, so it shouldn't affect tracking heading on the field, unless of course the field has bumps that need to be traversed.

Seems like it might be related to fluctuating calibration statuses (see logs below - mag calibration value changes - affecting x posiiton). Relatively repeatable with -Z and and +Y values.

There may be some active re-calibration enabled which is causing a new zero to be established. IF this is the case, look into disabling this in software after initial cal is completed..
Also need to read up on what the calibration values are for and what they should be equal to prior to considering the sensor 'calibrated'.

Sample data:
X: 0359.375 Y: 0000.062 Z: 0000.875 CALIBRATION: Sys=0 Gyro=3 Accel=0 Mag=1
X: 0359.375 Y: 0000.062 Z: 0000.875 CALIBRATION: Sys=0 Gyro=3 Accel=0 Mag=1
X: 0359.375 Y: 0000.062 Z: 0000.875 CALIBRATION: Sys=0 Gyro=3 Accel=0 Mag=1
X: 0359.375 Y: 0000.062 Z: 0000.875 CALIBRATION: Sys=0 Gyro=3 Accel=0 Mag=1
X: 0359.375 Y: 0000.062 Z: 0000.875 CALIBRATION: Sys=0 Gyro=3 Accel=0 Mag=1
X: 0359.375 Y: 0000.062 Z: 0000.875 CALIBRATION: Sys=0 Gyro=3 Accel=0 Mag=1
X: 0359.375 Y: 0000.062 Z: 0000.875 CALIBRATION: Sys=0 Gyro=3 Accel=0 Mag=1
X: 0359.375 Y: 0000.062 Z: 0000.875 CALIBRATION: Sys=0 Gyro=3 Accel=0 Mag=1
X: 0359.375 Y: 0000.062 Z: 0000.750 CALIBRATION: Sys=0 Gyro=3 Accel=0 Mag=1
X: 0359.500 Y: 0000.062 Z: 0000.625 CALIBRATION: Sys=0 Gyro=3 Accel=0 Mag=1
X: 0359.438 Y: -0000.125 Z: -0001.938 CALIBRATION: Sys=0 Gyro=3 Accel=0 Mag=1
X: 0358.062 Y: 0001.812 Z: -0011.312 CALIBRATION: Sys=0 Gyro=3 Accel=0 Mag=1
X: 0359.312 Y: 0004.000 Z: -0024.750 CALIBRATION: Sys=0 Gyro=3 Accel=0 Mag=1
X: 0245.562 Y: 0002.812 Z: -0041.500 CALIBRATION: Sys=0 Gyro=3 Accel=0 Mag=2
X: 0245.000 Y: 0003.250 Z: -0059.062 CALIBRATION: Sys=0 Gyro=3 Accel=0 Mag=2
X: 0243.938 Y: -0003.062 Z: -0000.062 CALIBRATION: Sys=0 Gyro=3 Accel=0 Mag=2
X: 0244.062 Y: 0014.000 Z: -0086.375 CALIBRATION: Sys=0 Gyro=3 Accel=0 Mag=3
X: 0245.375 Y: 0014.438 Z: -0086.875 CALIBRATION: Sys=0 Gyro=3 Accel=0 Mag=3
X: 0246.625 Y: 0013.625 Z: -0077.062 CALIBRATION: Sys=1 Gyro=3 Accel=0 Mag=3
X: 0247.562 Y: 0012.562 Z: -0053.188 CALIBRATION: Sys=0 Gyro=3 Accel=0 Mag=3
X: 0246.375 Y: 0011.938 Z: -0030.750 CALIBRATION: Sys=0 Gyro=3 Accel=0 Mag=3
X: 0243.188 Y: 0012.375 Z: -0012.188 CALIBRATION: Sys=0 Gyro=3 Accel=0 Mag=3
X: 0243.750 Y: 0007.000 Z: -0001.500 CALIBRATION: Sys=0 Gyro=3 Accel=0 Mag=3
X: 0242.875 Y: 0002.438 Z: 0000.000 CALIBRATION: Sys=0 Gyro=3 Accel=0 Mag=3
X: 0243.375 Y: 0000.125 Z: -0000.938 CALIBRATION: Sys=0 Gyro=3 Accel=0 Mag=3
X: 0243.312 Y: 0000.125 Z: 0000.750 CALIBRATION: Sys=0 Gyro=3 Accel=0 Mag=3
X: 0243.312 Y: 0000.125 Z: 0000.750 CALIBRATION: Sys=0 Gyro=3 Accel=0 Mag=3
X: 0243.312 Y: 0000.125 Z: 0000.750 CALIBRATION: Sys=0 Gyro=3 Accel=0 Mag=3

X: +353.438 Y: -000.438 Z: +021.625 CALIBRATION: Sys=0 Gyro=3 Accel=1 Mag=1
X: +353.438 Y: -000.438 Z: +024.250 CALIBRATION: Sys=0 Gyro=3 Accel=1 Mag=1
X: +353.438 Y: -000.438 Z: +026.812 CALIBRATION: Sys=0 Gyro=3 Accel=1 Mag=1
X: +353.438 Y: -000.438 Z: +029.938 CALIBRATION: Sys=0 Gyro=3 Accel=1 Mag=1
X: +353.438 Y: -000.438 Z: +032.125 CALIBRATION: Sys=0 Gyro=3 Accel=1 Mag=1
X: +353.375 Y: -000.438 Z: +034.250 CALIBRATION: Sys=0 Gyro=3 Accel=1 Mag=1
X: +260.062 Y: -000.438 Z: +035.312 CALIBRATION: Sys=0 Gyro=3 Accel=1 Mag=2
X: +259.938 Y: -000.438 Z: +030.812 CALIBRATION: Sys=0 Gyro=3 Accel=1 Mag=2
X: +259.750 Y: -000.438 Z: +023.188 CALIBRATION: Sys=0 Gyro=3 Accel=1 Mag=2
X: +259.625 Y: -000.375 Z: +014.812 CALIBRATION: Sys=0 Gyro=3 Accel=1 Mag=2
X: +259.375 Y: -000.312 Z: +004.000 CALIBRATION: Sys=1 Gyro=3 Accel=1 Mag=2
X: +259.250 Y: -000.250 Z: +001.750 CALIBRATION: Sys=3 Gyro=3 Accel=1 Mag=2

Look into storing device calibration

Read up on storing out the calibration data set, and how to re-load it.

See if this can be stored out to a file and conditionally loaded (if present automatically load?).

See section 3.10.4 (Reuse of Calibration Profile) of the BNO055 manual.

Improve comments on class header

Modify comment to provide usage example.

Explain threaded operation
Explain the comms/init/calibration sequence and statuses
Explain calibration sequence(s) that need to be performed by the user.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.