-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
why all the data in .pfm array are 1? #1187
Comments
when I set the pixels_as_float as default, then the depth data is not always '1'responses = client.simGetImages([airsim.ImageRequest("0", airsim.ImageType.DepthPerspective)])
maybe it relates to the decoding of buffer data as floats in simGetImages() |
it should be 144*256 |
the .pfm file is required by the following codes
responses = client.simGetImages([airsim.ImageRequest("0", airsim.ImageType.DepthPerspective, True)])
for idx, response in enumerate(responses):
filename = os.path.join(tmp_dir, str(idx) + '_' + str(response.image_type))
if response.pixels_as_float:
print("1, Type %d, size %d" % (response.image_type, len(response.image_data_float)))
airsim.write_pfm(os.path.normpath(filename + '.pfm'), airsim.get_pfm_array(response))
then read the .pfm file
The text was updated successfully, but these errors were encountered: