DS525 or Kinect Camera for depth information in Mujoco simulation

Discussion in 'Modeling' started by swapnil, May 22, 2018.

  1. Hi Emo,
    Do we have a Kinect Camera or DS525 model which could be used inside MuJoCo simulation, when we need depth information? Or is there some other way which can help us convert the information of a camera in the same format as what DS525 or Kinect Camera would output?
  2. Emo Todorov

    Emo Todorov Administrator Staff Member

    You can read the OpenGL depth buffer with mjr_readPixels. Keep in mind that depth values in OpenGL are scaled by the camera frustum. You should be able to find information online as to how to convert from a depth buffer to a depth camera format.
  3. Hi Professor,
    I went through some OpenGL documentations online. What I learnt is that the depth is scaled within certain range (for example [0,1]) by znear and zfar (parameters in visual/map in mujoco). However I'm still confused about the conversion since I found many different ways of conversion.
    From my test results, neither linear scaling and non-linear scaling described in this post seems correct. https://learnopengl.com/Advanced-OpenGL/Depth-testing
    Can you give me the detail for the conversion between real depth and z-buffer values? Thanks a lot!