def update_step_timer(self, step):
"""
Helper method that shuts the current step timer down, then recreates
the step timer for the next step in the task.
If the step timeout is zero, do not create a new timeout; otherwise
create a new timer using the timeout value.
Args:
step (dict): the dictionary object representing the task step.
"""
if self.step_timer and self.step_timer.is_alive():
self.step_timer.shutdown()
if not self.active:
return
if step and step.timeout > 0:
self.step_timer = rospy.Timer(
rospy.Duration(step.timeout),
self.step_to_handler,
oneshot=True
)
评论列表
文章目录