orbbec / OrbbecSDK-K4A-Wrapper

This repo is forked from Azure-kinect-Sensor-SDK,contain the K4A wrapper for OrbbecSDK.
https://www.orbbec.com/
MIT License
34 stars 7 forks source link

Sensor SDK "update device time" issue #44

Open bhkwon1989 opened 7 months ago

bhkwon1989 commented 7 months ago

Issue Description There is an intermittent issue where the process occasionally terminates. This problem mainly occurs in Orbbec when applying the same logic to two sensors, Kinect and Orbbec. Before the process terminates, it has been observed that the same log is printed, and it has been confirmed that this log is produced by the Orbbec SDK. The corresponding log is within the red box in the first image. This log is periodically output every minute. If you look at the second image, you can see an overlap between my logs and the logs from the Orbbec SDK. In this scenario, it is not 100%, but there have been instances where "resource busy" occurs, and subsequently, when accessing the sensor, freezing occurs in places where the waiting time is set to K4A_WAIT_INFINITE, such as k4a_device_get_capture or k4abt_tracker_enqueue_capture.

To Reproduce Due to its intermittent nature, the exact reproduction method cannot be determined. However, it is anticipated to occur when there is a load on the device, as indicated by the "resource busy" message.

Request

  1. inform the role of the functionality that outputs the log "[02/22 16:06:54.743497][info][43704][DeviceManager.cpp:246] dev-uid@0xc0aa6f4, update device time succeeded! round-trip-time=1ms" and whether this functionality can impact the device load.
  2. Check if it is possible to add a sleep function in the Orbbec SDK after the occurrence of "resource busy" until the resources are safe.

Screenshots first image. orbbec issue

second image. issue2

(red square : orbbec SDK log, green circle : my log)

Desktop (please complete the following information):

hzcyf commented 7 months ago

Thank you for your feedback.

Firstly, regarding your request:

  1. This log is generated by the internal host-device clock synchronizer in the Orbbec SDK. It periodically provides the device with timing, with the current timing interval set to 1 minute. Based on this log, it seems that the host successfully provided timing to the device. This is a standard and tested function design that will not impact the device's operation.
  2. The Orbbec SDK already has a mechanism for this; After receiving a ‘resource busy’ error, it will sleep for 3 seconds, and then retrying the operation.

Secondly, based on the information you provided, we are unable to determine the underlying reason for the issue. The 'resource busy' log you captured is a result of the problem, rather than its cause. It appears that something has been occupying the device for an unusually long period of time. Therefore, if feasible, kindly share the log file and your code flow. This will enable us to replicate the issue for further analysis.