Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    BNO055 : Convertng Heading/Pitch/Roll Angles to Rotation Matrix

    New Poster

    BNO055 : Convertng Heading/Pitch/Roll Angles to Rotation Matrix

    Hello,

    I understand that the Euler Angle outputs for the BNO055 aren't supposed to be used for determining large roll-pitch angle orientation. 

    I'm currently working with a large dataset taken from a previous flight test utilizing a BNO055, one in which the heading is moving through the entire 360 degree range, but the roll and pitch angles are limited to below about 20-30 degrees. This dataset unfortunately does not include the quaternion outputs.

    So my goal here is to use the data I have (accelerometer, gyro, magnetometer, gravity vector, and euler angles) to determine orientation of the body frame relative to the IRF (which I understand to be defined by the i-axis aligned with magnetic north, and the k-axis aligned with the gravity vector (or plumb with earth). 

    However, I cannot seem to find anything in the literature relating the euler angles given to a rotation matrix. I haven't messed with extrinsic rotations, but I have looked at all 12 unique intrinsic rotation sequences, and they do not appear to line up (I test out each by numerically computing the OcB matrix for the each rotation sequence, using the supplied euler angles, and rotating the Body frame (B frame) magnetometer data into the IRF (O frame) using the expression O = OcB*B.) I've also tried using a Matlab-based Madgwick Filter on the raw data to compute the rotation matrix, and have gotten reasonably good results from that, but there are still periods of time when the gravity vector does not rotate onto k axis in the IRF, suggesting a dissagreement between the Madgwick filter and the BNO's internal sensor fusion algorithm. 

    Perhaps I'm doing something wrong with my computations, does anyone have any experience using the BNO055's supplied euler angles to acheive an accurate rotation matrix? If not, does anyone know anything about the sensor fusion algorithm used internal to the BNO055 (Mahoney, Madgwick, Kalman, proprietary)?

    Thanks in advance!

    2 REPLIES 2
    Highlighted
    Community Moderator

    Re: BNO055 : Convertng Heading/Pitch/Roll Angles to Rotation Matrix

    Why not directly use "Quaternion" from BNO055 for your calculation? 

    we are output querternion vector with "w,x,y,z" then you can use matlab to convert to your expected coordination directly

    New Poster

    Re: BNO055 : Convertng Heading/Pitch/Roll Angles to Rotation Matrix

    Thanks for the reply!

    Unfortunately, the dataset I'm working with has already been recorded, and Quaternion data is not present in the dataset. 

    I realize that using quaternion output is the best practice in future datasets, however I am trying to extract orientation from the data that I currently have (Euler Angles). 

    Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist