lgsvl / simulator

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

Build ERROR with Unity Editor #447

Closed clouddd9 closed 5 years ago

clouddd9 commented 5 years ago

I download the simulator folder and open it by unityHub,.However, the Unity Editor didn't load the simulator correctly and cast errors as follow: image image

why did it happen & what should I do to fix the problem? ps: I've run the bridge.sh before. image

martins-mozeiko commented 5 years ago

That looks like git lfs is not installed or is installed correctly. Please verify that git-lfs is installed correctly. https://www.lgsvlsimulator.com/docs/faq/#why-are-assets-scenes-missing-empty-after-cloning-from-git

clouddd9 commented 5 years ago

I'm pretty sure that I've installed the lfs in the cmd and it shows "Git LFS initialized." However, the problem still exists. I found that when I input bridge.sh in docker, it shows (which can be seen in the picture I posted before)

WARNING:logging before InitGoogleLogging() is written to STDERR

and in Unity3D the errors all show in this form: Assets/Scripts/ApolloAutoMode.cs(2,7): error CS0246: The type or namespace name `xxxxx' could not be found. Are you missing an assembly reference?

Is it the WARNING that leads to the problem?

martins-mozeiko commented 5 years ago

Bridge has nothing to do with this. Bridge is relevant only when simulator runs with vehicle. Currently simulator cannot even start, because code can not compile due to errors.

Can you please check Assets/Plugins/Protobuf/protobuf-net.dll file on your disk? It should be ~269KB in size. If it is only 100 or so bytes, then this is git lfs issue. Try running git lfs ls-files - all files should have asterix (*) next to them. If it does not have asterix, then git lfs is not working out your checkout. Try fetch and checking out files again (git lfs fetch and git lfs checkout).

clouddd9 commented 5 years ago

well, the size is about 131KB. In what path should I run the command? I run in /home/user but the feedback is

cloud9@cloud9:~$ git lfs ls-files Not in a git repository.

clouddd9 commented 5 years ago

Oh, I noticed that I didn‘t git the simulator. I just download the .zip Very sorry to bother you. Now I'll try the git version and see what's changed.

martins-mozeiko commented 5 years ago

131KB sounds strange. Did you mean just B as in Bytes, not KB (kilobytes)? Then this is git-lfs issue.

GitHub does not package files under git-lfs storage inside zip file downloads from repository: https://github.com/isaacs/github/issues/712 If you want to work on simulator source code, you will need to do git clone ...

clouddd9 commented 5 years ago

so sad that some other errors occur image

10warnings, 30errors the main errors are as follows: Rebuilding Library because the asset database could not be found!

GL.End requires material.SetPass before! UnityEditor.AssetPreviewUpdater:CreatePreviewForAsset(Object, Object[], String)

System.Exception: Cannot load. Incorrect path: Packages/com.unity.render-pipelines.high-definition/Editor/DefaultScene/DefaultSceneRoot.prefab Null returned. at UnityEngine.Experimental.Rendering.HDPipeline.ResourceReloader.Load (System.String path, System.Type type, System.Boolean builtin) [0x00036] in /home/cloud9/simulator/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/ResourceReloader.cs:129 at UnityEngine.Experimental.Rendering.HDPipeline.ResourceReloader.SetAndLoadIfNull (System.Object container, System.Reflection.FieldInfo info, System.String path, System.Boolean builtin) [0x0000c] in /home/cloud9/simulator/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/ResourceReloader.cs:139 at UnityEngine.Experimental.Rendering.HDPipeline.ResourceReloader.ReloadAllNullIn (System.Object container) [0x00076] in /home/cloud9/simulator/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipelineResources/ResourceReloader.cs:38 at UnityEngine.Experimental.Rendering.HDPipeline.HDRenderPipeline.UpgradeResourcesIfNeeded () [0x0009c] in /home/cloud9/simulator/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs:400 at UnityEngine.Experimental.Rendering.HDPipeline.HDRenderPipeline..ctor (UnityEngine.Experimental.Rendering.HDPipeline.HDRenderPipelineAsset asset) [0x0033c] in /home/cloud9/simulator/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipeline.cs:262 at UnityEngine.Experimental.Rendering.HDPipeline.HDRenderPipelineAsset.CreatePipeline () [0x00004] in /home/cloud9/simulator/Packages/com.unity.render-pipelines.high-definition/Runtime/RenderPipeline/HDRenderPipelineAsset.cs:35 UnityEditor.AssetPreviewUpdater:CreatePreviewForAsset(Object, Object[], String)

clouddd9 commented 5 years ago

my Unity edition is 2019.1.10f1 and I think I've installed the node.js correctly cuz when i input node it shows cloud9@cloud9:~$ node
node node-gyp nodejs
and git lfs have been installed too. then I use git clone xxxx.git to git the simulator I follow the guide in everything I did and here come the errors.

martins-mozeiko commented 5 years ago

These are not real errors. Press Clear button and they will go away. Unity likes to complain with errors about some of its internal workings (maybe due to fact that Linux platform is not very well supported). But these errors are harmless. Everything else still works. nodejs has nothing to do with this.

clouddd9 commented 5 years ago

I finally realized that it's empty in Assets/External/Environmentsand Assets/External/Vehicles. And that's why I can't choose the environments and vehicle models when building. THX.