run_tbot_routine.py 文件源码

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

项目:tbotnav 作者: patilnabhi 项目源码 文件源码
def __init__(self):
        self.node_name = "move_tbot"
        rospy.init_node(self.node_name)

        rospy.on_shutdown(self._shutdown)

        self.bridge = CvBridge()
        self.turn = Twist()
        self.move = GoToPose()
        # self.face_recog_file = FaceRecognition()
        # self.get_person_data = GetPersonData()
        self.qr_data = []
        self.all_face_names = []
        self.face_names = []
        self.counter = 0

        self.qr_sub = rospy.Subscriber('ar_pose_marker', AlvarMarkers, self.qr_callback)
        self.odom_sub = rospy.Subscriber('odom', Odometry, self.odom_callback)
        self.num_fingers_sub = rospy.Subscriber('num_fingers', Int32, self.num_fingers_callback)
        # self.hand_img_sub = rospy.Subscriber('hand_img', Image, self.hand_img_callback)
        # self.face_img_sub = rospy.Subscriber('face_img', Image, self.face_img_callback)
        self.face_name_sub = rospy.Subscriber('face_names', StringArray, self.face_names_callback)
        self.all_face_names_sub = rospy.Subscriber('all_face_names', StringArray, self.all_face_names_callback)

        self.turn_pub = rospy.Publisher('cmd_vel_mux/input/navi', Twist, queue_size=10)
        self.rate = rospy.Rate(10)

        while not rospy.is_shutdown():
            self.run_tbot_routine()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号