View my account

Delay in change exposure/laser power

Comments

5 comments

  • MartyG

    Hi Ralucadianapetre  Did you build the RealSense SDK (librealsense) from source code with the RSUSB backend please?  If you did, the RSUSB backend can take longer to register an option change compared to the V4L backend (a kernel-patched build).  This is discussed at the link below.

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

     

    It is possible to edit the SDK's types.h file and then build that customized SDK from source code so that an RSUSB build checks for events such as options changes more frequently than the default of every 5 seconds, as described here:

    https://github.com/IntelRealSense/librealsense/issues/10188#issuecomment-1023153338

     

    Even if you are not using an RSUSB build, changing an option can take at least a couple of frames to complete, due to the time taken for changes to propagate back to the user.

     

    There is no need to set the frame queue size to 1, as it is already '1' by default.  This queue size has an increased chance of frames being dropped, whilst setting the queue to '2' adds latency and therefore reduces the chance of frame drops.  Some RealSense users have found that a queue size of '50' works well for them.

     

    You may receive the same frame twice if there is a 'hiccup' during streaming that results in a bad frame, causing the SDK to automatically go back to the previous good frame and continue onwards from that point.  The SDK should therefore decide what the first good frame after changing the settings is.

    0
    Comment actions Permalink
  • Ralucadianapetre

    I used Intel.RealSense.SDK-WIN10-2.50.0.3785.exe to install the SDK. I don't know if it uses RSUSB or not, but the change occures in les than 0.5s / 15 frames. So I suppose it used the other backend (V4L). 

    Out of curiosity, does the queue size even matter when using wait_for_frames()?

    0
    Comment actions Permalink
  • MartyG

    The Windows version of the SDK uses Microsoft Media Foundation as its backend by default. 

     

    It can alternatively be built from source code with CMake instead of using the automated Intel.RealSense.SDK-WIN10 installer file, which allows the backend to be set to a backend based on a WinUSB rewrite of the UVC protocol by setting to true the CMake build instruction FORCE_RSUSB_BACKEND 

    https://github.com/IntelRealSense/librealsense/blob/master/doc/installation_windows.md

     

    If you are using 3 cameras at the same time that are being controlled by the same program, it is recommended that you use poll_for_frames() instead of wait_for_frames(), as described at the link below.

    https://github.com/IntelRealSense/librealsense/issues/2422#issuecomment-423254709

    0
    Comment actions Permalink
  • Ralucadianapetre

    Thanks. Would rebuilding the SDK with RSUSB lead to faster propagation of the changes? (exposure and laser power).

    While using poll_for_frames(), using queue size = 1 ensures getting the latest frame, right?

    0
    Comment actions Permalink
  • MartyX Grover

    Queue size = 1 is the default 'performance' setting with minimum latency but a risk of frame drops.    It is also advised to use a frame queue greater than '1' if you have enabled more than one stream type (i.e depth + color instead of just depth).

     

    poll_for_frames returns frames instantly without blocking until a complete frame is available like wait_for_frames does. 

     

    A RealSense Windows user at the link below who was experiencing repeating frames stated that using FORCE_RSUSB_BACKEND provided the latest frames in their particular case.

    https://github.com/IntelRealSense/librealsense/issues/9528#issuecomment-895550918

     

    There is not information available regarding whether the Microsoft Media Foundation or RSUSB backend provides better response time for option changes in the Windows version of the SDK though.

    0
    Comment actions Permalink

Please sign in to leave a comment.