[RSDK-13174] Fixing spammy color and depth timestamps differ logs#62
Conversation
| if (ts > 0) { | ||
| return ts; | ||
| } | ||
| return frame->getSystemTimeStampUs(); |
There was a problem hiding this comment.
according to your description, it sounds like we shouldn't use system timestamp bc it's unreliable
why are we still using it as a fallback when somehow getGlobalTimeStampUs is LEQ 0?
also, how can getGlobalTimeStampUs be LEQ 0? have you observed this happening
could it happen when global timestamp is not enabled on the system?
There was a problem hiding this comment.
should we log a single, not noisy warning that color-depth timestamp comparisons are not supported when global timestamp isn't available? Instead of falling back to the unreliable system timestamp?
There was a problem hiding this comment.
hmmm, another option would be to support system timestamp and put a threshold of perhaps 400ms between frames. My thinking is that it may be better to have that rough measurement than nothing, but totally open to discuss it.
There was a problem hiding this comment.
I researched this further, even with GlobalTimestamps we are still seeing differences between the frames. I know this is a known issue at Orbbec, I just sent them an email to ask about it. In the meantime, I'm going to use GlobalTimestamps, throttle this log to once per minute, and log always on debug level.
There was a problem hiding this comment.
Also, I prefer to keep support for System Timestamps for know, to be future proof for cameras we may support in the future that doesn't support GlobalTimestamps.
There was a problem hiding this comment.
Could we log once per five minutes and keep it at the info level?
would that be considered "spammy" still?..
There was a problem hiding this comment.
With the latest improvements, on this PR, we should not see any more timestamp differ logs, I'll set this to 5 minutes but raise this to warn instead of info.
what about in the models we unofficially support? |
|
When you say this do you mean Astra2 doesn't support using the Global timestamp? |
|
This old thread may be relevant: orbbec/OrbbecSDK_v2#92 We haven't tested their suggested fix yet if you want to try it, but if this works thats fine too |
I'm sorry I wasn't clear enough, I mean that Astra2 does support using the Global timestamp. |
Good call, the only other model we currently support is the Gemini35Le, and we officially support it (documentation here). I tested with it and it also supports global timestamps, so at this moment both our cameras support it. |
327f21c to
39ec6f6
Compare
|
@oliviamiller Is there any documentation on what the |
|
yes, docs here. "The Color and Depth should be set to same frame rates, the Color and Depth will be synchronized."
|
|
@oliviamiller Ty for the docs. But still confused on why this was suggested... I believe this is referring to syncing multiple orbec modules with hardware pwm input over |
yes that is what the ob_multi_device_sync_mode enum does, but the OB_MULTI_DEVICE_SYNC_MODE_STANDALONE option indicates that the device isn't syncing with any other cameras. Im assuming the default is OB_MULTI_DEVICE_SYNC_MODE_FREE_RUN which indicates |
Hello, I just tested this OB_MULTI_DEVICE_SYNC_MODE_STANDALONE feature and I'm seeing a big improvement in our color/depth frame syncronization: With it being set: Without it (using default OB_MULTI_DEVICE_SYNC_MODE_FREE_RUN mode) |
hexbabe
left a comment
There was a problem hiding this comment.
great findings with the sync mode!
After some debugging and experimentation, this is the list of improvements as part of this work
OB_MULTI_DEVICE_SYNC_MODE_STANDALONE: If color and depth frames uses the same FPS, this option sync's them, in my testing, this reduced the average time difference from 4.5us to 1.9us, more info here.With these improvements, we are getting frames more in sync and I'm not seeing any more logs.