Skip to content

Commit

Permalink
check message age
Browse files Browse the repository at this point in the history
  • Loading branch information
robotastic committed Apr 20, 2024
1 parent ab491b9 commit 448356c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions axis-ptz-controller/object.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,13 @@ def recompute_location(self) -> None:
logging.debug(f"Object msg age: {msg_age} [s]")
time_delta += msg_age


if (time_delta < 0.0) or (msg_age < 0.0):
logging.error(
f"Time delta: {time_delta} [s] or msg age: {msg_age} [s] is negative"
)
self.object_lock.release()
return
# Compute position and velocity in the topocentric (ENz)
# coordinate system of the object relative to the tripod at
# time zero, and position at slightly later time one
Expand Down

0 comments on commit 448356c

Please sign in to comment.