跳转到内容

同步多台设备:头戴、腕戴、第三人称相机与 Aria

当前的采集设备从身体上不止一个位置录制。头上的双目是基线,公开的设备现在走得更远:RoboCap 是一顶 “250 g six-camera dual-IMU hat”(意为:250 g、六相机、双 IMU 的帽子)(Ali 等,2026),Meta 的 Ego-1K 设备 “integrates 12 global-shutter RGB fisheye cameras surrounding a Quest 3 headset with 4 cameras”(意为:集成了 12 台全局快门 RGB 鱼眼相机,环绕着一台带 4 台相机的 Quest 3 头显)(Lee 等,2026)。许多数据采集还加上腕戴相机、手持夹爪、动作捕捉服或架设在房间里的相机(见头戴加腕戴采集、手持夹爪、可穿戴动作捕捉和第一人称与第三人称)。

同一块电路板上的传感器可以共用一个时钟。分属不同设备的传感器做不到,于是每台设备各自用自己的晶体计时。本页说明已发表的设备如何把各自独立的设备放到同一条时间线上,以及每种做法据报告达到了什么水平。相关术语(偏移、漂移、ppm、曝光中点、延迟、抖动)在为什么同步很重要中定义。各种方法本身在硬件同步、软件同步与视觉同步、PTP 与网络时间和二维码、LED 与闪光同步中讲解,并在同步方法对比的一张表中进行比较。

实用指南的全部术语按主题分组列在一处,见术语表。

术语 含义
时间域(time domain) 时间戳取自哪个时钟:设备自己的时钟、主机计算机的时钟,或多设备共用的基准。来自不同时间域的时间戳不能直接比较。
主机(host,也叫服务器 server、leader)和客户端(client) 在多设备同步中,提供基准时间的那台设备,以及对照它来测量自身的那些设备。
时间域映射(time-domain mapping) 随录制一起存储的一张表或一路数据流,用来把设备自己的时间戳转换到共用的基准上。
LTC(linear timecode,线性时间码) 以音频频段信号传送的 SMPTE 时间码,使各自独立的录制设备能打上相同的时间。
延迟匹配(latency matching) 把每一路传感器数据流按它实测的、从采集到到达的延时进行平移,使机器人策略看到的是在同一瞬间取得的观测。
模式 时间如何共享 已发表的例子 已发表的数字 主要限制
一台设备上的一个时钟 一个触发信号和一个时钟驱动电路板上的每个传感器 RoboCap 相机对相机 “0 ms at timestamping granularity”(意为:在时间戳粒度上为 0 ms);时钟预算 ±1.81 ppm,绝对漂移约每小时 ±6.5 ms 只覆盖连接到这块电路板的传感器
跨设备共用时间码或同步装置 一个时间码发生器或同步盒向每台录制设备提供相同的时间 Ego-1K、Nymeria、Assembly101、HOT3D Nymeria:设备之间 “sub-millisecond accuracy”(意为:亚毫秒精度);动作捕捉与 Aria 之间在一个动作帧以内,即 4.2 ms 每台设备上都要有接收器或同步输入
由一台主机录制每台相机 一部手机或一台头显录制自己的相机和 USB 腕戴相机,并记录到达时间 EgoKit 视情况而定 时间戳是到达时间;各相机以不同的速率自由运行
设备之间通过网络或无线电 设备通过 Wi-Fi 或无线电交换时间或数据包 Aria TICSync 和 SubGHz、EgoGuide、HoMMI、MultiEgo TICSync:“better than 1ms on average after approximately 45 seconds warm-up”(意为:在大约 45 秒的预热之后,平均优于 1ms);EgoGuide:“within 20 ms”(意为:在 20 ms 以内) 对齐的是时钟,不是曝光
开始和结束时的视觉事件 每台相机拍摄同一段二维码视频或同一个 LED 时钟 Ego-Exo4D、RocSync、MV-UMI Ego-Exo4D:每台 GoPro 与 Aria 相差 “within 1 frame (+-16.66ms)”(意为:在 1 帧(+-16.66ms)以内),经人工检查;RocSync:相对于硬件同步 RMSE 为 1.34 ms 需要操作员严格按规程操作;失败时需要补救
推理时的延迟匹配 每路数据流在策略看到它之前,按其实测延时平移 UMI、DexUMI、HoMMI 视情况而定 配置改变时必须重新测量延时

