How SensorFusion's mode IMUPlus really works?

edited November 24 in Android

Hey all,

I'd like to understand how the IMUPlus mode works. More specifically, it would be great if someone could clarify to me when the relative frame is specified. On calibration or on the configuration of a session?

I use this configuration for the SensorFusion and I keep getting the same relative coordinate system.

sensorFusion.configure()
        .mode(Mode.IMUPlus)
        .accRange(AccRange.AR_16G)
        .gyroRange(GyroRange.GR_2000DPS)
        .commit();

Comments

  • This should help: https://mbientlab.com/androiddocs/latest/sensor_fusion.html#configuration
    The orientation you can infer once you get data as it depends on your setup.

  • edited November 24

    The above code I posted earlier has a mistake, as I use IMUPlus mode. I'm sorry!

    I've already studied this section of the docs. I'll try to make my concern more clear with an example:

    No1 Scenario:
    I have the sensor on the table (the z-axis of the sensor is vertical to the table) and configure the SensorFusion object using Mode.IMUPlus. I don't move the sensor at all and get some quaternion samples (relative to the initial position of the sensor). Then, I stop the sensor using sensorFusion.stop();

    No2 Scenario:
    I have exactly the same setup and process as No1 Scenario, but I just rotate the sensor around the z-axis by 90 degrees before I configure it. Then, I configure it, get some samples and stop it.

    I expect to receive the same quaternion values because the sensor's position was the same as the initial one, shouldn't I?!

    Thank you in advance for your help!

  • edited November 25

    I expect to receive the same quaternion values because the sensor's position was the same as the initial one, shouldn't I?!

    Yes if you use IMU_PLUS. Can you try with NDOF mode? Do you expect to get the same quaternion despite the 90 degrees rotation?

    @Laura I think, what he is asking has nothing to do with calibration. He uses IMU_PLUS not NDOF so there is no absolute orientation.

  • @nekos, thanks you are right.

  • Hi @nekos, thank you for your help!

    The problem is that I don't get the same quaternion values for the No1 and No2 scenarios.

    It seems that they use the same relative coordinate system, which is awkward considering that their initial quaternion was different.

    Do I make a mistake on configuration or did I miss something?

    By using the NDOF mode I have exactly the same behavior. The only difference is that the common absolute coordinate system is rotated by 90 degrees around the z-axis (this is a minor note though). However, this behavior is expected.

    I don't think calibration is the problem here @Laura. The docs lack of a detailed explanation on how the sensor's relative/absolute system is defined. I'd really appreciate clarification on those points. :smile:

  • @dmraptis That's very strange. Today i will test your scenarios with all of my sensors.
    If you find an answer please let me know.

  • I know, it's confusing! I'll let you know if I make any further progress! Thanks @nekos

Sign In or Register to comment.