allenai / allenai/ai2thor

Interactive visualization of Ai2-THOR scenes when running on remote machine (X11 forwarding)

Open
#996 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
1.8k
Forks
296
PR merge metrics
No merged PRs in 30d

Description

I've setup my instance for X11 forwarding and utiltites like xeyes and glxgears work just fine. However, when I try to instantiate an AI2Thor controller, for example by executing this: `controller = Controller(scene="FloorPlan10")`, a white screen pops up and disappear. However, the Unity player doesn't pop up at all. I executed this too: `/home/ubuntu/.ai2thor/releases/thor-Linux64-2cca88de394ff1fa3f85f9ee3585444552059da9/hor-Linux64-2cca88de394ff1fa3f85f9ee3585444552059da9` that resulted in the same result (Unity not coming up).

I would like to point out that this works perfectly when I don't have X11 Forwarding enabled (through `-X` to `-Y`). In fact, the sample script (shared underneath), captures an image from an AI2Thor scene. I am able to FTP it to my local machine and view it.

```
from argparse import ArgumentParser
from ai2thor.controller import Controller
from PIL import Image

def main(size):
controller = Controller(scene='FloorPlan3_physics',
gridSize=0.25, snapToGrid=True,
width=size, height=size,
agentCount=1,
)

event = controller.step(action='MoveAhead')
img = Image.fromarray(controller.last_event.frame)
img.save('temp_' + str(size) + '.png')

if __name__ == '__main__':
arg_parser = ArgumentParser()
arg_parser.add_argument('--size', type=int, default=300)
args = arg_parser.parse_args()
main(args.size)
```

I am using a conda environment having Python 3.8.0. The AI2Thor version I am using is encapsulated in this repo: https://github.com/alexa/teach and I have this result:
`import ai2thor as ai`
`ai.__version__`
`'3.1.0'`

The output from glxinfo | grep version

`debug1: client_input_channel_open: ctype x11 rchan 3 win 65536 max 16384`
`debug1: client_request_x11: request from 127.0.0.1 38584`
`debug1: x11_connect_display: $DISPLAY is launchd`
`debug1: channel 1: new [x11]`
`debug1: confirm x11`
`server glx version string: 1.4`
`client glx version string: 1.4`
`GLX version: 1.4`
`OpenGL version string: 1.4 (2.1 Metal - 76.3)`
`debug1: channel 1: FORCE input drain`

`glxgears` and `xeyes` are running smoothly but I am not able to work with AI2Thor here. Can you please help here? @ekolve

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.