fix: 按复位请求目标确认参考版本并隔离复位状态
防止在途旧帧提前触发归零,并保留旧 reset 用法。SDK 101 项针对性回归与 lint 通过。
This commit is contained in:
+13
-3
@@ -165,6 +165,16 @@ compute the same numbers.
|
||||
## Resetting the reference
|
||||
|
||||
Both backends process externally supplied frames through the same profile. After a gap in the
|
||||
input - a pause, a seek, a scene change - call `session.reset()`. It is queued to the stage that
|
||||
owns the tracker, so the reference frame is rebased on the frame about to be computed rather than
|
||||
on a buffer the pipeline is still reading.
|
||||
input - a pause, a seek, a scene change - call `session.reset()`. It is queued to the stages that
|
||||
own the sensor state, so the reference frame is rebased on the frame about to be computed rather
|
||||
than on a buffer the pipeline is still reading: the flow stage resets the image/tracker state and
|
||||
bumps the reference version, and the HHD stage resets the force/readout state (filters, contact
|
||||
flags, calibration session) on the first frame carrying the new version, before decomposing it.
|
||||
`FrameSnapshot.tracker_reset_seq` is the version that frame was measured with.
|
||||
|
||||
When driving `StreamPipeline` directly, call `target = pipeline.request_reset()` to obtain the
|
||||
future reference version reserved by that request. Confirm it only when a snapshot carries
|
||||
`tracker_reset_seq >= target`; the current output frame can trail an earlier reset and cannot
|
||||
identify a new request. Requests share a target until flow claims it; a later request gets a new
|
||||
target even while the earlier reset is still being applied. The existing `reset()` returns `None`.
|
||||
Regression coverage lives in `tests/test_pipeline.py` (request coalescing and reset-in-progress).
|
||||
|
||||
Reference in New Issue
Block a user