Skip to content
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

Unity Window frozen/blank using quickstart example #1158

Open
garfieldnate opened this issue Sep 6, 2023 · 1 comment
Open

Unity Window frozen/blank using quickstart example #1158

garfieldnate opened this issue Sep 6, 2023 · 1 comment

Comments

@garfieldnate
Copy link

  • Python 3.11.4
  • ai2thor 5.0.0 and 4.3.0
  • Mac M2 (tested both in x86_64 emulation and in regular ARM64 modes)
  • I don't see anything particularly suspicious in Player.log, but I also don't know what to look for specifically

I installed ai2thor with pip3 install ai2thor. Then I ran the example from https://ai2thor.allenai.org/ithor/documentation/initialization:

from ai2thor.controller import Controller

controller = Controller(
    agentMode="default",
    visibilityDistance=1.5,
    scene="FloorPlan212",

    # step sizes
    gridSize=0.25,
    snapToGrid=True,
    rotateStepDegrees=90,

    # image modalities
    renderDepthImage=False,
    renderInstanceSegmentation=False,

    # camera properties
    width=300,
    height=300,
    fieldOfView=90
)

The console showed me that the ai2thor binaries and assets were downloaded:

thor-OSXIntel64-a634e28ea55b149ce5f746f19f45dd6f43e5878b.zip: [|||||||||||||||||||||||| 100%   1.2 MiB/s]  of 534.MB

However, when I created the Controller instance, the Unity window that is opened is blank and completely unresponsive (frozen, with the cursor being the beachball of death):

image

I thought it was curious that the downloaded zip said OSXIntel64, considering I'm using an ARM64, but switching to X86_64 emulation mode did not fix the issue. Downgrading ai2thor from 5.0.0 to 4.3.0 did not fix the issue either.

The really weird thing to me is that I can run the ai2thor application directly (not from Python):

$ /Users/nathanglenn/.ai2thor/releases/thor-OSXIntel64-a634e28ea55b149ce5f746f19f45dd6f43e5878b/thor-OSXIntel64-a634e28ea55b149ce5f746f19f45dd6f43e5878b.app/Contents/MacOS/AI2-THOR

The above command opens a responsive AI2Thor window:

image
@garfieldnate
Copy link
Author

Okay, it turns out that I had not set up the x86 version of Python on my machine correctly. When an ARM64 Python calls executables, they run in ARM64 mode, and ai2thor is only available in x86_64.

Now that I have Python set up correctly, the scene renders. The Unity window is unresponsive and the cursor is always the beachball of death, but I can still control it from Python.

So there are two issues here, which ideally would be fixed but a note in the documentation about known issues/constraints would also be helpful:

  1. ai2thor is only distributed in x86_64, so it must be used from an x86_64 Python. Setting up two Pythons for different architectures is actually a fairly big ask for most users, and it would be much better to have a build for ARM64 available. Otherwise, noting that this architecture is not supported would at least be a heads-up for the next person.
  2. The Unity window that opens is unresponsive. This makes it a bit difficult to work on Mac because the OS wants to hide it behind other windows, and the top menus don't work. To be clear, it's responsive to Python code, just not to the user's cursor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant