Skip to content

Commit 06de54f

Browse files
committed
calculations of puck scanner orientation reverted
1 parent 2f10933 commit 06de54f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

dls_barcode/geometry/unipuck.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class Unipuck:
1515
TYPE_NAME = "Unipuck"
1616
NUM_SLOTS = Template.NUM_SLOTS
1717

18-
def __init__(self, center, radius, rotation=math.pi/4, feature_center=None, feature_boarder=None):
18+
def __init__(self, center, radius, rotation=0.0, feature_center=None, feature_boarder=None):
1919
# rotation=math.pi/2 - align the read dot of the camera with the screw
2020
""" Determine the puck geometry (position and orientation) for the locations of the
2121
centers of some (or all of the pins).

dls_barcode/geometry/unipuck_calculator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ def _determine_puck_orientation(puck, pin_centers):
109109
original_angle = puck.angle()
110110

111111
# For each angular increment, calculate the sum of squared errors in slot center position
112-
for a in range(-16, 16, 1):
113-
angle = original_angle + a / (180 / math.pi)
112+
for a in range(0, 360, 2):
113+
angle = a / (180 / math.pi)
114114
puck.set_rotation(angle)
115115
sse = 0
116116
for p in pin_centers:

0 commit comments

Comments
 (0)