Closed nakane11 closed 9 months ago
it not work on old rospy, check pkg_resources.get_distribution('rospy').version
?? to set reset
?
2023-12-14T15:47:21.7224461Z [jsk_topic_tools:make] Traceback (most recent call last):
2023-12-14T15:47:21.7225009Z
2023-12-14T15:47:21.7225253Z
2023-12-14T15:47:21.7226650Z [jsk_topic_tools:make] File "/github/home/ros/ws_jsk_common/src/jsk_common/jsk_topic_tools/scripts/boolean_node.py", line 102, in <module>
2023-12-14T15:47:21.7227774Z
2023-12-14T15:47:21.7228011Z
2023-12-14T15:47:21.7228714Z [jsk_topic_tools:make] node = BooleanNode()
2023-12-14T15:47:21.7243367Z
2023-12-14T15:47:21.7243376Z
2023-12-14T15:47:21.7243656Z
2023-12-14T15:47:21.7245578Z [jsk_topic_tools:make] File "/github/home/ros/ws_jsk_common/src/jsk_common/jsk_topic_tools/scripts/boolean_node.py", line 69, in __init__
2023-12-14T15:47:21.7246758Z
2023-12-14T15:47:21.7247002Z
2023-12-14T15:47:21.7248045Z [jsk_topic_tools:make] rospy.Timer(rospy.Duration(1.0 / rate), self.timer_cb, reset=reset)
2023-12-14T15:47:21.7248835Z
2023-12-14T15:47:21.7249097Z
2023-12-14T15:47:21.7250384Z [jsk_topic_tools:make] TypeError: __init__() got an unexpected keyword argument 'reset'
Check rospy version and always set reset
to True
when/use_sim_time
is True
This PR avoids
ROSTimeMovedBackwardsException
when boolean_node is running with rosbag with --loop option. rospy/timer.py