Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    BNO055 pitch direction after startup (fusion mode)

    New Poster

    BNO055 pitch direction after startup (fusion mode)

    Hi all,

    I'm using the BNO055 in fusion mode to detect pan (yaw) and tilt (pitch). Calibration is OK and also loading the calibration results at startup (in config mode) seems to be fine. The pitch readout is from 0 to 65535 and the 0 value is when levelled. That seems to be OK too. 

    However, the direction of the pitch seems to be dependent on the position of the sensor when powering on. As the sensor leans forward at boottime, then pitch direction and range are different as when the sensors leans backwards at boottime. I added 2 images to make clear what exactly happens.

     

    tilt_problem_backwards.jpg

    tilt_problem_forwards.jpg

    It is not 100% reproducable, but this problem makes it difficult(in fact: impossible) to use the BNO055 sensor to read tilt values.

    Any hint? 

     

    5 REPLIES 5
    Highlighted
    Community Moderator
    Community Moderator

    Re: BNO055 pitch direction after startup (fusion mode)

    Hi PragmaLab,

    I see 2 issues in your problem description:
    1- The pitch is a signed value, from -180 to +180.
    2- Euler angles are relative to the mounting orientation of the sensor. If the sensor is mounted to the bottom or top side of the PCB, BNO055 will automatically adjust the output. If the pitch angles are significant (as in your pictures), then the BNO055 can change the reference frame for Euler angle output. Please use the Quaternion output instead, and convert it back to the pitch and yaw values that your application needs. The quaternion output has no discontinuities and uses a fixed reference frame.

    o_o
    Highlighted
    New Poster

    Re: BNO055 pitch direction after startup (fusion mode)

    Thanks very much for your reply.

    Indeed better use quaterion values iso Euler angles in this setup. I read the quaternion values now (w,x,y,z) and convert them back to angles. However, the reference frame (for both pitch and yaw)  still depends on the position of the sensor when powering up. When I look at the raw values (w,x,y,z) they really change when I consider a fixed position. The values depend on the postion the sensor has when it gets powered.

    How come the reference frame depends on the startup position, even when reading/using quaterion values? For yaw the zero point is moved 180 degrees (opposite).

    The yaw range I get is also not the range as specified: yaw is -180 .. 180 at my site, not 0..360

    Thanks again, hoping I get this sensor working as supposed.

    Rob

     

     

    Highlighted
    Community Moderator
    Community Moderator

    Re: BNO055 pitch direction after startup (fusion mode)

    Hi Rob,

    It's a bit difficult to debug without data. Could you create 2 datalogs showing the behavior that you are explaining ?

    I cannot say for sure what is the issue here, but with quaternions there is always 2 different quaternions pairs to describe the same angle. For example, if you rotate 360 degrees, the quaternions will not be the same as when you started, but rotating 720 degrees does.

    o_o
    Highlighted
    New Poster

    Re: BNO055 pitch direction after startup (fusion mode)

    Thanks for staying with me 😉

    I'll try to explain what problem I'm experiencing. To start with, the problem exists when using both Euler angles and Quaternion output.

    I seem so suffer from 2 different orientation frames that result in different signs for pitch and roll and result in a different origin for yaw. I did lots of exeriments and can conclude that there are (only) 2 different orientation frames. Which frame the sensor decides to choose (at startup)  is not clear and seems random. My use case is a followspot, mounted on a treepod (see picture of first post). Pan (yaw) and Tilt (pitch) are the 2 planes I'm interested in, but I observe roll as well.

    1) orientation frame 1: I power my system (including BNO0555) and observe the signs of pitch and roll  when I'm tilting and rolling my spot. Leaning backwards result in negative pitch angles. Leaning forward results in  positive pitch angles. Rolling to the left results in negative roll angles, rolling to the right results in positive roll angles. The zero degrees of my yaw is in front of my spot

    2) orientation frame 2: I power my system (including BNO0555) and again observe the signs of pitch and roll  when I'm tilting and rolling my spot. Leaning backwards result in positive pitch angles. Leaning forward results in  negative pitch angles. Rolling to the left results in positve roll angles, rolling to the right results in negative roll angles. The zero degrees of my yaw is behind my spot

    I have no control wich orientation frame the BNO055 is using, it seems random at startup.It does use abslote orientation since the range is OK and angles are comparable (they change in sign only). I have no clue why the BNO055 changes its reference frame at startup. I went through the datasheet forward and backward, but cannot find any clue. 

    • The sensor is calibrated, all offsets and radius are written to the proper registers at startup
    • Calibration seems fine and reproducable. POST and BIST report no error at startup.
    • I remap the axis at startup since my sensor is mounted in the 'P2' way on my PCB (writing 0x24 and 0x06 for _CONFIG and _SIGN)

    The last action seems to give me an important clue. I mentioned that the signs of the axis differ. That is exactly what I configure in the last step: the sign of the pitch and roll axis. I write this 0x06 value to the proper register and read it back for verification. Verification never fails. But.... writing something different then 0x00 to that register, results in unpredicted behaviour: the signs for pitch and roll seem random, resulting in either orientation frame 1 or 2. If I write 0x00 to this register (or leave the default 0x00 as is), then my orientation frame is always the same at startup and my problem is fixed.

    After many more experiments, I can conclude that writing anything else then 0x00 to the 'AXIS_MAP_SIGN_ADDRESS' (0x42) results in random signing of the pitch and roll axis and it changes the 0 degrees of the yaw plane (180 degrees opposite).

    Am I doing something wrong here? Is this some kind of known bug?

    Thanks!

    kind regards,

    Rob

     

    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