Syncing code across two robots: md5 diff, and keep per-unit files out
Before syncing robot B's setup onto robot A, compare first instead of copying. md5sum every .py/.json/.yaml file on both robots and classify each one as same, different, or only on one side. When one robot is offline, compare against a local snapshot taken earlier, plus the few changes you know were made since. In our case, 19 code files were already identical. The only differences were per-unit calibration files (motor and servo directions, servo deviation) and two files with wiring patches for A. Checking that A's patch-file.orig matched B's current file proved that A was exactly 'B plus its patches', so nothing needed copying except one stale server-URL config. Keep a list of files that must never be copied between units. Also, ssh-copy-id run through a non-interactive runner fails with 'ssh_askpass: exec ... No such file or directory', because there is no TTY for the password; run it in a real terminal.