这些数字都是各来源自己在各自条件下给出的,不能直接比较。“视情况而定”表示该来源没有给出数字。

Six ways published rigs share time across devices Six small panels. One: one clock on one board, which triggers every sensor wired to it, as on RoboCap; it only covers sensors on that board. Two: a shared timecode generator or sync box feeding every recorder, as in Ego-1K and Nymeria; every device needs an input for it. Three: one host, such as a phone or headset, records its own camera and USB cameras, as EgoKit does; it logs arrival times while the cameras free-run. Four: devices exchange time packets over Wi-Fi or radio, as Aria's TICSync and SubGHz do; this aligns clocks, not exposures. Five: every camera films the same visual event, a QR code or LED clock, at the start and end, as in Ego-Exo4D and RocSync; it depends on operator discipline. Six: latency matching, where each stream is shifted by its measured delay before a policy sees it, as in UMI, DexUMI and HoMMI; the delays must be re-measured whenever the setup changes. One clock, one board e.g. RoboCap board + clock limit: only sensors wired to it Shared timecode e.g. Ego-1K, Nymeria timecode limit: an input on every device One host records all e.g. EgoKit host USBUSB limit: arrival times, free-running Network or radio e.g. Aria TICSync, SubGHz time packets over Wi-Fi or radio limit: clocks, not exposures Visual event, start and end e.g. Ego-Exo4D, RocSync limit: operator discipline Latency matching e.g. UMI, DexUMI, HoMMI shift each stream by its measured delay limit: re-measure on any change
The six patterns published rigs use to share time across devices, each with an example from this page's table and its main limit. Only the first, one trigger and one clock on one board, aligns exposures by construction; network and radio sync align clocks, and visual events and latency matching align streams after the fact.

RoboCap 在头上做到了这一点。“All six cameras are exposure-triggered from a single PWM frame-synchronization signal generated by the main controller and fanned out through a 1-to-6 clock buffer”(意为:全部六台相机的曝光都由同一个 PWM 帧同步信号触发,该信号由主控制器产生,并通过一个 1 分 6 的时钟缓冲器扇出),并且 “the measured camera–camera offset is 0 ms at timestamping granularity”(意为:实测的相机与相机之间的偏移在时间戳粒度上为 0 ms)(Ali 等,2026)。各帧 “timestamped at exposure completion on the device clock”(意为:在曝光完成时用设备时钟打上时间戳),相机与 IMU 的偏移按每台设备单独标定,残差最多 3 ms。

一个共用的时钟相对于外部世界仍然会漂移。RoboCap 的时钟是一个 24 MHz 的温度补偿晶体振荡器(TCXO),最坏情况的预算为 ±1.81 ppm,作者说这把绝对漂移限制在约每小时 ±6.5 ms(每秒 1.81 µs × 3600 s = 6.5 ms)。作者指出了这为什么可以接受:“that drift affects the absolute timeline only and not inter-sensor synchronization”(意为:这种漂移只影响绝对时间线,不影响传感器之间的同步)。一旦有第二台设备加入录制,它就又变得重要了。

商用套件描述了覆盖上半身的同一种模式:Instawork 的发布公告列出,在一个背包上有 “Five cameras with hardware time synchronization - head, chest, and two wrists”(意为:五台带硬件时间同步的相机:头部、胸部和两只手腕)(Instawork,2026),Arducam 的 EgoSync-WEAR 套件对一台双目头戴相机和手臂相机做硬件同步(Arducam,2026)。两者都没有发表时间测量结果。

