def run(self):
while True:
# Only run loop if we have an image
if self.process:
self.imgprocess.ProcessingImage(self.latestimage) # FormulaPi Image Processing Function
self.AdjustMotorSpeed(self.imgprocess.trackoffset) # Compute Motor Commands From Image Output
# Publish Processed Image
cvImage = self.imgprocess.outputImage
try:
imgmsg = self.bridge.cv2_to_imgmsg(cvImage, "bgr8")
self.image_pub.publish(imgmsg)
except CvBridgeError as e:
print(e)
#cv2.imshow("Image window", self.cvImage)
#cv2.waitKey(3)
评论列表
文章目录