View my account

D435/D435i on robot: how should camera angles be measured in CAD, and what could cause repeated false near points?

Comments

4 comments

  • MartyX Grover

    Hi Jorge Casatejada Santamarta I am not familiar with calculating angles theoretically in CAD.  However, the RealSense SDK makes use of a plane-fit algorithm to work out the angle between the camera and the ground without requiring an IMU, which is important if three of your four cameras are the IMU-less D435 model. The plane-fit algorithm RealSense uses is based on one at the link below.

    https://www.ilikebigbits.com/2015_03_04_plane_from_points.html

     

    This algorithm is also built into the SDK's Depth Quality Tool program for analyzing the depth quality of a RealSense camera.

     

    In regard to the camera frame axes, RealSense uses a different convention to the usual one, where X is left, Y is up and Z is forward.  These are described here:

    https://github.com/realsenseai/librealsense/blob/master/doc/d435i.md#sensor-origin-and-coordinate-system

     

    In the RealSense ROS wrapper, when the data is outputted these axes are automatically converted to the ROS standard (X-forward, Y-left, Z-up).

     

    In regard to roll-pitch-yaw, only roll and pitch can be extracted from a RealSense camera's IMU.

    https://github.com/realsenseai/librealsense/issues/4391#issuecomment-510578991

     

    As long as your camera's tilt pitch is not greater than +- 30 degrees then the camera's depth calculations should not be negatively affected, so it should be okay if the retrieved pitch is only a couple of degrees different from the theoretical one.  Unforeseen issues in the image may be introduced if the tilt pitch exceeds 30 degrees.

     

    In regard to the 96 degree roll, which would put the camera oriented vertically on its side I believe, RealSense camera work fine on a 90 degree roll orientation, so 96 should be okay.  However, it is important that the image is not rotated 96 degrees in the opposite direction to put it in the normal orientation, as all the calibration values would be incorrect.  You can though rotate the image orientation safely using the post-processing rotation filter, which will put the image in the straight-ahead orientation whilst also correctly updating the calibration parameters and other data to take account of the rotation.

     

    If there are a repeating series of similar looking metal bars on the ceiling then this could introduce a repetitive pattern and confuse the depth sensing.  There is a guide below about mitigating repetitive patterns.

    https://dev.realsenseai.com/docs/mitigate-repetitive-pattern-effect-stereo-depth-cameras

     

    Reflectivity of surfaces can also make those surfaces more difficult to accurately read.  Fitting a thin-film inexpensive linear polarizing filter over the lenses on the front of the cameras should greatly reduce the negative effect of glare from reflections and make those surfaces much easier for the camera to analyze.  You can find polarizing filters cheaply in stores such as Amazon by searching for linear polarizing filter sheet.

     

    I would add that with the D435 / D435i camera models, it is expected that depth accuracy will start to noticeably drift beyond 3 meters from the camera.  This is a phenomenon called RMS Error, where error increases linearly as distance from the camera increases.  The D455 type cameras provide 2x the accuracy over distance of the D435 type cameras, though I appreciate that it may not be practical to change the cameras.

    0
    Comment actions Permalink
  • MartyX Grover

    I especially emphasize that you should be using Z as your depth-forward value instead of X.

    0
    Comment actions Permalink
  • Jorge Casatejada Santamarta

    Hi MartyX Grover ,

    Thank you very much for the detailed reply.

    Regarding the plane-fit algorithm, thank you for mentioning it. I did not know about that approach, so I will definitely keep it in mind, especially because three of my four cameras are D435 models without IMU.

    Regarding the camera frame axes, thank you as well. When I have the chance, I will try to repeat the measurements using those RealSense axes and check whether that is part of the discrepancy I am seeing.

    Regarding roll, pitch and yaw from the IMU, thank you. Yes, I was already aware that only roll and pitch can be obtained directly from the IMU. In my case, the yaw value was estimated manually.

    Thank you also for the information about pitch and roll limits. I did not know that this was considered acceptable, so it is very useful for me in order to better judge whether my issue could be related to the camera mounting angles or not.

    Regarding the metal bars and possible reflectivity issues, I will try both suggestions when I can:

    • checking the repetitive pattern effect from the ceiling bars

    • testing linear polarizing filters

    Once I do that, I will report back with the results.

    Regarding the distance-related accuracy drift of the D435 / D435i, I also have a D455 available for testing, and it seems that this specific issue:

    • points that should be approximately 4 to 5 meters away

    • appearing at around 2 meters from the camera

    either disappears or is significantly reduced when using the D455.

    So that may also be an important clue.

    Thank you again for all the information. It is very helpful.

    0
    Comment actions Permalink
  • MartyX Grover

    You are very welcome.  I'm pleased that I could help.

     

    Please do update me with your test results and let me know about any further questions that you have.  Thanks again!

    0
    Comment actions Permalink

Please sign in to leave a comment.