Running a Distributed Simulation #

When distributed simulation starts working, a simulation on each machine will start, and you can check the list of sensors allocated to the machine in Sensor Visualizers.

Requirements top#

Distributed simulation needs multiple computers connected to the same router. The operating system of each computer can be either Linux or Windows 10. In this document, we'll use:

  • Two Linux PCs (Master, Client PC)
  • Apollo 5 on Master PC

Instructions top#

Install Apollo 5 top#

If you already installed and built Apollo 5, jump to launching Apollo.

docker pull lgsvl/apollo-5.0
git clone --recurse-submodules https://github.com/lgsvl/apollo-5.0.git ~/apollo-5.0

Building Apollo and bridge top#

cd ~/apollo-5.0
./docker/scripts/dev_start.sh
./docker/scripts/dev_into.sh
./apollo.sh build_gpu

Launching Apollo 5 top#

bootstrap.sh
bridge.sh

You can check the network address of your bridge. This network address should be used in bridge setup in the web user interface.

Launching SVL Simulator and Setting Cluster top#

In Master Simulator,

  • Run Simulator.

  • Click LINK TO CLOUD.

  • In the Create new cluster tab, give cluster name into New Cluster and click Create cluster.

Create a cluster in main simulator of distributed simulation

In Client Simulator,

  • Run Simulator.

  • Click LINK TO CLOUD.

  • In the Add to Existing cluster tab, choose cluster name that master simulator made and click Create cluster.

Create a cluster in sub simulator on distributed simulation

  • After this, Clusters should show one cluster which has two computer name together. If this setup doesn't work, you should remove your pre-existed cluster.

  • Make sure that you now have a cluster which has each machine listed together, like the following:

Check cluster for distibuted simulation

Adding a Map top#

If you already added a map you want to use, jump to Adding a vehicle.

  • In the left tab, under Store, click on Maps and enter a map's name. Here we're gonna use BorregasAve map. Click on + icon. You can check the message in the left bottom like the following: "BorregasAve" has been successfully added to your library.

Add a map

Adding a Vehicle top#

If you already added a vehicle you want to use, jump to Creating simulations.

  • In the left tab, under Store, click on Vehicles and enter a vehicle's name. Here we're gonna use Lincoln2017MKZ. Click on + icon. You can check the message in the left bottom like the following: "Lincoln2017MKZ" has been successfully added to your library.

Add a vehicle

Adding sensors top#

  • In the left tab, click Vehicles under Library.

  • Choose Lincoln2017MKZ.

  • Click Apollo 5.0 under Sensor Configurations.

Add a vehicle

  • If you see exclamation mark, click Add to Library button.

Add sensors to library

Creating Simulations in Web User Interface top#

Below is how to make a new simulation with a distributed simulation cluster setup.

  • In the left side, click Simulations.

  • Click Add New.

  • Give name in the Simulation Name.

  • Select cluster name in the Select Cluster.

  • Choose other setups like test report, headless mode, interactive mode as you wish and click next.

General in creating distributed simulation

  • Select Random Traffic in Runtime Template.

Runtime template in creating distributed simulation

  • Choose map and vehicle essentially and others optionally and click next.

Random traffic of Runtime Template in creating distributed simulation

  • Choose Apollo 5.0 in the Autopilot and enter exact your IP address plus port 9090 where Apollo 5 is running and click next.

Autopilot setup in creating distributed simulation

  • Click Publish.

Running Simulation top#

Click Run Simulation.

Make sure the simulation is started on both the master and client machines.

Checking Bridge Status top#

  • Click a power cord shape icon in the bottom and make sure that master and client simulator have connected to bridge in the left tab.

Distributed simulation main Simulator bridge status

Distributed simulation sub Simulator bridge status

Visualizing Sensors top#

  • Click the an eye shape icon and make sure master and client simulators have own sensor lists automatically allocated by distributed simulation setup.

  • Make sure that master simulator has light-computational sensors like CAN bus, IMU, etc. and the client has heavy-computational sensors like LiDARs, Cameras.

Distributed simulation main Simulator sensor list

Distributed simulation sub Simulator sensor list