lgsvl / simulator

A ROS/ROS2 Multi-robot Simulator for Autonomous Vehicles
Other
2.27k stars 778 forks source link

Crash when launching self-compiled simulator #1293

Open ZiwenWan opened 3 years ago

ZiwenWan commented 3 years ago

Hi LGSVL team, I met some problems when I tried to simulate on a map built by my self. Here are what I did on my Windows machine:

Mono path[0] = 'C:/Users/Ziwen/Simulator/SLR_bicycle/simulator_Data/Managed' Mono config path = 'C:/Users/Ziwen/Simulator/SLR_bicycle/MonoBleedingEdge/etc' Loading player data from C:/Users/Ziwen/Simulator/SLR_bicycle/simulator_Data/data.unity3d Initialize engine version: 2019.3.15f1 (59ff3e03856d) [Subsystems] Discovering subsystems at path C:/Users/Ziwen/Simulator/SLR_bicycle/simulator_Data/UnitySubsystems GfxDevice: creating device client; threaded=1 Direct3D: Version: Direct3D 11.0 [level 11.1] Renderer: NVIDIA GeForce RTX 2060 (ID=0x1f08) Vendor:
VRAM: 5980 MB Driver: 27.21.14.5167 Begin MonoManager ReloadAssembly

  • Completed reload, in 1.066 seconds WARNING: Shader Unsupported: 'HDRP/Lit' - All passes removed WARNING: Shader Did you use #pragma only_renderers and omit this platform? D3D11 device created for Microsoft Media Foundation video decoding. Initializing input.

New input system (experimental) initialized

Input initialized. Initialized touch support. WARNING: Shader Unsupported: 'Shader Graphs/VehicleLightsShader' - All passes removed WARNING: Shader Did you use #pragma only_renderers and omit this platform? WARNING: Shader Unsupported: 'Shader Graphs/CloudGenerator' - All passes removed WARNING: Shader Did you use #pragma only_renderers and omit this platform? UnloadTime: 0.731700 ms Null Sensor Prefab Detected - Check RuntimeSettings SensorPrefabs List for missing Sensor Prefab (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35) Setting up 3 worker threads for Enlighten. Thread -> id: 1034c -> priority: 1 Thread -> id: 21d8 -> priority: 1 Thread -> id: d828 -> priority: 1 Some other information: - I checked the CPU driver is correct by nvidia-smi. Also, the released executable can work perfectly. - I checked that libvulkan is installed by command vulkaninfo - I also confirmed that there is enough space on GPU Thanks a lot!
EricBoiseLGSVL commented 3 years ago
Null Sensor Prefab Detected - Check RuntimeSettings SensorPrefabs List for missing Sensor Prefab

This is your issue. Find RuntimeSettings.asset in the editor Open SensorPrefabs list and make sure no sensors are null or missing. If you have created a new sensor in the simulator source code, be sure it is listed here. Let us know if you have any other issues. SensorMissingHelp00

ZiwenWan commented 3 years ago

Thanks for the answer. I followed your instruction and I found that element 21 (WheelControlSensor in your screenshot) in the runtime setting is missing. Can you provide more details about how to fix the missing sensor?

Also, I have not added any sensors. Do you have any idea of why this happens?

Thanks!

EricBoiseLGSVL commented 3 years ago

Unity can be a pain sometimes. I usually see this when I pull changes or switch branches while Unity is open. I try to always close unity when using git and open back up once I am finished. esp if you don't force compile with Ctrl+R. I always set unity to not recompile until I say. To fix, just drag the wheel control sensor prefab into the missing spot.

ZiwenWan commented 3 years ago

Thanks for the reply. I followed the instruction you gave:

Here is the snapshot of the error message: image

And here is the log:

