base.py 文件源码

python
阅读 16 收藏 0 点赞 0 评论 0

项目:needybot-core 作者: needybot 项目源码 文件源码
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
            )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号