I
ivan_sc

  • Nov 4, 2024
  • Joined Jun 28, 2024
  • 0 best answers
  • Hello @jakaskerl

    I am having the same issue described above on one of my units. Device stops responding and need to unplug cable to get it back. Reboot of PC is not enough.

    OAK-D W, powered by industrial PC POE. Bootloader version is 0.0.28. Had the same issues on 0.0.26.

    I am developing some ROS Noetic code, and sometimes the device stops responding once I want to try my code again. I try to wait after stopping the script to get the device back into some idle state, as mentioned above, but I still face the issue eventually.

    How can I debug this issue?

    • Hello,

      I would like to have more info about IMU calibration, if there is any documentation about that.

      I want to use the magnetometer from my OAK-D W POE (IMU type: BNO086), but my values are fluctuating a lot, even after switching from MAGNETOMETER_RAW to MAGNETOMETER_CALIBRATED. What is supposed to be the difference between these values? Is it possible to calibrate the sensor on my side based on my environment?

      import depthai as dai
      
      pipeline = dai.Pipeline()
      imu = pipeline.create(dai.node.IMU)
      xlinkOut = pipeline.create(dai.node.XLinkOut)
      xlinkOut.setStreamName("imu")
      
      imu.enableIMUSensor(dai.IMUSensor.ACCELEROMETER, 500)
      imu.enableIMUSensor(dai.IMUSensor.GYROSCOPE_CALIBRATED, 400)
      imu.enableIMUSensor(dai.IMUSensor.MAGNETOMETER_CALIBRATED, 100)
      
      imu.setBatchReportThreshold(1)
      imu.setMaxBatchReports(10)
      imu.out.link(xlinkOut.input)
      
      with dai.Device(pipeline) as device:
          imuQueue = device.getOutputQueue(name="imu", maxSize=50, blocking=False)    
          print("Starting node")
      
          while True:
              imuData = imuQueue.get()     
              imuPackets = imuData.packets
          
              for imuPacket in imuPackets:
                  acceleroValues = imuPacket.acceleroMeter            
                  gyroValues = imuPacket.gyroscope
                  magnetometerValues = imuPacket.magneticField            
                  m_x = magnetometerValues.x
                  m_y = magnetometerValues.y
                  m_z = magnetometerValues.z
                  print(f"X: {m_x}, Y: {m_y}, Z: {m_z}")
      • jakaskerl replied to this.
      • Hi ivan_sc
        Directly from the core docstrings:

            /**
             * Section 2.1.3
             *
             * Magnetic field measurement without any postprocessing, straight from the sensor.
             * Units are [uTesla]
             */
            MAGNETOMETER_RAW = 0x16,
            /**
             * Section 2.1.3
             *
             * The fully calibrated magnetic field measurement.
             * Units are [uTesla]
             */
            MAGNETOMETER_CALIBRATED = 0x03,
            /**
             * Section 2.1.3
             *
             * The magnetic field measurement without hard-iron offset applied.
             * Units are [uTesla]
             */
            MAGNETOMETER_UNCALIBRATED = 0x0f,

        If you want custom recalibration, you currently have to do it on host. Particularly, the noise and random walk calibrations are important. I think Kalibr has some tools to help you: ethz-asl/kalibrwiki/IMU-Noise-Model

        Thanks,
        Jaka