Mono path[0] = 'C:/Users/Ziwen/Simulator/SLR_bicycle/simulator_Data/Managed' Mono config path = 'C:/Users/Ziwen/Simulator/SLR_bicycle/MonoBleedingEdge/etc' Loading player data from C:/Users/Ziwen/Simulator/SLR_bicycle/simulator_Data/data.unity3d Initialize engine version: 2019.3.15f1 (59ff3e03856d) [Subsystems] Discovering subsystems at path C:/Users/Ziwen/Simulator/SLR_bicycle/simulator_Data/UnitySubsystems GfxDevice: creating device client; threaded=1 Direct3D: Version: Direct3D 11.0 [level 11.1] Renderer: NVIDIA GeForce RTX 2060 (ID=0x1f08) Vendor:
VRAM: 5980 MB Driver: 27.21.14.5167 Begin MonoManager ReloadAssembly

  • Completed reload, in 1.551 seconds WARNING: Shader Unsupported: 'HDRP/Lit' - All passes removed WARNING: Shader Did you use #pragma only_renderers and omit this platform? D3D11 device created for Microsoft Media Foundation video decoding. Initializing input.

New input system (experimental) initialized

Input initialized. Initialized touch support. WARNING: Shader Unsupported: 'Shader Graphs/VehicleLightsShader' - All passes removed WARNING: Shader Did you use #pragma only_renderers and omit this platform? WARNING: Shader Unsupported: 'Shader Graphs/CloudGenerator' - All passes removed WARNING: Shader Did you use #pragma only_renderers and omit this platform? UnloadTime: 1.338500 ms Loaded 3 NPCs behaviours and 6 NPC models in 00:00:00.0266060 (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35) Current Database Version: 3 (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35) Final Database Version: 3 (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35) Setting up 3 worker threads for Enlighten. Thread -> id: ca48 -> priority: 1 Thread -> id: 4380 -> priority: 1 Thread -> id: d748 -> priority: 1 Getting current user (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35) Listing maps (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35) Listing simulations (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35) Starting simulation with id 13 (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35) Unable to read header from archive file: (Filename: Line: 74) Unable to read header from archive file: (Filename: Line: 74) Failed to start 'SLR_bicycle' simulation (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35) Exception: Failed to load environment from 'SingleLaneRoadBicycle' asset bundle at Simulator.Loader+<>c__DisplayClass36_0.b__0 () [0x00716] in <479212dac4bd47bfaa5220c74822c82c>:0 UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object) UnityEngine.DebugLogHandler:LogException(Exception, Object) UnityEngine.Logger:LogException(Exception, Object) UnityEngine.Debug:LogException(Exception) Simulator.<>c__DisplayClass36_0:b__0() Simulator.Loader:Update() (Filename: <479212dac4bd47bfaa5220c74822c82c> Line: 0)

BTW, I think I executed the git pull command when the unity was still running. I was wondering whether you can provide more tips on how to recompile the project? I think that may help.

Thanks a lot!

EricBoiseLGSVL commented 3 years ago

Is the map scene file named SingleLaneRoadBicycle and the repo folder named SingleLaneRoadBicycle? See CubeTown: MapHelp03

Please open the bundle with any zip application and screen shot the contents

As for recompile, Edit -> Preferences -> General. I set Unity to false with Auto-Refresh (You then must use Ctrl + R and it will take a bit to get used to :) ) and always stop the editor when done running a test Also set Script Changes While Playing to Stop Playing and Recompile in General preferences. That way a recompile will stop playmode and prevent corrupted files. SettingsHelp00

ZiwenWan commented 3 years ago

SingleLaneRoadBicycle is just the nickname used in the simulator to refer to the map, right? I am not sure why I have to make the name consistent. The map scene file name and the asset bundle name are both "SingleLaneRoad". I used the project pulled from Github and just added another asset bundle into the map.

Here is the screenshot of the bundle: image

Thanks!

EricBoiseLGSVL commented 3 years ago

If you are creating SingleLaneRoad, then keep this name. If you want a new one, make a new repo. You probable are having name conflicts with the map bundle being the same name. How are you adding another asset bundle into the map?

ZiwenWan commented 3 years ago

Here is a list of what I did to modify the map:

EricBoiseLGSVL commented 3 years ago

Do you have code components on the prefab you dragged in? Did you move the asset store assets into the folder for the environment repo?