Go to Post The world isn't changed by people playing it safe. - Andrew Y. [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 06-10-2015, 03:32
otherguy's Avatar
otherguy otherguy is offline
sparkE
AKA: James
FRC #2168 (The Aluminum Falcons)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: CT
Posts: 431
otherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to behold
BNO055 9DOF Java Class for FRC roboRio

After seeing someone mention the BNO055 from in this thread, and watching the demos on the Adafruit website. I thought I'd give this little sensor a try. I've done a bunch of bench testing with this sensor, specifically as a gyro replacement (providing relative heading). I have to say I'm really impressed so far.

Out of the box, there is (literally) zero static drift in position and rotation seems repeatable to roughly within +/- 2 degrees. The built in calibration sequence seems quite robust. The sensor doesn't report that it has completed calibration until it's sat statically for a short duration of time. Although prior to reporting that the device is calibration, it does appear that the reported position data is accurate. I've also had a chance to set this sensor up temporarily on a practice chassis and observed similar results.

Since this thing looks promising, I've ported the adafruit arduino code over to Java on the roboRio. I'll be maintaining the code at this github repository. I tested it out quickly tonight and it's communicating with the BNO055 over I2C, calibrating it and can read XYZ coordinate data.

At this point there's probably still bugs in the code. It's only got a few hours of testing on it. There's certainly room for improvement in the comment department. The plan is to clean this up as I continue to test this sensor out.

What's next:
  • Clean up the code
  • Test out the other modes of operation (absolute position)
  • Videos documenting performance coupled to roboRio

If you have any questions about the sensor, the code, or want me to test out something specific before you buy your own, ask here and I'll try to help out the best I can.

If you're interested in checking out the sensor in operation there are some videos I recorded while evaluating the sensor (note these weren't recorded for public consumption so there's some ramblings):
__________________
http://team2168.org
Reply With Quote
  #2   Spotlight this post!  
Unread 21-12-2015, 13:56
otherguy's Avatar
otherguy otherguy is offline
sparkE
AKA: James
FRC #2168 (The Aluminum Falcons)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: CT
Posts: 431
otherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to behold
Re: BNO055 9DOF Java Class for FRC roboRio

FYI: Looks like DigiKey is carrying this adafruit breakout board now.
http://www.digikey.com/product-detai...426-ND/5699182

So you can get this sensor for free through the Virtual KOP Digikey PDV: http://www.firstinspires.org/node/5616
__________________
http://team2168.org
Reply With Quote
  #3   Spotlight this post!  
Unread 13-02-2016, 05:59
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

First off, I wanted to say thanks for posting the I2C code for communicating with the BNO055 sensor. It has made our lives much easier.

We have been using the OPERATION_MODE_NDOF and VECTOR_EULER options when constructing our instance as we are primarily interested in using the sensor's gyro.

We have seen good results most of the time, however it seems like we sometimes observe communication drop outs where we stop getting readings when connected to the roboRIO (or pauses in communications). At the moment we are chalking it up to our temporary breadboard/jumper cable connection.

I would be curious to hear how your experience has been when using the sensor to date and whether you plan to stick with it for this season.
Reply With Quote
  #4   Spotlight this post!  
Unread 16-02-2016, 02:44
otherguy's Avatar
otherguy otherguy is offline
sparkE
AKA: James
FRC #2168 (The Aluminum Falcons)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: CT
Posts: 431
otherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to behold
Sorry for the late reply.

We've had this sensor setup on a few different robots w/ various semipermanent wirings and haven't had issues with communications with the sensor.

I would recommend not using the sensor in NDOF mode (I use IMU mode) unless you actually want absolute heading (relative to the earths mag field). The NDOF mode will be susceptible to magnetic interference from motors, and calibration is more involved in this mode of operation.

Which version BNO055 breakout board are you using? We are primarily using the Atmel board on our bots, but the ad a fruit board was used for preliminary development of the class.

If you want a more prompt response, shoot me an email at james@team2168.org
__________________
http://team2168.org
Reply With Quote
  #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
  #6   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
  #7   Spotlight this post!  
Unread 17-02-2016, 20:09
otherguy's Avatar
otherguy otherguy is offline
sparkE
AKA: James
FRC #2168 (The Aluminum Falcons)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: CT
Posts: 431
otherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to behold
Awesome to hear. Note a lot of the heavy lifting was done by Adafruit, I just extended their efforts.

Also it would be great to have a C++ library publicly available, that would cover the majority of the languages for this sensor (there's a LabVIEW implementation already).

Keep an eye on the repo, as I have code which implements a reset() method, and code to save/load a calibration data set.
__________________
http://team2168.org
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 12:05.

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