-
Notifications
You must be signed in to change notification settings - Fork 483
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
test_sandbox_driver attempt #1254
test_sandbox_driver attempt #1254
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some quick comments.
glfw_config = Application.Configuration() | ||
glfw_config.title = "Sandbox App" | ||
glfw_config.size = (args.width, args.height) | ||
gui_app_wrapper = GuiApplication(glfw_config, 30) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should not be necessary to create a GuiApplication for this test.
# init SandboxDriver | ||
sim_input = GuiInput() | ||
driver = SandboxDriver(args, config, gui_input=sim_input) | ||
app_renderer = ReplayGuiAppRenderer( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's probably not appropriate to use ReplayGuiAppRenderer for this test, because it assumes it can render to the "default framebuffer". A better option is probably to create your own replay renderer using create_classic_replay_renderer
.
# 0, app_renderer._sensor_uuid, app_renderer.cam_transform | ||
# ) | ||
# AssertionError: ESP_CHECK failed: Renderer was not created with a background render thread, cannot do async drawing | ||
# app_renderer._replay_renderer.render([mutable_image_view]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once you switch to a standalone replay renderer, you may still his this same error. @0mdc should weigh in as he created these renderers and knows about the various render
methods.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few things could be happening here.
- Make sure that you are using an up-to-date habitat-sim. This error was occurring prior to this fix.
ReplayGuiAppRenderer
is windowed, hence it already has a context. It tries to create a standalone context here. Therefore, it fails. The following solutions could fix this:- Creating path so that
ReplayGuiAppRenderer
can be run in headless mode. - I can add a python binding to copy the framebuffer into an
MutableImageView
. This already exists in the backend. In this case, you would have to callreplay_renderer.render(framebuffer)
, then something likereplay_renderer.copy_color_into(image_views)
.
- Creating path so that
Thank you @eundersander , I have tried like that but I faced with the same error. |
Motivation and Context
This is an attempt to implement SandboxDriver image-based unit test described in this doc.
But following instructions from
BatchReplayRendererTest::testIntegration
as suggested in the docrenderer.render([mutable_image_view])
fails with# AssertionError: ESP_CHECK failed: Renderer was not created with a background render thread, cannot do async drawing
.How Has This Been Tested
Types of changes
Checklist