-
Notifications
You must be signed in to change notification settings - Fork 18
LGSVL Simulator Quick Start Guide
Unity 2018.2.4 is required. Download the Windows installer for this version from the Unity download archive and execute it. Follow the instructions in the installer to install Unity.
The LGSVL simulator steering angle needs to be inverted. In the file Assets/Scripts/VehicleInputController.cs
, make the following change:
(This step will become unnecessary in a future update.)
In a terminal, run the following commands to download and set up the LGSVL simulator launcher.
git clone https://github.com/tier4/lgsvl_simulator_launcher.git
cd lgsvl_simulator_launcher
pip install pipenv
pipenv shell
python app.py
create setting.json file in the lgsvl_simulator_launcher directory.
Open setting.json
in an editor and paste in the following content.
{
[
{name:stable, path:"C:\Documents\Simulator"},
{name:develop, path:"C:\Documents\Simulator"}
]
}
LGSVL cannot be built using the default Unity Editor build command. As described in this LGSVL issue, the simulator must be built using batch mode to correctly package assets.
Following the LGSVL build instructions, build on the command line, ensuring that the -batchmode
option is specified and the -buildTarget
is Windows64
.
Follow the Autoware installation instructions to install Autoware.
Autoware requires a pointcloud map and other data to run. This data can be downloaded from the LGSVL Git large file store.
-
Install Git LFS by running the following commands.
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash sudo apt update sudo apt install git-lfs
-
Download the data from the LGSVL repository
git clone [email protected]:lgsvl/autoware-data.git
To make waypoints in Autoware, load a pointcloud into Autoware and then drive around in the simulator, saving the waypoints as they are created.
First, Load the pointcloud data into Autoware using the Runtime Manager.
The pointcloud data can be found in the autoware-data/data/map/pointcloud_map_sf_portion/
directory.
Several settings need to be set in Autoware:
-
Sensing
tab: Enablevoxel_grid_filter
-
Computing
tab: Enablendt_matching
andvel_pose_connect
In the Autoware Runtime Manager, open the Simulation
tab and click the LGSVL simulator
button. Input the Windows simulator machine IP address and the LGSVL Simulator Launcher Port in the dialog that opens.
Create a JSON configuration file using the below content and load this file from the UI by pressing the Config
button.
{
"bin_type" : "tier4-develop",
"initial_configuration" : {
"map" : "SanFrancisco",
"time_of_day" : 12.0,
"freeze_time_of_day" : true,
"fog_intensity" : 0.0,
"rain_intensity" : 0.0,
"road_wetness" : 0.0,
"enable_traffic" : true,
"enable_pedestrian" : true,
"traffic_density" : 300
},
"vehicles" :
[
{
"type" : "XE_Rigged-autoware",
"address" : "$(autoware_machine_ip)",
"port" : 9090,
"command_type" : "twist",
"enable_lidar" : true,
"enable_gps" : true,
"enable_main_camera" : true,
"enable_high_quality_rendering" : true,
"position" : {"n" : 4140310.4, "e" : 590681.5, "h" : 10},
"orientation" : {"r" : 0.0, "p" : 0.0, "y" : 269.9}
}
]
}
In the Autoware Runtime Manager, enable the waypoint_saver
setting.
Using the G29 steering wheel controller, drive simulated cars around the simulated world. Created waypoints will be saved.
Enable the following settings in the Autoware Runtime Manager for autonomous driving.
ndt_matching
vel_pose_connect
lane_rule
lane_sotp
lane_select
obstacle_void
velocity_set
pure_pursuit
twist_filter
waypoint_loader
The following video shows Autoware driving the simulator.