-
Notifications
You must be signed in to change notification settings - Fork 426
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
Disable sim sensors when using the batch renderer. #2031
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.
I left some comments. Have a look and try to address, but basically LGTM.
for _sensor_uuid, sensor in agent_sensorsuite.items(): | ||
sensor.draw_observation() | ||
|
||
# Get observations. | ||
for agent_id in agent_ids: |
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.
Can you explain what's going on here? How can we safely call get_observation
if we haven't rendered here? Is this relying on some external code to have already triggered rendering?
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.
When batch rendering, get_observation()
returns None
, creating an empty "placeholder" for this sensor uuid. The batch renderer replaces this value by the rendered data in post_step()
.
This is a bit of a hack as Habitat-Lab has checks to make sure that all sensors are present in observations between reset()
/step()
and post_step()
.
An alternative would be to skip those checks for visual sensors when batch renderer is activated, but I'm afraid that this is more confusing.
I admit that the behavior could be clearer here.
c9f25a9
to
295825c
Compare
Motivation and Context
This change prevents the simulators to allocate sensor memory and render them when using the batch renderer.
How Has This Been Tested
Tested locally from habitat-lab.
Types of changes
Checklist