Run your Simulation

Once you have uploaded your placement rules and modified your pipeline configuration. You can start a simulation.

We will do this again with the python package.

import lexsetAPI as lexset

You will need your user token for these operations. The token is available on your account page along with your user ID.

It is also recommended that you store the path to your simulation on your local system in it's own variable.

token = <YOUR BEARER TOKEN>
simPath = "./multiroom_tutorial_changeCam.yaml"

The python package manages each simulation as its own object. First, you will create that object.

firstSim = lexset.simulation(token,simPath,<NUMBER OF IMAGES YOU WANT TO GENERATE>)

When you create a simulation a message is sent to the Lexset server. Lexset will return all the data you need to your object so that you can track your simulations and store that in your object.

firstSim.createSimulation()

You can access your simulation ID, dataset ID, or user ID from your simulation object.

print(firstSim.dataID)
print(firstSim.simID)
print(firstSim.userID)

Once all your placement rules are uploaded you can start your simulation.

firstSim.startSimulation()

This is what your final script should look like.

import lexsetAPI as lexset

token = <YOUR BEARER TOKEN>
simPath = "./multiroom_tutorial_changeCam.yaml"

firstSim = lexset.simulation(token,simPath,<NUMBER OF IMAGES YOU WANT TO GENERATE>)

firstSim.createSimulation()
firstSim.startSimulation()

When your simulation finishes and your data is ready you can download the data with the following command.

firstSim.downloadData()

This is an example of what the output from your simulation should look like. You will note that the camera is lower to the ground and the FOV is much wider, resulting in more distortion and viewing more of the space.

Last updated