Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

image_data_float always returns an empty image (i.e. list composed of [0.0]) #2875

Open
rallen10 opened this issue Jul 22, 2020 · 8 comments

Comments

@rallen10
Copy link

rallen10 commented Jul 22, 2020

This seems to be a persistent, unaddressed problem based on other issues dating back more than a year (#2089, #2169, #2665, #1840). The only difference for me is that 1. I am running in Unity, and 2. the image is always empty, therefore the workaround to discard image and grab the next one if it is empty doesn't work for me.

To reproduce:

import airsim
import numpy as np
client = airsim.MultirotorClient(timeout_value = 7200)
client.confirmConnection()
while True:
        response = client.simGetImages([airsim.ImageRequest("1", airsim.ImageType.DepthPerspective, pixels_as_float=True, compress=False)])[0]
        img1d = np.array(response.image_data_float, dtype=np.float)
        if len(img1d) != response.height * response.width:
            print('empty or bad image. Retrying...')
        else:
            print('properly formatted image!')
            break
@rallen10
Copy link
Author

rallen10 commented Jul 23, 2020

I found pull request #2812 from a similar issue: #2811. I tried merging the pull request locally and rebuilding AirSim and the Unity wrapper, but to no effect. Still getting the same problem with an empty image

edit: typo

@chanho-code
Copy link

Same problem in Unity

@weigangwen
Copy link

I encountered the same problem in Unity, did you solve it?

@stale
Copy link

stale bot commented Apr 17, 2022

This issue has been automatically marked as stale because it has not had activity from the community in the last year. It will be closed if no further activity occurs within 20 days.

@stale stale bot added the stale label Apr 17, 2022
@SworterW
Copy link

I also used unity to develop, and found the same problem as yours in the latest airsim version. Have you finally solved it

@stale stale bot removed the stale label Nov 11, 2022
@sandilyasg
Copy link

@SworterW @weigangwen @chanho-code @rallen10 I am also facing the same issue (using Unity), were you able to solve this issue?

@rallen10
Copy link
Author

rallen10 commented Nov 7, 2023

Sorry I haven't looked at this work in years. Honestly can't remember if I found a solution, a workaround, or just abandoned this part of my project all together.

Not very helpful, I know, but figured I shouldn't leave you all hanging

@sandilyasg
Copy link

@rallen10 Thanks for your reply! Are you able to share the github repo of your project?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants