find_cylinder_state.py 文件源码

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

项目:master_robot_strage 作者: nwpu-basketball-robot 项目源码 文件源码
def get_cylinder_status(self):
        self.cylinder_laser_client.wait_for_service()
        self.cylinder_opencv_client.wait_for_service()
        flag = 0
        r = rospy.Rate(2)
        while not rospy.is_shutdown() and flag != 1:
            res_opencv = self.cylinder_opencv_client()
            res_laser = self.cylinder_laser_client()
            x_laser = res_laser.x
            theta_laser = res_laser.theta
            theta_opencv = res_opencv.theta
            if abs(theta_laser - theta_opencv) < 0.01:
                flag = 1
                break
            r.sleep()
        return (x_laser,theta_laser)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号