当设备来自不同厂商时,已发表的设备给每台设备提供相同的时间信号。

  • Ego-1K 把一套定制的 12 相机设备和一台 Quest 3 头显结合在一起:“a wireless synchronizer sends an LTC timestamp to both the Quest headset streams and the 12 rig cameras. A timing controller communicates the timestamp for the triggered frames via MQTT to the ROS2 capture software running on the PC”(意为:一个无线同步器把 LTC 时间戳同时发送给 Quest 头显的数据流和设备上的 12 台相机。一个定时控制器通过 MQTT 把被触发帧的时间戳传给运行在 PC 上的 ROS2 采集软件)(Lee 等,2026)。共用的时间戳随后把这套设备的录制文件与头显的录制文件对齐。
  • Nymeria 结合了 Project Aria 眼镜、两条 “miniAria” 腕带(重新封装的 Aria 电子部件,没有麦克风、气压计、磁力计和眼动追踪相机)和一套 XSens 动作捕捉服。“A synchronization device is developed to supply the timestamps for all devices”(意为:开发了一个同步装置,为所有设备提供时间戳),它可以从约 100 m 外的无线服务器获取时间。作者称 “This facilitates synchronizing multiple devices with sub-millisecond accuracy”(意为:这有助于以亚毫秒精度同步多台设备),并且动作捕捉服与眼镜的一致程度 “within 1 motion frame”(意为:在 1 个动作帧以内),在动作捕捉服的 240 Hz 下为 4.2 ms(Ma 等,2024)。对于多个人,这套配置按人各复制一份,并共用一个时间服务器。
  • Assembly101 录制了八台房间相机和一台定制头显上的四台相机:“All cameras are synchronized with SMPTE timecode”(意为:所有相机都用 SMPTE 时间码同步)(Sener 等,2022)。
  • HOT3D 在一个动作捕捉空间内录制了 Aria 眼镜和 Quest 3 头显:“Data frames from different sources were synchronized with SMPTE timecode”(意为:来自不同来源的数据帧用 SMPTE 时间码同步)(Banerjee 等,2024)。
  • 一套背包设备用于户外手部跟踪,带有八台鱼眼相机和一台 Quest 3 头显,并由五台 OptiTrack 相机跟踪:“All ten monochrome cameras and the five MoCap cameras are hardware-synchronized”(意为:全部十台单色相机和五台动作捕捉相机都是硬件同步的)(Rim 等,2025)。

时间码给帧编号;它不说明曝光落在帧内的什么位置。SMPTE 时间码一节讲了它的限制。

一种更便宜的模式是把 USB 腕戴相机插到录制头部视角的那部手机或那台头显上。EgoKit(Yu 等,2026)在一部 Android 手机、一台 Quest 3 和一台 PICO 4 Ultra 上这样做。录制结果放进一个录制时段文件夹,“with per-camera MP4 files and a log.txt listing per-frame timestamps for post-hoc alignment”(意为:其中有每台相机各自的 MP4 文件,以及一个 log.txt,列出每帧的时间戳,供事后对齐)。

这些相机共用的只有主机的时钟,用来记录它们的到达时间,而且它们以不同的速率运行。在 EgoKit 的测量中,USB 腕戴相机约为 27.4 fps,Quest 3 头部相机为 59.42 fps,PICO 4 Ultra 头部相机为 89.31 fps。作者把时间同步列为有待解决的工作:“precise time synchronization, which deserves further investigation. One simple workaround for the current version is to let the three cameras simultaneously capture a millisecond-level timer displayed on a webpage”(意为:精确的时间同步,这值得进一步研究。对当前版本,一个简单的变通办法是让三台相机同时拍摄网页上显示的毫秒级计时器)。

操作系统带来更多限制:iOS 不允许同时驱动内置相机和一台 USB 相机,所以 EgoKit 给 iPhone 配了第二台录制设备,通过 TCP 套接字启动,而对这个变体,“No NTP synchronization is performed”(意为:不执行 NTP 同步)。

到达时间戳带有 USB 和操作系统的抖动(见延迟与抖动),所以如果亚帧级的时间精度有影响,这种模式需要对照一个视觉事件做检查。

