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
评论列表
文章目录