LogoLogo
  • Seahaven
    • Seahaven Documentation
      • Setup Your Account
      • Getting Started
        • Prepare Your Models
          • Name Objects
          • Add Camera Curve to a scene
        • Import 3D Assets
        • Colormap Editor
        • Relationship Editor
          • Start Workflow
            • Workflow
            • Relationship
              • Relationship (Array)
          • Relationships
            • Placements
            • Locate
            • Rotate
            • Neighbour
            • Drop
            • Center
            • Scale
            • Align
            • Attach
            • Put
        • Simulation Editor
          • Workflow
            • Category Visibility Threshold
          • Scene
            • 3D Asset
            • HDRI Lighting
            • Physical Sun/Sky
            • Ground Plane
            • Interior Scene
            • Room Type
          • Relationships
            • Load Relationships
          • Camera
            • Camera Configuration
            • Animated Track Camera
            • Curve-Based Camera
            • Room-Perimeter Camera
              • Category
            • Room-Based Camera
              • Additional Cameras
            • Position Camera
              • Conical
              • Spherical
              • Cubic
            • Orientation
              • Calculate Area of Interest
              • Point
            • Perspectival Camera Properties
            • Fisheye Camera Properties
          • Manipulators
            • Camera Manipulators
              • Override Camera Target
              • Override Camera Position
              • Near IR (Approximation)
              • Track Camera to Object
                • Camera Path Settings
            • Light Manipulators
              • Randomize HDRI Background
              • Modify Light Strength
              • Place Lights
                • Light Object (Bbox)
                • Light Object (Polar)
            • Material Manipulators
              • Randomize Material Color
              • Randomize Material Properties
              • Swap Materials
                • Import Material
                • Replace Material
                • Weighted Material
            • Delete Objects by Name
            • Pose Objects
              • Pose Set
              • Pose Pair
            • Constrain Object
            • Add Particle System
            • Load Object Along Curve
            • Replace
              • View settings
              • Load child object
          • Output
            • Additional Annotation Settings
            • Color Map
            • Camera Ex/Intrinsics
            • Keypoints
            • Normal Map
            • Depth Map
          • Post-Processing
            • Visualize COCO Annotations
            • Shot Noise
            • Glare
            • Disable shadows
        • Running Simulation
        • Save and Import
    • Seahaven Tutorials
    • Errors and Alerts
  • Simulation Manager
    • Simulation Manager
  • Simulation API
    • Simulation Structure
      • Sample Configuration
    • Modules
      • Structure Modules
        • Generator Class
          • generator.Room
            • Submodule: RoomTextureLoader
            • Submodule: RoomLightLoader
            • How To Query Room Properties
            • Sample Room Configuration
        • Loader Class
          • loader.ObjectLoader
      • Placement Modules
        • Placement Class
          • placement.PlacementHandler
            • Placement Rules
              • Settings
      • Lighting Modules
        • Lighting Class
          • lighting.HdriLoader
          • lighting.LightLoader
      • Camera Modules
        • Camera Class
          • camera.CameraSampler
          • camera.RoomCamera
            • Submodule: proximity_checks
            • Submodule: default_cam_param
      • Output Modules
        • Renderer Class
          • renderer.MultiRenderer
            • Submodule: RgbRenderer
            • Submodule: InstanceRenderer
            • Submodule: SemanticRenderer
            • Submodule: DepthRenderer
            • Submodule: BoundingBoxWriter
  • Management API
    • RESTful API
    • Python API
      • Example
    • Python API (V4 - BETA)
      • Installation
      • Merge Datasets
      • Methods
      • Dataset Analysis
      • Compression Artifacts
      • Domain Matching
      • Credentials
  • API Tutorials
    • Residential Interior Simulation
      • Upload Your Placement Rules
      • Modifying Your Camera
      • Modify Placement Rules
      • Run your Simulation
      • Tutorial Materials
        • Pipeline Configuration
        • Placement Rules
          • bedroom1.yaml
          • bedroom2.yaml
          • livingroom.yaml
          • floorPlan.yaml
Powered by GitBook
On this page
Export as PDF
  1. API Tutorials
  2. Residential Interior Simulation

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.

PreviousModify Placement RulesNextTutorial Materials

Last updated 3 years ago

Sample image from the simulation with increased FOV and camera lower to the ground.