无法连线的设备仍然可以交换时间。

  • Project Aria TICSync(Gen 1) 在眼镜之间通过 Wi-Fi 运行;细节见下文。Meta 报告 “better than 1ms on average after approximately 45 seconds warm-up”(意为:在大约 45 秒的预热之后,平均优于 1ms)(About TICSync)。
  • Project Aria SubGHz(Gen 2) 使用无线电广播;细节见下文。
  • EgoGuide 通过 UDP 把一台头显和一个手持夹爪配对:头显以 72 Hz 把它的图像和位姿流式传送给夹爪上的一台 Raspberry Pi,后者以 20 Hz 采集腕部相机和夹爪开口宽度,并把每个样本与时间最接近的头显时间戳配对。作者报告 “cross-modality synchronization within 20 ms (less than camera exposure time) and end-to-end workstation latency within 100 ms”(意为:跨模态同步在 20 ms 以内(小于相机曝光时间),端到端的工作站延迟在 100 ms 以内)(Xu 等,2026)。
  • HoMMI 使用三部 iPhone,一部在帽子上,两部在夹爪上,并使用 Apple 的 “ARKit multi‑device collaboration to establish a shared coordinate frame across phones”(意为:ARKit 多设备协作,在各手机之间建立共用的坐标系),三部手机都以 60 Hz 录制视频、深度、位姿和夹爪开口宽度(Xu 等,2026)。
  • MultiEgo 录制五个佩戴消费级 AR 眼镜的人。一部手机充当 Wi-Fi 热点服务器,广播开始和停止;作者称 “all clients initiate data acquisition within several microseconds”(意为:所有客户端在几微秒之内开始数据采集)(Li 等,2025)。论文没有给出对这种开始对齐的独立测量。

网络同步对齐的是时钟或开始命令,不是曝光;时钟已同步的两台相机,曝光仍然可能相差最多半帧(见“同步”的两种含义)。

当设备之间既没有连线也没有共同的协议时,每台相机可以拍摄同一个事件,事后再把各段录制对齐。在开始和结束各做一个事件,就能同时得到偏移和漂移(见一个同步点不够)。

  • MV-UMI 把一台腕部 GoPro 与一台连续录制的房间深度相机配对。“Each recording session starts with the human operator scanning a code using the wrist-camera (done per environment, not episode)”(意为:每次录制时段开始时,由操作员用腕部相机扫描一个码(每个环境做一次,不是每个回合做一次)),之后每个腕部帧 “matched to the processed overhead frame in the closest time”(意为:与时间最接近的、处理后的俯视帧匹配)(Rayyan 等,2025)。
  • RocSync 把一个 LED 时钟依次展示给每台相机,所以相机从来不需要在同一时刻看到它。它被用于 “using more than 25 cameras”(意为:使用超过 25 台相机)的手术录制,其中包括头戴的 Aria 眼镜、GoPro、iPhone 和一台红外跟踪器;“Out of 73 total recordings, only one instance failed synchronization”(意为:在总共 73 段录制中,只有一例同步失败),而那次失败的原因是 “to frame drops in the recordings from the Aria glasses”(意为:Aria 眼镜的录制中出现了丢帧)(Meyer 等,2025)。这块电路板及其解码见二维码、LED 与闪光同步。
  • Ego-Exo4D 使用了一段二维码视频;接下来完整推演它。

Ego-Exo4D 如何同步 Aria 眼镜和房间里的 GoPro

Section titled “Ego-Exo4D 如何同步 Aria 眼镜和房间里的 GoPro”

Ego-Exo4D 在 5,035 次录制(take)中录了 1,286 小时的视频,每次录制都把一位 Aria 佩戴者与 “multiple (4-5) exocentric videos from tripods placed around the camera wearer”(意为:多段(4-5 段)第三人称视频,它们来自架设在相机佩戴者周围的三脚架)配在一起(Grauman 等,2024)。

为什么不用时间码。团队 “explored and disqualified other sync options—notably using Timecode with TentacleSync or Ultrasync. Both of these solutions use LTC to encode a 1fps timestamp into the audio channel of a connected device.”(意为:探索并排除了其他同步方案,主要是配合 TentacleSync 或 Ultrasync 使用时间码。这两种方案都用 LTC 把 1fps 的时间戳编码到所连接设备的音频通道中。)那样会让 GoPro 失去立体声音频,而且 “We additionally lacked an ergonomic input solution for Aria to use while recording”(意为:此外,我们也缺少一种便于 Aria 在录制时使用的输入方案)。

