base.py 文件源码

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

项目:needybot-core 作者: needybot 项目源码 文件源码
def abort(self, req=None):
        """
        Service function for the aborting the task '[name]_abort'.

        handles a shutdown of the task but instead of calling signal_complete,
        this method calls `signal_aborted`, which lets the task server know
        that it can proceed with launching a mayday task (as opposed to queueing
        up another general task).

        Args:
            msg (std_msgs.msg.String): the message received through the
                subscriber channel.
        """
        if not self.active:
            logwarn("Can't abort {} because task isn't active.".format(self.name))
            return False

        self.instruct()
        self.prep_shutdown(did_fail=True)
        return True
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号