Go to Post "So we have an arm, and the pot on it tells how high we are... ...and then we know how high we want to be... ...and if we're not high enough we go higher." (I have to leave the room, we're all laughing too much.) - demosthenes2k8 [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Spotlight this post!  
Unread 17-02-2016, 05:43
pblankenbaker pblankenbaker is offline
Registered User
FRC #0868
 
Join Date: Feb 2012
Location: Carmel, IN, USA
Posts: 103
pblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of light
Re: BNO055 9DOF Java Class for FRC roboRio

Thanks for pointing out that we should be using IMU mode instead of NDOF mode when using this sensor as a measurement of rotation. I had misinterpreted the data sheet and thought that I needed one of the absolute modes in order to have the sensor accumulate the rotation. I had not realized that this sensor's absolute modes (like NDOF) were referring to tracking the rotation with respect to the earth's magnetic field.

We are using the Adafruit version of the breakout board for the BNO055 sensor (https://www.adafruit.com/products/2472).

If you are interested, we have added a GyroAdapter class to our library that can be used as a WPIlib Gyro implementation. I have added some methods to your BNO055 code to allow for the creation of these gyro instances.

Something along the lines of:

Code:
// New getInstance() that puts sensor in IMU/Euler mode
BNO055 sensor = BNO055.getInstance(I2C.Port.kOnboard);
private Gyro gyrox;
private double turn = 90;

public void initialize() {
   // Create a Gyro where current orientation is treated as 0.0.
   gyrox = sensor.createGyroX();
}

public boolean isFinished() {
   // Done once we are within 3 degrees of desired turn
   return (Math.abs(gyrox.getAngle() - turn) < 3.0);
}
If you have any interest in our modifications, the source can be found at:

https://github.com/frc868/frc868-lib...hounds/sensors

A word of warning about the soure. We are still in the process of testing and have only been working with the x-axis rotation on our robot.

Thanks again for you help.
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 12:04.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi