View my account

Understanding hardware_reset() behavior for RealSense cameras

Comments

2 comments

  • MartyG

    Hi Vijaykumar Shejal  Thanks very much for your questions.

     

    1.  When a hardware_reset() is performed, the camera disconnects and then reconnects.  The effect is similar to physically unplugging the camera from the USB port and then re-inserting it.  So the process is like a power cycling.  The link below has advice from an Intel RealSense development team member that confirms that a hardware_reset() resets most options to the default settings. 

    https://github.com/IntelRealSense/librealsense/issues/10163#issuecomment-1015558763

     

    A hardware_reset() does not change the firmware version though.

     

    2.  The reset usually completes in 2 to 3 seconds.  Checking that the reset has completed can be complicated.  A simple measure that could be tried is to implement a sleep instruction after the reset command so that a program cannot perform further processes until a specified amount of time has elapsed. 

     

    The link below also has a contribution in Python code from a RealSense user that explains how they approached the camera-ready checking problem.

    https://github.com/IntelRealSense/librealsense/issues/10139#issuecomment-1027243506

     

    3.  Repeated use of hardware_reset() will not have a negative effect on the camera hardware.

     

    4.  Instead of performing a hardware_reset() of the camera hardware, you can also reset the entire USB port instead.  In Ubuntu this can be done with a 'bash script'.  This should have a similar effect to hardware_reset() and has the additional benefit that - unlike with hardware_reset() - it is not necessary for the camera to be detectable in order for the reset to occur.

     

    If the camera is detectable then instead of a reset you could also try closing the frame pipeline in your program and then re-starting the pipeline.

    1
    Comment actions Permalink
  • Vijaykumar Shejal

    MartyG Thanks a lot for your answer.

    0
    Comment actions Permalink

Please sign in to leave a comment.