INNER CODE UNIT · Python
target_size
MIT-SPARK/VGGT-SLAM · main_realtime.py:221
target_size = args.submap_size + args.overlapping_window_size
submap_count = 0
last_status_frame = 0 # for console status throttle when display is off
stop_event = threading.Event()
try:
while True:
if stop_event.is_set():
break
try:
img = camera.capture()
except Exception as e:
print(f"[Camera] Lost connection ({e}). Attempting to reconnect...")
camera = restart_camera(camera, stop_event)
if camera is None: # session cancelled while reconnecting
break
continue