From 2fbee23d57d829eb777b6f2234a3beff875f20a8 Mon Sep 17 00:00:00 2001 From: Luke Berndt Date: Mon, 25 Mar 2024 12:35:04 -0400 Subject: [PATCH] use lead time as the tracking_interval --- axis-ptz-controller/axis_ptz_controller.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/axis-ptz-controller/axis_ptz_controller.py b/axis-ptz-controller/axis_ptz_controller.py index ca48c5c..bd35176 100644 --- a/axis-ptz-controller/axis_ptz_controller.py +++ b/axis-ptz-controller/axis_ptz_controller.py @@ -271,6 +271,11 @@ def __init__( self.r_ENz_o_0_t = np.zeros((3,)) self.v_ENz_o_0_t = np.zeros((3,)) + # Position and velocity in the geocentric (XYZ) coordinate + # system of the object relative to the tripod at time zero + self.r_XYZ_o_0_t = np.zeros((3,)) + self.v_XYZ_o_0_t = np.zeros((3,)) + # Distance between the object and the tripod at time one self.distance3d = 0.0 # [m] @@ -290,9 +295,6 @@ def __init__( # to camera fixed (rst) coordinates self.E_XYZ_to_rst = np.zeros((3, 3)) - self.r_XYZ_o_0_t = np.zeros((3,)) - self.v_XYZ_o_0_t = np.zeros((3,)) - # Object pan and tilt rates self.rho_dot_o = 0.0 # [deg/s] self.tau_dot_o = 0.0 # [deg/s] @@ -1382,7 +1384,7 @@ def main(self) -> None: capture_job = schedule.every(self.capture_interval).seconds.do( self._capture_image ) - tracking_interval = 0.25 + tracking_interval = self.lead_time #0.25 update_tracking_time = time() # Enter the main loop