Skip to content

Commit

Permalink
Update axis_ptz_controller.py
Browse files Browse the repository at this point in the history
  • Loading branch information
robotastic committed Mar 28, 2024
1 parent f3adf13 commit bff41b1
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions axis-ptz-controller/axis_ptz_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ def _compute_object_pointing(self, time_since_last_update=0) -> None:

# Assign lead time, computing and adding age of object
# message, if enabled
lead_time = self.tracking_interval # [s] time_since_last_update
lead_time = 0#self.tracking_interval # [s] time_since_last_update
if self.include_age:
object_msg_age = time() - self.timestamp_o #datetime.utcnow().timestamp() - self.timestamp_o # [s]
logging.debug(f"Object msg age: {object_msg_age} [s]")
Expand Down Expand Up @@ -735,14 +735,14 @@ def _track_object(self, time_since_last_update) -> None:
self.v_rst_o_0_t = np.matmul(self.E_XYZ_to_rst, self.v_XYZ_o_0_t)

# Compute object slew rate
omega = (
axis_ptz_utilities.cross(self.r_rst_o_0_t, self.v_rst_o_0_t)
/ axis_ptz_utilities.norm(self.r_rst_o_0_t) ** 2
)
# omega = (
# axis_ptz_utilities.cross(self.r_rst_o_1_t, self.v_rst_o_0_t)
# / axis_ptz_utilities.norm(self.r_rst_o_1_t) ** 2
# axis_ptz_utilities.cross(self.r_rst_o_0_t, self.v_rst_o_0_t)
# / axis_ptz_utilities.norm(self.r_rst_o_0_t) ** 2
# )
omega = (
axis_ptz_utilities.cross(self.r_rst_o_1_t, self.v_rst_o_0_t)
/ axis_ptz_utilities.norm(self.r_rst_o_1_t) ** 2
)
self.rho_dot_o = math.degrees(-omega[2])
self.tau_dot_o = math.degrees(omega[0])
logging.debug(
Expand Down

0 comments on commit bff41b1

Please sign in to comment.