A robot slide animation can play correctly in its source file and start at a different point when the workcell references it. Inspect the sample times in the composed stage before moving animation keys in the source. OpenUSD can convert between the source and consumer time-code rates and apply a scale and offset on the reference itself.

Test a reference with two changes to time

The source stage below authors carriage positions at time codes 3 and 7 and uses 12 time codes per second. The workcell stage uses 24 and references the source with a scale of 1.5 and an offset of 5. The attribute is a simple position test signal. It does not animate an actual transform or invoke a physics engine.

from pxr import Sdf, Usd

motion = Usd.Stage.CreateInMemory()

motion.SetTimeCodesPerSecond(12)

slide = motion.DefinePrim("/Slide", "Xform")

position = slide.CreateAttribute(

"carriagePosition", Sdf.ValueTypeNames.Double

)

position.Set(1.0, Usd.TimeCode(3))

position.Set(9.0, Usd.TimeCode(7))

cell = Usd.Stage.CreateInMemory()

cell.SetTimeCodesPerSecond(24)

cell.SetInterpolationType(Usd.InterpolationTypeLinear)

mounted = cell.DefinePrim("/MountedSlide", "Xform")

assert mounted.GetReferences().AddReference(

motion.GetRootLayer().identifier,

slide.GetPath(),

Sdf.LayerOffset(5, 1.5),

)

value = mounted.GetAttribute("carriagePosition")

assert value.GetTimeSamples() == [14.0, 26.0]

assert [value.Get(Usd.TimeCode(t)) for t in (14, 20, 26)] == [

1.0, 5.0, 9.0

]

print(value.GetTimeSamples())

The assertions pass in OpenUSD 0.26.11. The rate conversion first multiplies the source time codes by 24 divided by 12. The reference then applies its scale and adds its offset, so time code 3 becomes 3 ? 2 ? 1.5 + 5 = 14, and time code 7 becomes 26. The composed read at time code 20 is halfway between the two samples and returns 5.0 with linear interpolation. The position values at the exact authored samples stay 1.0 and 9.0.

Confirm the timing in a workcell review

Use a sample with a recognizable value near the start of the motion and another near its end. Record the source attribute path, both stage time-code rates and any time mappings on the composition arcs between the source and workcell. Confirm the expected sample positions with GetTimeSamples on the composed attribute and read the values at those positions. An interpolated checkpoint can also verify the intended behavior between samples.

If either value appears at an unexpected time, inspect the composed rates and reference offsets before editing the animation. Confirm that the viewer is sampling the same stage time code, especially if its timeline shows seconds or display frames. For a comparison against hardware logs, convert to the intended clock and account for the replay origin separately. A time-code mapping by itself cannot establish where a sensor or controller placed its timestamp.

Sources

OpenUSD animation guide, time-code conversion and composition offsets

https://openusd.org/release/user_guides/time_and_animated_values.html

OpenUSD SdfLayerOffset API reference, offset and scale

https://openusd.org/release/api/class_sdf_layer_offset.html