|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#31
|
|||
|
|||
|
Re: Got Sensor Fusion?
Hello!
I have successfully calibrated the gyro, and am now working to put the code into an actual robot project. Im struggling to get feedback from the sensor. What kind of loop/ delay in the loop should I use in periodic? Thanks. |
|
#32
|
|||
|
|||
|
Re: Got Sensor Fusion?
Try starting with 20 milliseconds.
Did you write your own code to access the gyro data or use the code provided in this thread? |
|
#33
|
|||
|
|||
|
Re: Got Sensor Fusion?
The RoboBees Team 836 release version 4 of the BNO055 IMU AHRS, written in LabVIEW.
We got some good use from this sensor last season, and learned some things along the way. We saw some wiring reliability issues over the brutal game terrain that may have caused the IMU to fault, so we designed in some sensor redundancy. The approach is included in the demo update. The same terrain violence led us to conclude that the USB port may not be up to all those G-forces, so there’s an optional ability to direct the cal file to be saved/read from the rio internal memory. There are some general feature improvements, extending the range behavior, including value referencing, and alternate I2C addressing, but the significant effort went into mitigation of the issue that the Bosch embedded fusion algorithm has when Roll exceeds 45 degrees (value corruption). Even though we didn’t specifically have a problem with this in operation, we went ahead and corrected for it. Quaternions can now be read and converted to Euler Angles to avoid the issue. Quaternion conversion vi’s were not available so they were also developed (see this release). The Read-Me is updated and within the zip file. Change Summary: • Updated web link to latest BNO055 datasheet, document revision 1.4 • Mitigated Bosch algorithm issue that corrupts Euler orientation values under steep second rotation angles (see this). Used “ZYX” as rotation order to decode quaternions, using a new Quaternion to Euler vi developed for this purpose. • Modified IMUOrientRead to include Wrap2Wind vi for converting IMU Pitch and Roll output from the 'wrap' behavior of modular math, to a 'wind' behavior of linear math, allowing the respective indication to count above 180 or 360 degrees and below -180 or 0 degrees, (depending on the range restriction). The Wrap2Wind algorithm detects and removes the orientation discontinuity (at -180/180 or 0/360) on the fly. It will likely work reliably at over 1000 deg/sec rotation rates, when IMUOrientRead is iterated at 20ms. Both the wrap and wind outputs are now available for Yaw, Pitch, and Roll. • Added Yaw/Pitch/Roll referencing, which can be used to offset indications by discrete values. This can be useful in forcing orientation initial conditions and in removing transients when switching between orientation sensors on the fly, as in sensor redundancy / graceful failure designs. • Improved IMU Orient Demo vi to provide a state-machine example of how one can code for sensor redundancy and design for graceful failure. The example monitors a Primary IMU for fault condition (IMU algorithm becomes non-responsive, which can occur at IMU boot-up failures or during loose wiring events), and automatically falls back to an Alternate IMU should fault occur. The transient resulting from merging successive readings from different IMUs is managed using value referencing. Should the Alternate IMU fault, an additional redundant Analog Gyro will seamlessly take over, as an example of double-redundancy. The code for sensor redundancy is initially disabled within the IMU Orient Demo vi, to allow the demo to run without additional sensors until required. Note that employing an Alternate BNO055 IMU requires it to be placed on the other roboRIO I2C bus or configured with an alternate I2C address. • IMUOrientOpen was modified to allow the IMU calibration process to complete when the Operating Mode is set to IMU (which disregards the magnetometer’s contribution to sensor fusion). • Report “Bad Result” to IMU Dev Ref Device Status, which allows any IMU fault (System Error, Self Test, or System Status) to signal that IMU did not initialize correctly. • The number of times the code will auto-reset the IMU upon initialization error has been reduced from 3 to 2, optimizing recovery time. • An input control was added to IMUOrientOpen (Flash?) to enable selection of cal file storage location (False: RIO, True: Flash Drive on RIO USB). The RIO USB interface may not be reliable under significant shock conditions. • An input control was added to IMUOrientOpen (Alt Adr?) to enable designation of the IMU I2C address (False: 0x28, True: 0x29). Note the IMU must be configured electrically for alternate I2C address operation, accomplished by providing 3.3v to the breakout board ADR pin. • The reentrancy property of the IMUOrientOpen, IMUOrientRead, and Wrap2Wind vi’s has been modified to Preallocated Clone Reentrancy, to allow for multiple instances of execution. Good luck to the teams and see you on the field at STEAMworks! The RoboBees |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|