Go to Post So let me get this straight. We'll have 6 hours to re-build an entirely new robot that took us 6 weeks originally to make. - [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

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   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: 102
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
  #2   Spotlight this post!  
Unread 17-02-2016, 15:20
cantdecide cantdecide is offline
Registered User
FRC #5773 (YAFL Mechatronics)
Team Role: Programmer
 
Join Date: Jan 2016
Rookie Year: 2016
Location: Turkey
Posts: 31
cantdecide is an unknown quantity at this point
Re: BNO055 9DOF Java Class for FRC roboRio

Just as a side note, I've ported your library to C++(although a bit amateurishly) and am hoping to release it tomorrow on GitHub. Thanks for your amazing work, you've saved us many hours!
Reply With Quote
Reply


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 10:28.

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