Two drones are in racing. I setup camera images like the following. But only the non fly drone send back FPV images. i want to visualize the flying drone real time tracjetory
I use the following callback function:
def image_callback(self):
# get uncompressed fpv cam image
request = [asim.ImageRequest("fpv_cam", asim.ImageType.Scene, False, False)]
response = self.airsim_client_images.simGetImages(request)
img_rgb_1d = np.fromstring(response[0].image_data_uint8, dtype=np.uint8)
img_rgb = img_rgb_1d.reshape(response[0].height, response[0].width, 3)
cv2.imshow("img_rgb", img_rgb)
cv2.waitKey(1)
