Skip to main content
Repoch uses timestamps to synchronize data streams from multiple sources. Understanding how synchronization works is important for multi-camera setups and distributed systems.

Multi-client Setup

For distributed systems with multiple processors for different parts of the robot, time synchronization becomes critical.

Unix Timestamps

Repoch uses Unix timestamps (similar to ROS conventions) for cross-system synchronization. This requires:
  • All clients must have synchronized system clocks
  • Use NTP or PTP for clock synchronization across machines
  • The operating system handles clock management
from repoch.utils.timing import get_current_time_us

# All machines should report similar timestamps
current_time_us = get_current_time_us()  # Unix timestamp in microseconds

Clock Synchronization Methods

Network Time Protocol - suitable for most applications:
# Check NTP sync status
timedatectl status

# Force sync
sudo systemctl restart systemd-timesyncd

Microcontrollers

Some devices (like Arduino or ESP32) lack a system clocks. Server-side synchronisation support is coming soon.
Microcontrollers without real-time clocks should rely on the host machine for timestamps. Do not use relative timing from the microcontroller as it will drift over time.

Next Steps

Simulation

Deploy Repoch in Simulation