|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
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 |
|
#2
|
|||
|
|||
|
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);
}
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. |
|
#3
|
|||
|
|||
|
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!
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|