Autoware.Auto
|
|
LGSVL is a Unity-based multi-robot simulator for autonomous vehicle developers. It provides a simulated world to
For more information about the simulator, see https://www.lgsvlsimulator.com/docs/.
The following guide assumes that the LGSVL simulator will be run from inside an ADE container, although it is not strictly required.
Using the simulator involves the following steps:
This section outlines these steps.
Install ADE as described in the installation section:
Start ADE with the LGSVL volume:
Pick a different .aderc-*-lgsvl
file to manually choose a ROS version.
To start the LGSVL simulator, in the same terminal window:
Now start your favorite browser on the host system (outside of ADE!) and go to http://127.0.0.1:8080 where simulations can be configured.
In case the simulator window opens up with a black screen and the application immediately terminates, remove conflicting graphics drivers from ADE with
and launch the simulator again.
Creating a simulation configuration takes only a few clicks in the browser. The following steps assume that the launch was successful and illustrate the configuration process with the setup for the Autonomous Valet Parking Demonstration.
The goal is to create a map configuration for the AutonomouStuff parking lot. If that map is already available on the first launch of the simulation, nothings needs to be done.
Else follow the LGSVL instructions, click the Add new
button and enter a name (e.g. AutonomouStuff parking lot
) and the link to the asset bundle from this site containing the map data:
Once submitted, this will download the map automatically.
The goal is to create a vehicle configuration for the AutonomouStuff parking lot.
Follow the LGSVL instructions, to configure the Lexus model: click the vehicles tab, then Add new
and enter Lexus2016RXHybrid
as name and
as Vehicle URL
.
Once submitted, click on the wrench icon for the Lexus vehicle and
Ros2NativeBridge
Sensors
box, copy and paste the content of lgsvl-sensors.json
located at the root of the Autoware.Auto repository to tell LGSVL about sensor positions and where to communicate information to the Autoware.Auto stack.The Ros2NativeBridge
is a special bridge type which does not require a websocket-based bridge. When a simulation is started, the topics should be published in ROS 2 automatically.
The above steps are a modified version of the LGSVL documentation
Choose Simulations
on the left to see the simulations screen. The LGSVL simulator lets you store and reuse multiple simulation configurations. To use an existing simulation, select the desired simulation and press the play button in the bottom right corner of the screen. The simulator should now start in the LGSVL window.
To create a new simulation, follow the below steps:
Add new
button.Map & Vehicles
tab.Lexus2016RXHybrid
from the drop-down menu.127.0.0.1:9090
in the Ros2NativeBridge connction
box.Traffic
or Weather
tab are needed but one can play around here.Once the simulation has been created, select it by clicking on its white box first, then run it by clicking the play button.
The Lexus should appear in a 3D rendering in the LGSVL Simulator
window (not in the browser).
The next step is to control the Lexus and to drive around. Press F1
to see a list of shortcuts and press the cookie button in bottom left corner for more UI controls.
The essential commands are to use the arrow keys to steer and accelerate, and the Page Up
and Page Down
keys to switch between forward and reverse driving.
Congratulations if everything is working up to this point. The setup of LGSVL is completed.
LGSVL uses conventions which are not directly aligned with ROS 2 conventions. The full list of behaviors the lgsvl_interface
implements is:
VehicleControlCommand
to the RawControlCommand
LGSVL expects via parametrizable 1D lookup tablesTo run the lgsvl_interface
manually, enter the following in a new terminal window:
Dashing:
Foxy:
Launch scripts are also provided for convenience. For example for a joystick control demo, run the following in a new terminal window:
For an example of using VehicleControlCommand
with LGSVL, run the following demo in a new terminal window: