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)
find_cylinder_state.py 文件源码
python
阅读 17
收藏 0
点赞 0
评论 0
评论列表
文章目录