clvrai / furniture

IKEA Furniture Assembly Environment for Long-Horizon Complex Manipulation Tasks
https://clvrai.com/furniture
MIT License
496 stars 56 forks source link

[Errno 111] Connection refused #27

Closed Jiankai-Sun closed 4 years ago

Jiankai-Sun commented 4 years ago

Hi, First, thank you for sharing this great project.

I have some questions related to python demo_manual.py.

I follow the installation README here step by step (both Installation and virtual-display-on-headless-machines are executed as README). After that, I ran

(furniture) username@cdc-26:~/Program/furniture$ python -m demo_manual --virtual_display :1

The output is

pygame 1.9.6
Hello from the pygame community. https://www.pygame.org/contribute.html
IKEA Furniture Assembly Environment!

Supported robots:

0: Baxter
1: Sawyer
2: Cursor

Choose an agent (enter a number from 0 to 2): 0

Supported furniture:

0: block
1: chair_agne_0007
2: chair_bernhard_0146
3: chair_bertil_0148
4: desk_mikael_1064
5: shelf_ivar_0678
6: shelf_liden_0922
7: swivel_chair_0700
8: table_klubbo_0743
9: table_lack_0825
10: tvunit_0406

Choose a furniture model (enter a number from 0 to 10): 0

Supported backgrounds:

0: Simple
1: Industrial
2: Lab
3: Garage
4: Ambient
5: NightTime
6: Interior

Choose a background (enter a number from 0 to 6): 0

Creating environment (robot: FurnitureBaxterEnv, furniture: block, background: Simple)
The true file name is Furniture
This is the launch string /home/username/Program/furniture/binary/Furniture.x86_64
Unity remote connecting to 1050
now connecting to 1050
[Errno 111] Connection refused
now connecting to 1050
[Errno 111] Connection refused
now connecting to 1050
[Errno 111] Connection refused
now connecting to 1050
[Errno 111] Connection refused

Do you have any suggestion about the [Errno 111] Connection refused? It seems that the MuJoCo-Unity binary are download and extracted to furniture/binary folder correctly. I've tried it on two servers and got the same error.

Thank you.

edwhu commented 4 years ago

Are you using the master branch? And which binary did you download?

Jiankai-Sun commented 4 years ago

Yes, I am using master branch. I use the binary file https://drive.google.com/open?id=1ofnw_zid9zlfkjBLY_gl-CozwLUco2ib, in this README

edwhu commented 4 years ago

Can you check that your X service is running and on :1 port? If it is on another port, you'll have to change it accordingly. You can also look for the unity-log and check the output to see if the unity executable is receiving the connection from the python code.

Jiankai-Sun commented 4 years ago

Because I use headless system echo $DISPLAY output nothing.

(furniture) USERNAME@cdc-26:~/Program/furniture$ echo $DISPLAY

There is no unity-log output. Where can I find the unity-log?

Thank you

edwhu commented 4 years ago

Check if your X process is running. Otherwise, your virtual display is not running and the unity bundle will not be able to render.

You can also try manually setting the DISPLAY variable to :1 before you run the script and see if this helps.

Jiankai-Sun commented 4 years ago

It seems X process is running since after I run sudo /usr/bin/X :1 &

(furniture) USERNAME@cdc-26: sudo /usr/bin/X :1 &
[3] 23046
(furniture) jack@cdc-26:~/Program/furniture$ (EE) 
Fatal server error:
(EE) Server is already active for display 1
        If this server is no longer running, remove /tmp/.X1-lock
        and start again.
(EE) 
(EE) 
Please consult the The X.Org Foundation support 
         at http://wiki.x.org
 for help. 
(EE) 

[3]-  Exit 1                  sudo /usr/bin/X :1

I also manually run

(furniture) username@cdc-26:~/Program/furniture$ export DISPLAY=:1
(furniture) username@cdc-26:~/Program/furniture$ echo $DISPLAY                                                                                                                                                  
:1 

After that, I run python -m demo_manual --virtual_display :1 can same Unity remote connecting to 1050 now connecting to 1050 [Errno 111] Connection refused occurs.

edwhu commented 4 years ago

That is weird. Can you confirm you have the binary folder in the project dir, and inside the binary folder, there is a Furniture.x86_64 binary and Furniture_Data folder?

You can also try rebooting the server, and running X on :0 instead. Then change the argument to :0 and specify DISPLAY to :0

Jiankai-Sun commented 4 years ago

Yes, there is a furniture/binary folder. Inside the binary folder, there is a Furniture.x86_64 and Furniture_Data folder. Should the binary folder be put directly under furniture/ instead of furniture/furniture-unity/ folder?

edwhu commented 4 years ago

Yes, the binary folder should be directly under furniture. It should look like furniture/binary/...