LGSVL source code compilation detailed process (Windows10)

First, paste the official document link and open the official compiled document first.

https://www.lgsvlsimulator.com/docs/build-instructions/

Note 1. It is recommended that all files be installed in the program files of D drive.
Note 2. In order to reduce unknown compilation errors, you must proceed step by step, and proceed to the next step after the current step is complete.


The first step is to download unity hub, the management software of unity project.
The second step is to download the unity2019.1.10f1 version, which must be this version.
The third step is to download the recommended version of node.js 12.13.0
. The fourth step is to install the git tool, and then you can git clone simulator.
Insert picture description here
Note:

  1. Unity hub needs to apply for a license before it can be used. It can be activated manually. Follow the instructions step by step, not going into details.
  2. When installing unity, be sure to check Windows support and Linux support, otherwise it is important to uninstall and reinstall.
    Insert picture description here
  3. The given git-lfs link does not work, just install another exe file, Git-2.25.1-64-bit.exe in the figure below, after installation, open the Git CMD shortcut, enter git lfs install, and see the Git LFS initialized.proof Git It's already installed.
    Insert picture description here

After the installation is over, the file will be cloned and compiled.
Insert picture description here
The fifth step is to clone the simulator. This step cannot be wrong, otherwise the unity opens the project without the simulator option, and the webUI cannot be compiled.

1. First create an empty folder named LG on the D drive.
2. After the Git CMD shortcut is opened, it will be the command line in the C:user\ju directory.
3. Enter the command line and cd..return to the C:user directory. Enter the command line again and cd..return to the command line in the C: root directory, enter the command line in the root directory of D:Disk D, and then cd \Program Files\LGenter the command line in the LG directory.
4. git clone --single-branch https://github.com/lgsvl/simulator.gitJust input it and start cloning a simulator in the LG directory. When the uploading files are loaded, the cursor is still flashing, and it is not over yet. Be sure to clone it completely. Otherwise, an error will occur.
This picture is cloned to the default c drive. You must wait for the Filtering content to be cloned. It may take a long time or many times. In any case, you must get the complete cloned file.


Step 6, open the unity hub.
Step 7, click on the project, add, clone the complete simulator in the LG folder under the D drive.
Insert picture description here
Step 8, click Install, select unity2019.1.10f1 installed in D drive.
Step 9, click on the item to verify whether the simulator and unity versions match, there will be an exclamation mark if they do not match.
Step 10, double-click the simulator in the project, unity will run at this time, and it will be loaded after a while. If the simulator clone is incomplete, there may be no simulator option in the menu bar after loading, or an error will be reported.
Insert picture description here
Step 11, click the Git CMD shortcut to open the command line.
Step 12, cd into the webUI directory in the D disk simulator folder.
The 13th step, input npm install, only run once, the interface is as follows.
Note: After npm install, a dist folder and a node_modules folder will be generated in the webUI directory. *
Insert picture description here
Step 14, then find simulator in the menu bar of the unity interface and click build webUI. If it is normal, it will enter the following interface.
Insert picture description here
Compilation is complete, the webUI appears in the console : build is completed as shown in the figure below.Insert picture description here

If the compilation fails, the console will report a build error. At this time, delete the dist and node_modules under the webUI, and run it in the webUI directory npm install, and then build the webUI to see if there are any errors. If there is a compilation error, it may be a file I don't know if the clone is incomplete, or something else, it's best to succeed at once.


Step 15 is simple and clear, as follows.
Insert picture description here


Here is the quote
Step 16, open the website.

https://www.lgsvlsimulator.com/docs/assets/

To add resources, first download these masters on GitHub and place them in the corresponding directories.

路径:simulator/Assets/External/Environments

  • https://github.com/lgsvl/CubeTown
  • https://github.com/lgsvl/SingleLaneRoad
  • https://github.com/lgsvl/Shalun
  • https://github.com/lgsvl/SanFrancisco

Path: simulator/Assets/External/Vehicles

  • https://github.com/lgsvl/Jaguar2015XE

Note: Be sure to use git clone to download to the corresponding folder, not directly to the master, otherwise there will be errors.

After adding the designated master under environment and vehicle, the following interface is automatically recognized.
Insert picture description here
Check all, click build, wait for a while, the console will report an error, as follows.
Insert picture description here
Don't worry about the error, continue, click check in the simulator in the menu bar, there is also an error.
Insert picture description here
At this time, the AssetBundles folder will appear under the simulator folder.
Insert picture description here
There are corresponding files in the folder, as follows. End of step 16.
Insert picture description here


Insert picture description here
Step 17, Load LoaderScene as follows, click play, click OpenBrowser, and a login interface will pop up.
Insert picture description here
Login interface
Insert picture description here
Register and log in, the following cloud service interface appears
Insert picture description here


Insert picture description here
Step 18, select the target operating system
. Step 19, tick the build simulator
. Step 20, create a new folder named new under the LG folder on the D drive, and select the storage path as D:\Program Files\LG\new .
Step 21, tick
Step 22 of Development Build and click Build.
Insert picture description here
Screenshot of
Insert picture description here
compiling After compiling, the path D:\Program Files\LG\new will generate the following files.
Insert picture description here
Click on simulator.exe and the following figure appears.
Insert picture description here
Then have fun!
Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_41631106/article/details/105107144