Skip to content

sim2bot.CameraFrame.age

age: float property

Return the current frame age in seconds.

This is an approximate capture-to-consumer measurement based on wall clocks. It includes browser production, bridge relay, and Python delay.

Returns:

  • float

    Elapsed wall-clock seconds since the browser captured this frame.


Practical examples

Examples use objects discovered from the current scene rather than hard-coded robot metadata.

Accept only recent frames

if frame.age <= 0.2:
    policy(frame.image())

Measure observed stream latency

ages = [frame.age for frame in feed if frame.sequence < 100]
print("mean age", sum(ages) / len(ages))

Guidance

Important behavior

Age uses wall clocks and is an approximate capture-to-consumer measurement, not a calibrated end-to-end latency guarantee.


See also