A gripper replay shows a 32 mm jaw gap at time code 10 and a 12 mm gap at time code 20. Does a read at time code 15 describe a measured gap of 22 mm? In OpenUSD it depends on how the stage resolves the attribute. A numeric value can be interpolated, while a Boolean part-seated signal from the same recording can remain at its earlier value until the next authored sample.
Check two signals in the same replay
This in-memory example authors two values for each signal. The gap is a float named for its unit in this fixture. The seated signal is a Boolean. Both are evaluated at the same three numeric time codes.
from pxr import Sdf, Usd
stage = Usd.Stage.CreateInMemory()
gripper = stage.DefinePrim("/Gripper")
gap = gripper.CreateAttribute("jawGapMm", Sdf.ValueTypeNames.Float)
seated = gripper.CreateAttribute("partSeated", Sdf.ValueTypeNames.Bool)
for attribute, initial, final in ((gap, 32.0, 12.0), (seated, False, True)):
attribute.Set(initial, 10)
attribute.Set(final, 20)
def observe(mode):
stage.SetInterpolationType(mode)
return [(t, gap.Get(t), seated.Get(t)) for t in (10, 15, 20)]
print(observe(Usd.InterpolationTypeLinear))
print(observe(Usd.InterpolationTypeHeld))
With OpenUSD 0.26.11, linear interpolation returns (10, 32.0, False), (15, 22.0, False), and (20, 12.0, True). Held interpolation returns (10, 32.0, False), (15, 32.0, False), and (20, 12.0, True). Both modes return the same values at the two authored sample times. In linear mode, the float gap changes between samples. The Boolean uses held behavior in both runs.
Use that difference to review the recording
A reviewer who sees 22 mm halfway through the replay may infer more about the closing motion than the recording supports. Check the authored samples before reporting the gap at an intermediate time. Likewise, the first True sample identifies when the recording shows the part seated. With only these two samples, the original sensor transition could have occurred anywhere after the earlier False reading and up to the later True reading.
Record the attribute paths, data types, time codes, and the stage interpolation mode alongside screenshots or exported measurements. The interpolation setting applies across the stage. An isolated review stage makes it possible to compare modes without changing unrelated animation in the open workcell. If the replay needs to establish the order of a sensor transition and a jaw position, preserve their acquisition timestamps and sample rates with the raw recording.
Sources
OpenUSD UsdStage API reference for stage-level interpolation configuration
https://openusd.org/release/api/class_usd_stage.html
OpenUSD UsdAttribute API reference for value resolution and supported interpolation behavior
https://openusd.org/release/api/class_usd_attribute.html