二维码视频。“We employ a pre-rendered sequence of QR Codes ( i.e. , QR code video) that encode a wall-clock time. We show this QR code video using the smartphone at 29fps to all cameras in sequence and exploit the difference in frame rates to finely sync the cameras.”(意为:我们使用一段预先渲染好的二维码序列(即二维码视频),其中编码了挂钟时间。我们用智能手机以 29fps 把这段二维码视频依次展示给所有相机,并利用帧率之差对相机做精细同步。)录制流程是在开始录制之后,把二维码视频先展示给 Aria 的 RGB 相机,再展示给每台 GoPro,并在结束时、停止录制之前再做一遍。另有单独的 “Take Separator”(意为:录制分隔符)二维码,展示给一台 GoPro,用来标记每次录制的开始和结束位置。

为什么是 29 fps。每个码在屏幕上停留 1/29 s = 34.48 ms。如果一台相机在连续几帧中看到同一个码,这些帧的曝光中心就都落在那个 34.48 ms 的窗口之内,这比单独一帧能更紧地确定相机的时间:

相机 帧周期 看到同一个码的连续帧数 剩余窗口 定位精度
Aria RGB,30 fps 33.33 ms 2(相隔 1 个周期) 34.48 − 33.33 = 1.15 ms ±0.574 ms
GoPro,“59fps”(59.94 fps) 16.68 ms 3(相隔 2 个周期) 34.48 − 33.37 = 1.12 ms ±0.558 ms

论文给出了这两个数字:±0.574 ms 对应 “with two consecutive frames with the same QRs”(意为:有两个连续帧显示相同的二维码),±0.558 ms 对应 “for the 59fps GoPros given 3 consecutive frames”(意为:对 59fps 的 GoPro,在有 3 个连续帧的情况下)。GoPro 的这个数字只有按 59.94 fps 才算得出来;如果正好是 59 fps,它会是 ±0.29 ms。这些是理论界限,假定手机每秒正好显示 29 帧,并且相机的曝光间隔均匀。

验证了什么。“We manually verified that each GoPro camera was within 1 frame (+-16.66ms) of the Aria RGB camera by visually comparing them at single-frame moments (e.g., contact frames) using a synced video collage at the start and end of each capture.”(意为:我们在每次采集的开始和结束,用同步后的视频拼贴画面,在单帧时刻(例如接触帧)对它们做目视比较,人工验证了每台 GoPro 相机与 Aria RGB 相机相差在 1 帧(+-16.66ms)以内。)

哪些失败了。约 70% 的采集 “yielded frame-accurate sync through our automated pipeline.”(意为:通过我们的自动化流程得到了帧级精确的同步。)观察到的原因是 “phone changing orientation mid-playback”(意为:手机在播放中途改变了朝向)和 “video playback interruptions”(意为:视频播放中断);怀疑的原因是 “videos not playing back at precisely 29fps”(意为:视频没有精确地以 29fps 播放)和 “center exposure times not being evenly spaced”(意为:曝光中心时刻的间隔不均匀)。其余约 30% 是靠人工恢复的,依据是 “precisely time-localizable events, e.g. , a lighter first sparking, a soccer ball making contact with a cleat, or a hand beginning a fast slide down the neck of a guitar”(意为:可以在时间上精确定位的事件,例如打火机第一次打出火花、足球与球鞋接触,或者一只手开始沿吉他琴颈快速下滑),“at the cost of less accurate sync”(意为:代价是同步精度较低)。开始和结束时还播放了一段音频指纹,“but has not been used”(意为:但没有被使用)。

对任何二维码方案的教训:要准备好备用手段,并且无论如何都在两端各录一个清晰的视觉事件。

