Comments (12)
Hi @yipliu, are you running this on linux? Could you check whether you can start the simulator using this command
from simulation.unity_simulator import comm_unity
comm = comm_unity.UnityCommunication(file_name=file_name, port=8092, no_graphics=True)
comm.reset()
What do you mean when you say that you can start communication manually? The issue that you point to generally happens when the port is already in use, or is not available due to permission issues, so another thing you could try is changing the port.
from watch_and_help.
Hi @xavierpuigf,
system: ubuntu20.04
run your showed code:
SystemExit
An exception has occurred, use %tb to see the full traceback
I have tried three ports
Manually
- I firstly run ./linux_exec.v2.2.4.x86_64 -batchmode in terminal
- Then, I run
comm=comm_unity.UnityCommunication()
- This is what I say I can start communication manually.
from watch_and_help.
Thanks for the information. When you run the code manually, can you run comm.reset()
or does it halt? There should not be much difference between manual and automatic, so if you can run comm.reset()
without issues, it should not be too hard to check what is missing in the automatic model.
Could you check that you can do comm.reset() on this manual mode, and then if you can do the following:
from simulation.unity_simulator import comm_unity
comm = comm_unity.UnityCommunication(file_name=file_name, port=8092, no_graphics=True)
comm.reset()
from watch_and_help.
Hi @xavierpuigf,
First Question
I can run comm.reset() when I run this manually. In manual mode, everything goes right.
Seconde Question
I can not run those codes in automatic mode correctly. This time I get the same issue as I showed before. BTW, I have some information to confirm with you.
- First, does the file_name is the path of linux_exe.v2.2.4.x86_64. I give an absolute path in my experience.
- In automatic mode, we do not have to run linux_exe.v2.2.4.x86_64 in the terminal.
- When I run this in automatic mode, I get the following information
- '/home/..../virtualhome-master/simulation/linux_exec.v2.2.4.x84_64' (I put linux_exe.v2.2.4.x86_64 file in the simulation
- -batchmode, -nographics, http-port=8092, logFile=/home/../../Player_8092.log
It took me 310.3s to get the error information. The error happened in comm_unity.py
if not succeeded:
sys.exit()
from watch_and_help.
- Absolute path should be alright
- Correct, in absolute mode you dont need to run anything else on the terminal
- The commands you point to seem correct, though http-port and logfile, should also have a
-
before the argument.
The error you see at the end is because the connection is not succeeding. Could you try to run the automatic mode again, and in a separate terminal window run
ps -aux | grep linux_exec.v2.2.4.x84_64
When you run comm_unity, it should start a process with the linux_exec. If the process is there, could you copy the output of the the command above? I would then try to run that same command manually, and see if there are any issues.
from watch_and_help.
Hi @xavierpuigf
Here is the output
myname 4511 0.0 0.0 17704 2924 pts/0 s+ 17:21 0:00 grep --color=auto linux_exec.v2.2.4.x86_64
Does everyone succeed except me?
BTW, I run the comm_unity code in VScode Jupyter.
from watch_and_help.
From your output, it seems like the executable is actually never being run, or it crashes immediately. There should be another process corresponding to the unity executable. The unity executable is initiated here:
Could you check whether you ever enter this line, and what is the value of subprocess_args
?
from watch_and_help.
- The value of subprocess_args(list) is the following:
0: '/home/myname/paper_code/CVPR/v2/virtualhome-master/simulation/linux_exec.v2.2.4.x86_64
1: -batchmode
2: -nographics
3: -http-port=8092
4: -logFile: /home/myname/paper_code/CVPR/v2/virtualhome-master/Player_8092.log
- Yes, I'm sure I have entered L173
When I debug code in L90, the error occurred
Sorry for my poor programming skills. If someone but me can run the code, I will close the issue.
from watch_and_help.
No worries! It is probably a small issue.
From what you describe, there is either an error with running the executable with this arguments, or an error with running the subprocess.Popen
command. When you run comm_unity
, there should be a newly created file called port_8092.txt
.
Does that file exist? Could you check the contents? It would be useful to understand if the unity executable is started and crashes, or it is just never started.
from watch_and_help.
There is a log file, the following is some information that I think important
Found path: xxx/simulation/linux_exec.v2.2.4.x86_64
Mono path[0]: xxx/..../linux_exec.v2.2.4_Data/Manged
Mono config path: xxx/.../xx/MonoBleedingEdge/etc
Can't get home directory!
(Filename: Line: 409)
Unable to load player prefs
Can't get home directory!
(Filename: Line: 409)
Unable to synchronize player prefs
from watch_and_help.
I see! It seems to be some permission issue, root is trying to run the unity executable (since you called it using a subprocess.Popen) and unity does not allow it. I haven't run into this issue but it seems other people may have:
https://forum.unity.com/threads/cant-get-home-directory.923927/
Could you maybe try to change the permissions of the unity executable?
from watch_and_help.
Thank you very much for your help!
I have run chmod 777 * -R before, but it can not work.
However, it doesn't matter much to me, if this is an issue of Unity community. I can use the manual mode to get my datasets.
BTW, your work makes a big difference to students like me who do not have the capacity to create such a platform. Thanks for your contribution.
from watch_and_help.
Related Issues (8)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from watch_and_help.