Closed sunchongren closed 2 years ago
Hi @sunchongren It looks like this execution path only occurs if the try
block fails to execute. You should be able to see what the exception was by including
except Exception as e:
print(e)
between the try
and finally
in DReyeVR_AI.py
:139.
The exception should be informative as to why the block failed to run and led to the finally
block.
Oh yeah the error message is:
RuntimeError: time-out of 10000ms while waiting for the simulator, make sure the simulator is ready and connected to 127.0.0.1:2000
This means that the client did connect to the simulator in time. Do you have the simulator running simultaneously?
However, the server side is already started if I understand it right by excuting
./CarlaUE4.exe
Right, you start the server by running the CarlaUE4.exe
executable (and you run it in vr with -vr
flag). As long as the server is running, I'm not sure why you are getting this client connection error. Can you give me some more information:
client.set_timeout(x)
)?127.0.0.1:2000
? this might be the case if you have lingering instances of CarlaUE4.exe running but frozen.
Task Manager
-> Details
and end the CarlaUE4.exe processHey Gustavo, for the questions above:
CarlaUE4-shipping.exe
running on another unrelated port
Interesting, ok you should kill all other instances of CarlaUE4 and continue from there.
Have you tried rebooting your system then trying again?
Hi! I had this issue initially too; rebooting solved it.
Rebooting didnt solve the problem. A interesting thing I noticed is that when I run python on wsl, none of python file works. However, when I use cmd prompt, some python scripts worked (dynamic_weather, DReyeVR-AI), and some not (generate_veicle, manual_control)
So I think the possible reason is I used wsl?
But something I am confused about is, after make package
for DReyeVR, is some python script disabled?
Right, sorry for any confusion, but yes you are expected to use windows python python.exe
rather than linux python python
(bash/WSL) for the CARLA interactions (assuming you are using Windows as your host for DReyeVR).
The main reason we use WSL is to clone the repo and install the files over the CARLA installation. Then you can do everything in cmd prompt.
There should not be python scripts disabled for make package
? Can you be more specific on what's going on?
I am using python script in path carla\Build\UE4Carla\0.9.13-1-g8854804f4-dirty\WindowsNoEditor\PythonAPI\examples\
.
I did some experiments, and here are python script not successfully running: vehicle_physics.py
, vehicle_gallery.py
, tutorial.py
, schematic_mode.py
, manual_control.py
,
For generate_traffic.py
:
Thanks for the insight! Most of those scripts you posted have not been extensively tested by us so we don't support them (mostly those that spawn their own ego-vehicle, such as vehicle_physics, gallery, and manual control)
However, the schematic_mode.py
script should work. Can you provide more details with the failure for this script?
In total we have tested and verified these scripts work:
start_recording.py
(starts recording a session)
start_replaying.py
(starts replaying a session)
show_recorder_file_info.py
(converts the binary recordings to a human readable format)
DReyeVR_AI.py
(enables the traffic-manager for DReyeVR autopilot)
DReyeVR_logging.py
(prints all the eye tracker data to screen, or logs to ros if using rospy)
schematic_mode.py
(wrapper over no_rendering_mode
to draw ego vehicle)
dynamic_weather.py
(changes the weather)
Thank you so much Gustavo, then I think my problem solved.
For the failure of schematic_mode.py
:
Ah okay, sounds like a duplicate of #12 and I believe the solution has to do with you needing to rebuild the PythonAPI.
To do this run make PythonAPI
in the Carla folder (this will build the DReyeVR-compatible version of the PythonAPI)
Thanks!
@GustavoSilvera It is still not working. Trying to search more possible reasons
Every time I tried to make PythonAPI
and make package
,
This error occurs, but it seems the build is succeed.
Hmm, try cleaning everything and removing the old .egg
from the original PythonAPI build. Then you should be able to rebuild PythonAPI without errors. Can you upload a build log?
What do you mean clean everything @GustavoSilvera
try make clean
Unfortunately schematic_mode.py
is still not working. Will try more things tommorow
But the interesting thing is no_rendering_mode.py
do work
And the other thing I don't understand is for the error: Assertion failed: px != 0, file C:\workspace\carla\Build\boost-1.72.0-install\include\boost/smart_ptr/shared_ptr.hpp, line 734
. The address in C:\ is even not exist.
Interesting. Not sure why this is happening. Would be happy to look at logs. I've also never seen this path before, but maybe its part of some cache in an earlier build that wasn't cleaned?
start_recording
Every time I tried to
make PythonAPI
andmake package
, This error occurs, but it seems the build is succeed.
I got this error when trying to build carla. 1.) Ensure that "wheel" is installed. You can do "pip install wheel" if it's not installed. 2.) Check to ensure that the "wheel" installation path is added to PYTHONPATH in your environment variables. Check "wheel" installation path by running "pip show wheel".
You are absolutely correct. Thanks! @GustavoSilvera The problem solved by reinstall wheel.
@sunchongren Do you have any more updates with this issue? We included some related help in our F.A.Q page.
Yes it is solved. Thanks.
I encountered another question after I start the application from the path
E:\carla\Build\UE4Carla\0.9.13-1-g8854804f4-dirty\WindowsNoEditor
The error occurs when I want to run any python operation file such as DReyeVR_AI.py or dynamic_weather.py, it failed. The error code is:
File "DReyeVR_AI.py", line 140, in main ego_vehicle.set_autopilot(False, traffic_manager.get_port()) UnboundLocalError: local variable 'ego_vehicle' referenced before assignment
Any possible reason for this?