Skip to content
This repository has been archived by the owner on Dec 20, 2024. It is now read-only.

Commit

Permalink
fix: shutdown logic bug
Browse files Browse the repository at this point in the history
  • Loading branch information
hayato-m126 committed Oct 19, 2023
1 parent 34c6465 commit 10d2117
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions driving_log_replayer/driving_log_replayer/evaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,17 +128,17 @@ def timer_cb(
register_shutdown_func: Callable | None = None,
) -> None:
self._current_time = self.get_clock().now().to_msg()
# to debug callback use: self.get_logger().error(f"time: {self.__current_time.sec}.{self.__current_time.nanosec}")
# to debug callback use: self.get_logger().error(f"time: {self._current_time.sec}.{self._current_time.nanosec}")
if self._current_time.sec <= 0:
return
self._prev_time = self._current_time
if register_loop_func is not None:
register_loop_func()
if self._initial_pose is not None:
self.call_initialpose_service()
self._clock_stop_counter = (
self._clock_stop_counter + 1 if self._current_time == self._prev_time else 0
)
self._prev_time = self._current_time
if self._clock_stop_counter >= DLREvaluator.COUNT_SHUTDOWN_NODE:
if register_shutdown_func is not None:
register_shutdown_func()
Expand Down

0 comments on commit 10d2117

Please sign in to comment.