-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Breakpoint in RenderRequest.cpp while taking Scene Images #4120
Comments
@Gastastrophe |
@crypto-g245 Right now I am just using Depth images instead, though that means I am unable to move forward with my particular project until this is fixed. |
@crypto-g245 This isn't a fix, but a simple workaround is to use the version of the function that returns a bitmap. This means you call `img1d_rgb = np.frombuffer(responses[0].image_data_uint8, dtype=np.uint8)' 'img3d_rgb = img1d_rgb.reshape(responses[0].height, responses[0].width, 3)' 'from PIL import Image' 'image = Image.fromarray(img3d_rgb)' 'im_final = np.array(image.resize((84, 84)).convert("L"))' 'return im_final.reshape([84, 84, 1])` EDIT: I'm not sure why the code thing isn't working, but hopefully it is readable enough |
I noticed people in past issues talking about the image APIs like they return RGBA images, but the bitmap is sized in such a way that implies it is a RGB image. Maybe Unreal changed this at some point and Airsim still needs to reflect this? |
This is occurring due to a mismatch between the pixel format of UTextureRenderTarget2D instances inside scene capture components for each image type and the pixel format expected by the FD3D11DynamicRHI::RHIReadSurfaceFloatData API. I've put out PR #4321 to update the pixel formats. Please retest with my PR applied and let me know if you see any issues. |
@zimmy87 Thank you for the fix! This'll be a great help |
Bug report
What's the issue you encountered?
As I brought up in Issue #3291, when taking lots of Scene images as one would do for Reinforcement Learning, Unreal Engine generates a breakpoint inside of RenderRequest.cpp and crashes the simulator.
Settings
Default settingsHow can the issue be reproduced?
self.image_request = airsim.ImageRequest( 3, airsim.ImageType.DepthPerspective, True, False )
toself.image_request = airsim.ImageRequest( 3, airsim.ImageType.Scene, True, False )
img2d = np.reshape(img1d, (responses[0].height, responses[0].width))
toimg2d = np.reshape(img1d, (responses[0].height, responses[0].width, 3))
return im_final.reshape([84, 84, 1])
toreturn im_final.reshape([84, 84, 3])
Include full error message in text form
UE4Editor-Win64-DebugGame.exe has triggered a breakpoint.
The text was updated successfully, but these errors were encountered: