Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 
    SOLVED

    Axis remapping of IMU (BNO055) for Arduino (C++)

    Axis remapping of IMU (BNO055) for Arduino (C++)

    xeonus
    Member

    Hello community,

    i would like to remap my axis for the given position of my sensor. Now i looked through the datasheet, where it tells my the remap sign and stuff. But i am not sure what kind of code i need to make this happen  in the Arduino IDE. 

    https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bno055-ds000.pdf  (page 27)

    I know i need to be in the CONFIG mode to remap the axis, this i can achieve by:

     bno055_set_operation_mode(OPERATION_MODE_CONFIG);

    Now i am just missing the command for the axis remapping.

    If you know how to do this please let me know 🙂

    Have a good day

    xeonus

     

    11 REPLIES 11

    FAE_CA1
    Community Moderator
    Community Moderator

    Hi,

    Thanks for your inquiry.

    BNO055 has its own x/y/z axes as shown on page 26 of the datasheet. Your device or product also has X/Y/Z axes that you can define. If they match which means +x=+X, +y=+Y, +z=+Z, then you can use the default values in register 0x41 and x42 on page 27 of the datasheet.

    If BNO055 x/y/z axes don't match your device X/Y/Z axes, then you can figure out axis remapping based on the example table on page 27. This means that you can write new values to register 0x41 and 0x42 to do the axis remapping.

    Thanks.

    Hello, thanks for the reply!

    Maybe I am missing or misunderstanding some information, but it is still not clear for me. 
    As you mentioned on page 26 is the default config, which is stated as: (AXIS_REMAO_CONFIG = 0x24) 

    Now i would like to have (page27) position 5 (=P5).

    In the table below is stated: P5 = AXIS_REMAP_CONFIG 0x21  and
    AXIS_REMAP_SIGN 0x01

    Now can I implement that in my Code? 

    is it enough when i just write:

     bno055_set_operation_mode(OPERATION_MODE_CONFIG);
    AXIS_REMAP_CONFIG 0x21;
    AXIS_REMAP_SIGN 0x01;

    This code would be in the Arduino IDE (C++)

    I am not sure how to implement the information of the datasheet.

    Thanks for the effort!

     

    FAE_CA1
    Community Moderator
    Community Moderator

    Hi,

    Yes, after you set BNO055 to CONFIG mode, you just need to write value of 0x21 to register AXIS_REMAP_CONFIG and value of 0x01 to register AXIS_REMAP_SIGN. Then the Euler angle output (pitch/roll/heading) from BNO055 will be with respect to your device's X/Y/Z axes.

    Thanks.

    Hey FAE_CA1, 

    thanks for your advice. I am not sure if  I got it right.

    At the moment I try this code: 
    bno055_set_operation_mode(OPERATION_MODE_CONFIG);
    0x24;
    0x05;

    I tried a few different axis modification, but it does not seem to change anything.

    Do you know what's the reason?

    Thanks alot!

    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