def __init__(self, surveyPath, assetsDir, outputDir, numThreads, lasOutput, zipOutput, copy=False): if copy: return self.sim = pyhelios.Simulation(surveyPath, assetsDir, outputDir, numThreads, lasOutput, zipOutput)
elif args.loggingsilent: pyhelios.loggingSilent() else: pyhelios.loggingDefault() # Set random generator seed if value has been supplied. if args.randomness_seed: pyhelios.setDefaultRandomnessGeneratorSeed(args.randomness_seed) # Initiate a simulation. Parameters: (surveyPath, assetsPath, outputPath, ...). sim = pyhelios.Simulation( args.survey_file, args.assets_path, args.output_path, args.number_of_threads, # Num Threads args.las_output_flag, # LAS output args.zip_output_flag, # ZIP output ) # Load the survey file. sim.loadSurvey( args.leg_noise_disabled_flag, # Leg Noise Disabled FLAG args.rebuild_scene_flag, # Rebuild Scene FLAG args.write_waveform_flag, # Write Waveform FLAG args.calc_echowidth_flag, # Calculate Echowidth FLAG args.fullwave_noise_flag, # Full Wave Noise FLAG args.platform_noise_disabled_flag # Platform Noise Disabled FLAG ) if not args.live_trajectory_plot and not args.open3d:
# ----------------- # if __name__ == '__main__': # Configure simulation context # pyhelios.loggingVerbose2() pyhelios.loggingQuiet() pyhelios.setDefaultRandomnessGeneratorSeed("123") # Build multiple simulations nSimulations = 3 sims = [] print('>> Creating {n} simulations\n'.format(n=nSimulations)) sim0 = pyhelios.Simulation( # First simulation 'data/surveys/voxels/als_detailedVoxels_mode_comparison.xml', 'assets/', 'output/', 0, # Num Threads False, # LAS output FLAG False # Zip output FLAG ) sim0.simFrequency = 10 # Sim frequency has to be setted # It is 0 by default and with 0 sim frequency it is not possible # to pause nor have callbacks # Sim frequency 0 means the simulation will start and run until it is # finished with no interleaved work sim0.finalOutput = True sim0.loadSurvey( True, # Leg Noise Disabled FLAG True, # Rebuild Scene FLAG True, # Write Waveform FLAG True, # Calc Echowidth FLAG
import pyhelios print(pyhelios.getVersion()) sim = pyhelios.Simulation() print('Simulation started? {status}'.format( status="YES" if sim.isStarted() else "NO"))