Skip to content

Commit

Permalink
Fix log*_throttle with sim time (#2044)
Browse files Browse the repository at this point in the history
* Fix log*_throttle with sim time

When log*_throttle is used with bags or a simulation, logging stops. Solved this problem with resetting logging_time_table when ros time moved backward

* fixed a bug where client loses a log message when rostime goes backward

removed paranthesis
fixed a bug where client loses a log message when rostime goes backward
  • Loading branch information
salihmarangoz authored and jacobperron committed Oct 16, 2020
1 parent b83dad5 commit c8e96b3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions clients/rospy/src/rospy/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,10 @@ def __call__(self, caller_id, period):
(now - last_logging_time) > rospy.Duration(period)):
self.last_logging_time_table[caller_id] = now
return True
elif last_logging_time > now:
self.last_logging_time_table = {}
self.last_logging_time_table[caller_id] = now
return True
return False


Expand Down

0 comments on commit c8e96b3

Please sign in to comment.