对齐录制好的文件是一个问题。运行机器人策略是另一个问题:在推理时,相机帧和机器人状态以不同的延时到达计算机。UMI 的作者这样描述这个问题:“Policies unaware of these latency discrepancies will encounter out-of-distribution input and in turn, generate out-of-sync actions”(意为:不知道这些延迟差异的策略会遇到分布外的输入,进而产生不同步的动作)(Chi 等,2024)。

  • UMI 测量相机延迟的方法是拍摄 “a rolling QR code on the computer monitor that displays the current system timestamp for each video frame”(意为:电脑显示器上的滚动二维码,它为每个视频帧显示当前的系统时间戳),然后从每帧的到达时间中减去解码出的时间和已知的显示延时。其他数据流被插值到每幅图像的采集时间。对两个夹爪,UMI 先用手机上的滚动二维码设置两台 GoPro 的时钟(““GoPro Labs” experimental firmware recognizes the global timestamp encoded in the QR code and calibrates its internal clock”,意为:“GoPro Labs”实验性固件识别二维码中编码的全局时间戳,并校准其内部时钟;给出的精度为 ±1/60 s),然后把两台相机的最近邻帧配对,它说这样最多相差 1/60 s。
  • DexUMI 测量 “the iPhone and OAK camera latency by reading a rolling QR code displayed on a computer monitor showing the current computer system time, as proposed in UMI”(意为:iPhone 和 OAK 相机的延迟,方法是读取电脑显示器上显示当前计算机系统时间的滚动二维码,如 UMI 所提出的那样),并把每个样本的采集时间算作到达时间减去该传感器的延迟(Xu 等,2025)。
  • HoMMI “corrects each camera stream by a measured latency, and then uses the latest camera timestamp as the anchor. Proprioception is interpolated to these anchor timestamps”(意为:按实测延迟校正每一路相机数据流,然后以最晚的相机时间戳作为锚点。本体感知数据被插值到这些锚点时间戳上)(Xu 等,2026)。

Aria 眼镜是研究设备,是一个入门起点,而不是采集设备当前的形态,但许多公开数据集使用它们。Meta 的教程概括道:这种眼镜提供的数据 “temporally aligned to a shared, device-time domain for each single device, and also provide multi-device Time Alignment using SubGHz signals (Aria Gen2), TICSync (Aria Gen1), or TimeCode signals (Aria Gen1)”(意为:对每台单独的设备,在时间上对齐到一个共用的设备时间域,并且还通过 SubGHz 信号(Aria Gen2)、TICSync(Aria Gen1)或 TimeCode 信号(Aria Gen1)提供多设备时间对齐)(Aria Gen 2 时间对齐教程)。

每个时间戳都属于一个 TimeDomain,并且 “Timestamps from different TimeDomains are not directly comparable”(意为:来自不同 TimeDomain 的时间戳不能直接比较)。

TimeDomain 教程怎么说
DEVICE_TIME 推荐。“Capture time in device’s time domain. Accurate and reliable. All sensors on the same Aria device share the same device time domain.”(意为:设备时间域中的采集时间。准确可靠。同一台 Aria 设备上的所有传感器共用同一个设备时间域。)
RECORD_TIME “Timestamps stored in the index of VRS files”(意为:存储在 VRS 文件索引中的时间戳)。要准确,请用 DEVICE_TIME。
HOST_TIME “Timestamps when sensor data is saved to the device (not when captured). Should not be needed for any purpose”(意为:传感器数据被保存到设备时的时间戳(不是采集时的)。应该在任何用途下都不需要)
SUBGHZ、UTC、TIME_CODE、TIC_SYNC 多设备对齐选项:SubGHz 用于 Gen 2,时间码和 TICSync 用于 Gen 1。

数据用 get_<SENSOR>_data_by_time_ns() 和一个 TimeQueryOptions 值来查询:BEFORE(默认值,查询时间当时或之前的最后一个样本)、AFTER 或 CLOSEST。

TICSync 是 Harrison 和 Newman (2011) 提出的算法,它根据双向交换估计 “clock offset and skew”(意为:时钟偏移和偏斜),并记录三元组 “(hostRequestTime, deviceTime, hostReceiveTime)”(意为:(主机请求时间,设备时间,主机接收时间))(About TICSync)。在 Aria 上,“one pair of glasses (server) acts as a Wi-Fi access point that forms a network between all glasses.”(意为:一副眼镜(服务器)充当 Wi-Fi 接入点,在所有眼镜之间组成一个网络。)

Meta 的 TICSync 示例在所有眼镜都插着线的时候用 python -m ticsync_recording(可选 --server <serial> <profile> 和 --client <serial> <profile>)开始录制,之后用 python -m ticsync_cleanup 把它们恢复原状。示例中有两点提醒:“Recording profiles 0, 2, 10, 19, 25 and 27 have wifiScanModeActive enabled, so they can’t be used to create TICSync recordings”(意为:录制配置 0、2、10、19、25 和 27 启用了 wifiScanModeActive,所以不能用来创建 TICSync 录制),以及 “It may take ~40 seconds for the ticsync algorithm to reach stabilization between all devices”(意为:ticsync 算法在所有设备之间达到稳定可能需要约 40 秒),所以要等脚本报告设备就绪之后再拔线。

