View my account

Realsense D435i: rs-motion drift on y orientation

Comments

7 comments

  • MartyG

    Hi M Faizan  The discussions in the links below should be helpful in understadig the behavior of the IMU in the rs-motion example program.

    https://github.com/IntelRealSense/librealsense/issues/4391 

    https://github.com/IntelRealSense/librealsense/issues/7103 

    The IMU component inside the camera does not have internal calibration, so a Python-based software calibration tool exists for this purpose. 

    https://dev.intelrealsense.com/docs/imu-calibration-tool-for-intel-realsense-depth-camera 

    If the IMU is not calibrated then it may produce non-zero values on the Y acceleration axis even when the camera is stationary.  Calibration helps the Y value to get close to the ideal target of 9.80 (9.81 is the real-life gravity value on Earth).

    After a calibration has been written to the camera's internal storage, an option in the Motion Module of the RealSense Viewer appears that provides the function of applying motion correction to the IMU data.

    0
    Comment actions Permalink
  • M Faizan

    Hi MartyG,

    Thank you for the prompt reply.

    I tried the calibration and I get the y accel close to 9.80 (arround 9.7). I guess this is the most I can do. However the drift is still present on the y orientation as shown below:

    As you can see above the camera is stationary but the y orientation is reducing slowly about 1 degree every 20 secs. The print you see above is from the rs-motion code specifically from the below part of the code:

    Do you have any idea on how I can stop this drift from happening? 

    Please let me know if you need any more information on this. Thanks for the help.

     

    0
    Comment actions Permalink
  • MartyG

    The rs-motion documentation explains that gyro drift may occur if the alpha value is too high.  Using a lower alpha value shifts the balance of the calculations to favor the accelerometer instead of the gyro, though the trade-off is that the data becomes more sensitive to disturbances.

     

    0
    Comment actions Permalink
  • M Faizan

    Hi MartyG,

    I tried changing up the alpha value to different levels and I still get the same issue of the angle reducing continuously while the camera is stationary. Do you have any other suggestions?

    Thank you for the help so far.

    0
    Comment actions Permalink
  • MartyG

    When calibrating the IMU with the Python calibration tool, the outcome of the calibration can be negatively affected if the camera is overly tilted when orientated in the vertical position (USB cable pointing downwards or upwards).  '

    It is difficult to achieve ideal values in these orientations though due to the problems with holding the camera completely vertically straight when it is held in the hand as the original PDF documentation for the tool recommended.  In the updated online version of the guide, it is suggested to instead use the RealSense box as a camera holder to achieve precise 90 degree orientation.

    https://github.com/IntelRealSense/librealsense/tree/master/tools/rs-imu-calibration 

    0
    Comment actions Permalink
  • M Faizan

    Hi MartyG,

    I do get the accel values in the different orientations very close to 9.81 (~9.79). Doesn't this mean that the calibration was good? I know it will be probably very difficult to reach the ideal value of 9.81 especially in the 90 degree vertical orientation even with the camera box technique. Would you still recommend trying it?

    I still have this error and I am not sure how to fix it. Any suggestions would be appreciated. Thank you for the suggestions so far.

    0
    Comment actions Permalink
  • MartyG

    9.79 is a very good result for the Y-accel calibration, so there is no problem there.  You just need to get as close as possible to 9.80, not achieve it precisely.

    It is not expected that an exact 90 degree tilt orientation will be achieved, though the closer to a straight vertical 90 degrees the better.  The discussion in the link below talks about this subject.   I recommend reading the discussion from the point that I have linked to it down to the end of the discussion.

    https://github.com/IntelRealSense/librealsense/issues/5177#issuecomment-550210453 

    Within that discussion, a RealSense user provides details on the custom-created method that they used to improve their calibration result.

    https://github.com/IntelRealSense/librealsense/issues/5177#issuecomment-570980916 

    The camera-box method is certainly worth trying first if you want to try to improve your vertical orientation results.

    0
    Comment actions Permalink

Please sign in to leave a comment.