smp_thread.py 文件源码

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

项目:smp_base 作者: x75 项目源码 文件源码
def __init__(self, loop_time = 0.1):
        # super init
        threading.Thread.__init__(self)
        self.name = str(self.__class__).split(".")[-1].replace("'>", "")
        signal.signal(signal.SIGINT, self.shutdown_handler)
        # print self.__class__
        # print "self.name", self.name
        # 20170314: remove this from base smp_thread because is is NOT ros
        # rospy.init_node(self.name, anonymous=True)
        # rospy.init_node(self.name, anonymous=False)
        # initialize pub sub
        self.pub_sub()
        # initialize services
        self.srv()

        self.isrunning = True
        self.cnt_main = 0
        self.loop_time = loop_time
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号