在 Aria 试点数据集中,彼此相距 100 m 以内的设备 “can leverage SMPTE timecode to receive a synchronized time clock with sub-millisecond accuracy”(意为:可以利用 SMPTE 时间码获得亚毫秒精度的同步时钟)(Aria 试点数据时间戳)。每个序列都存有 synchronization/timestamp_mapping.csv,其中有两列,deviceTimestampNs 和 syncedTimestampNs,两者都单调递增。要转换一个时间戳,先找到最近的 deviceTimestampNs,求出它与对应的 syncedTimestampNs 之差,再加上这个偏移。

“One pair of glasses acts as the host device, that actively broadcasts SubGHz signals to a specified channel; all other glasses act as client devices, that receives the SubGHz signals, and record a new Time Domain Mapping data streams in their VRS file. It is essentially a timestamp hash mapping from host DEVICE_TIME -> client DEVICE_TIME. Therefore this mapping data stream only exists in client VRS, but not host VRS”(意为:一副眼镜充当主机设备,主动向指定信道广播 SubGHz 信号;其他所有眼镜充当客户端设备,接收 SubGHz 信号,并在各自的 VRS 文件中记录一路新的时间域映射数据流。它本质上是一个从主机 DEVICE_TIME 到客户端 DEVICE_TIME 的时间戳哈希映射。因此这路映射数据流只存在于客户端的 VRS 中,不存在于主机的 VRS 中)(Aria Gen 2 时间对齐教程)。

在客户端的数据提供器(data provider)上,可以用 convert_from_synctime_to_device_time_ns(timestamp, TimeSyncMode.SUBGHZ) 转换主机时间戳,也可以直接用主机的时间戳和 time_domain=TimeDomain.SUBGHZ 查询客户端。

教程没有给出精度数字。Meta 的 Aria Gen 2 Pilot Dataset 论文描述了 “Sub-GHz radio technology for sub-millisecond device time alignment”(意为:用于亚毫秒级设备时间对齐的 Sub-GHz 无线电技术)(Kong 等,2025)。无论如何,相机并没有曝光同步:“the host and client devices’ RGB cameras are NOT trigger aligned by nature.”(意为:主机设备和客户端设备的 RGB 相机本来就不是触发对齐的。)

每条提示词要的都是你能检查的代码;先读输出,再决定是否相信它。

写一个使用 projectaria_tools 的 Python 脚本,打开用 SubGHz 时间对齐录制的一个主机
(host)和一个客户端(client)Aria Gen 2 VRS 录制文件。对主机录制中的每一个 RGB 帧
(TimeDomain.DEVICE_TIME),用
get_image_data_by_time_ns(..., time_domain=TimeDomain.SUBGHZ,
time_query_options=TimeQueryOptions.CLOSEST) 查询客户端的 RGB 数据流。用
convert_from_device_time_to_synctime_ns(..., TimeSyncMode.SUBGHZ) 把客户端帧的
capture_timestamp_ns 转换回主机时间,并记录差值。报告差值的分布并画图。在注释中
说明:最多半个帧周期的差值是预期之中的,因为不同眼镜上的相机不是触发对齐的。

解码 29 fps 的二维码视频并拟合偏移和漂移

Section titled “解码 29 fps 的二维码视频并拟合偏移和漂移”
写一个 Python 脚本,解码一段二维码视频(每个码编码一个以毫秒计的挂钟时间,以每秒
29 个码的速度显示),这段视频由多台相机在一次采集的开始附近和结束附近拍摄。对每台
相机:用 PyAV 读取每一帧的显示时间戳(presentation timestamp),用 OpenCV 解码
二维码,并把显示同一个码的连续帧分为一组。对每个含 n 帧的组,取该码的显示窗口
(1/29 s)和相机的帧周期,估计该码出现时的相机时间。用开始和结束处的读数,以鲁棒
拟合方法拟合 code_time = a * frame_time + b,并报告以 ms 计的 b、以 ppm 计的
(a - 1)、残差,以及两端各有多少个读数。如果某一端没有读数,或者各码之间的间隔不
接近 34.48 ms(说明手机没有以 29 fps 播放),发出警告。