• DepthAI-v2
  • What are depthai-ros examples parameter IMU Modes?

The ros 2 stereo_inertial.launch.py launch script includes a imuMode parameter, default=1. What are the characteristics of this parameter, and are there other parameter values and what are their significance ?

    RobotRoss
    It's interpolation method for either gyro or accelerometer.

    here is the full implementation.

    enum class ImuSyncMethod { COPY, LINEAR_INTERPOLATE_GYRO, LINEAR_INTERPOLATE_ACCEL };

    Thanka,
    Jaka

    Thank you. For my small robot application , the IMU data from the OakD to sense rotational velocity I.e yaw about the vertical z axis. I would like to understand the best choice of the 3 modes. Is there a description available that explains how these 3 mode effect the generated rotational data?

      RobotRoss
      In LINEAR_INTERPOLATE_GYRO mode, the system prioritizes the gyroscope data and interpolates accelerometer and other sensor data (such as the magnetometer or rotation vector) to match the gyroscope’s timestamps. This mode assumes that the gyroscope data is the most important for your application (which seems to be your case, as you’re focusing on yaw rate).

      The gyroscope data (including yaw rate) will be used as the primary source, and the accelerometer and other sensor data will be linearly interpolated to match the gyroscope’s timestamps. This ensures that the rotational data you receive is consistent with the gyroscope’s measurements. This is particularly important if you plan to fuse data from multiple sensors, as it reduces discrepancies due to unsynchronized timestamps.

      Thanks,
      Jaka

      thank you, makes sense & I'll deploy imu_mode=2. Ross

      A clarification, are the imuModes enumerated, 0,1 2 or 1, 2, 3 ? I.e. is Default = 1 the Copy mode or Linear_Interpret_Gyro?