Skip to content

Commit

Permalink
Revert fix to TurntableCalibration.py
Browse files Browse the repository at this point in the history
  • Loading branch information
drewsipher committed Feb 6, 2025
1 parent 0ca8d4a commit 90d0bcb
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions three/examples/turntableCalibration.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,27 +83,27 @@ def OnBuffer(bufferObject, buffer:bytes):
scanner = Scanner(OnTask=OnTask, OnMessage=None, OnBuffer=OnBuffer)
scanner.Connect("ws://matterandform.local:8081")

# # Start the video
# scanner.start_video()

# # Detect the calibration card
# print('******* Detecting the calibration card')
# scanner.detect_calibration_card(3) # left camera only, 2 = Right camera only, 3 = Both cameras

# # Wait for the calibration card to be detected
# print('Waiting for the calibration card to be detected')
# timeout = time.time() + 10 # 10 seconds from now
# while cornersTotal == 0 and time.time() < timeout:
# time.sleep(0.1)
# if cornersTotal == 0:
# print("Timeout: Calibration card not detected within 10 seconds")

# # Detect the calibration card for 5sec
# time.sleep(5)

# # Stop the video
# scanner.detect_calibration_card(0) # Stop the detection
# scanner.stop_video()
# Start the video
scanner.start_video()

# Detect the calibration card
print('******* Detecting the calibration card')
scanner.detect_calibration_card(3) # left camera only, 2 = Right camera only, 3 = Both cameras

# Wait for the calibration card to be detected
print('Waiting for the calibration card to be detected')
timeout = time.time() + 10 # 10 seconds from now
while cornersTotal == 0 and time.time() < timeout:
time.sleep(0.1)
if cornersTotal == 0:
print("Timeout: Calibration card not detected within 10 seconds")

# Detect the calibration card for 5sec
time.sleep(5)

# Stop the video
scanner.detect_calibration_card(0) # Stop the detection
scanner.stop_video()

# Calibration the turntable
print('\n******* Calibrating the turntable')
Expand Down

0 comments on commit 90d0bcb

Please sign in to comment.