Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    BNO055: Using quaternions to adjust the pitch

    BNO055: Using quaternions to adjust the pitch

    jspear16
    Member

    Hello all. I am using the BNO055 in NDOF mode, gathering the quaternions from the BNO055, and converting them to Euler Angles as shown in the wikipedia article here . We are making a modification to our device to where the orthoganl axes of the BNO055 do not line up with our systems axes, and thus we are trying to make an offset. Below I have attached an image showing the desired change:

    Desired_Axis_Offset_In_Foregrip.png

    In the above image, the black arrows represent the axes that we have remapped the BNO055 to (in accordance with the Datasheet), and the dashed red arrows represent where we want to shift the x-z coordinate plane, with the y axis remaining the same. The outer box is the physical orientation of the BNO055. This is just an offset to the pitch by roughly 30 degrees, however, we cannot just simply add 30 degrees to the final pitch as this will cause 2nd and 3rd order problems that need to then be rectified.

    In an attempt to add an offset without generating the 2nd and 3rd order problems, we are trying to calculate the quaternion version of a 30 degree pitch offset, and use it to rotate the x-z plane. Unfortunately, we have not run into any success, as any adjustments we make to the quaternions reflect erroneous data after it is converted to the Euler Angles.

    If anyone has more experience with quaternions and rotating the axes, help would be greatly appreciated.

    1 REPLY 1

    FAE_CA1
    Community Moderator
    Community Moderator

    Hi,

    Thanks for your inquiry.

    In your case the best solution is to figure out the rotation matrix to convert the raw data of accel, gyro and mag from sensor x/y/z axes (black color) to your device body X/Y/Z axes (red color) and then feed the converted data to 9DoF sensor fusion to get the Euler angles with respect to the body axes. BNO055 is fixed which means that you cannot do the above. So you may do one of the two things:

    (1) Redesign your PCB to make sure BNO055 sensor axes x/y/z are parallel to your device body axes X/Y/Z to keep everything simple.

    (2) Switch to BHI260AP and also make sensors axes be parallel to body axes. BHI260AP is programmable and has SDK for you to do the above data conversion if sensor axes are not parallel to body axes.

    Thanks.

    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