Skip to content

sync

xiao_hei_vln.sync

Synchronization primitives that bridge ROS publish rates to the VLM tick.

LatestCache

One slot per logical channel; writers overwrite, readers snapshot atomically.

Designed for the latest-cache + VLM tick pattern documented in docs/task1_io_spec.md. Callbacks from many ROS subscribers can write concurrently; the VLM main loop calls snapshot() at its own cadence to produce a VLMInput.

The question channel is sticky — once set it is returned in every subsequent snapshot until clear_question() is called.

snapshot(tick_id, tick_time)

Atomically read every slot into a single VLMInput.

LatestCache

xiao_hei_vln.sync.latest_cache

Thread-safe latest-value cache that feeds VLMInput snapshots.

LatestCache

One slot per logical channel; writers overwrite, readers snapshot atomically.

Designed for the latest-cache + VLM tick pattern documented in docs/task1_io_spec.md. Callbacks from many ROS subscribers can write concurrently; the VLM main loop calls snapshot() at its own cadence to produce a VLMInput.

The question channel is sticky — once set it is returned in every subsequent snapshot until clear_question() is called.

snapshot(tick_id, tick_time)

Atomically read every slot into a single VLMInput.