Skip to content

Commit

Permalink
fixed calibration parameters not being read correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
ju1ce committed Mar 14, 2022
1 parent 87c6993 commit 7674107
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bin/inference_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def __init__(self, root, params, *args, **kwargs):
# calibrate rotation
self.calib_rot_var = tk.BooleanVar(value=self.params.calib_rot)
self.calib_flip_var = tk.BooleanVar(value=self.params.flip)
self.rot_y_var = tk.DoubleVar(value=180-self.params.global_rot_y.as_euler('zyx', degrees=True)[1])
self.rot_y_var = tk.DoubleVar(value=self.params.euler_rot_y)

frame1 = tk.Frame(self.root)
frame1.pack()
Expand All @@ -26,8 +26,8 @@ def __init__(self, root, params, *args, **kwargs):

# calibrate tilt
self.calib_tilt_var = tk.BooleanVar(value=self.params.calib_tilt)
self.rot_x_var = tk.DoubleVar(value=self.params.global_rot_x.as_euler('zyx', degrees=True)[2]+90)
self.rot_z_var = tk.DoubleVar(value=self.params.global_rot_z.as_euler('zyx', degrees=True)[0]+180)
self.rot_x_var = tk.DoubleVar(value=self.params.euler_rot_x)
self.rot_z_var = tk.DoubleVar(value=self.params.euler_rot_z)

frame2 = tk.Frame(self.root)
frame2.pack()
Expand Down Expand Up @@ -371,7 +371,7 @@ def autocalibrate(self):

print("Calibrate to value:", value * 57.295779513)

self.params.rot_change_y(value)
self.params.rot_change_y(value * 57.295779513)


#angle = self.params.global_rot_y.as_euler('zyx', degrees=True)
Expand Down

0 comments on commit 7674107

Please sign in to comment.