-
Notifications
You must be signed in to change notification settings - Fork 217
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
Images from the Unity window lag by 1 step in versions >= 2.5.0 #538
Comments
This is expected behavior in versions >= 2.4.23! For a bit of background, the servers that communicate between Python and Unity were updated, and this allows all actions to run substantially faster, which is often a preferred trade-off. But, it is of course useful to view and debug the current frame, so here are a few ways to do that:
c.step('Pass')
# setup controller
from ai2thor.controller import Controller
c = Controller()
event = c.step('MoveAhead')
# visualize frame with PIL
from PIL import Image
Image.fromarray(event.frame)
# setup controller
from ai2thor.controller import Controller
c = Controller()
event = c.step('MoveAhead')
# visualize frame with matplotlib
import matplotlib.pyplot as plt
plt.imshow(event.frame)
plt.axis('off')
plt.show() |
mattdeitke
changed the title
Images from the Unity window lag by 1-step in versions >= 2.4.23
Images from the Unity window lag by 1 step in versions >= 2.4.23
Dec 8, 2020
mattdeitke
changed the title
Images from the Unity window lag by 1 step in versions >= 2.4.23
Images from the Unity window lag by 1 step in versions >= 2.5.0
Dec 8, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When opening a controller and running:
the Unity window that opens in the background is always 1-step behind the action!
However, when viewing the actual returned image from the event, it is up to date:
The text was updated successfully, but these errors were encountered: