tools.scenario module#

Implements Scenario class.

class tools.scenario.Scenario(isaac_sim: IsaacSimApp, scenario_name: str, scenario_dict_config: omegaconf.DictConfig)#

Bases: object

Implements Scenario class which is a configuration description what and how should be rendered.

master_synthesizer#

Master Synthesizer instance containing all Synthesizer instances to be executed in the given scenario.

Type:

Union[NullMasterSynthesizer, MasterSynthesizer]

isaac_sim#

Reference to Isaac Sim wrapper. Till MasterSynthesizer is not instantiated, it stores NullMasterSynthesizer class instance as a Null Object duck-type instance.

Type:

IsaacSimApp

scenario_name#

Name of the scenario.

Type:

str

scenario_dict_config#

Hydra’s configuration of given scenario’s Synthesizers.

Type:

DictConfig

frames_number#

Number of images which are generated for given scenario.

Type:

int

__init__(isaac_sim: IsaacSimApp, scenario_name: str, scenario_dict_config: omegaconf.DictConfig) None#

Init.

Parameters:
  • isaac_sim (IsaacSimApp) – Reference to Isaac Sim wrapper.

  • scenario_name (str) – Name of the scenario.

  • scenario_dict_config (DictConfig) – Hydra’s configuration of given scenario’s Synthesizers.

get_cameras() Generator[Tuple[List[Any], List[Any]], None, None]#

Collects all camera setups defined for the scenario. Camera setup means, that in one setup there could be more cameras (e.g. stereo camera setup)

Yields:

Generator[Tuple[List[Any], List[Any]], None, None]

Camera setup given by list of camera stage paths and

list of corresponding camera render products.

prepare(scenario_name: str) None#

Prepares the scenario, which means to instantiate all Synthesizers encapsulated in Master Synthesizer.

Parameters:

scenario_name (str) – Corresponding scenario name, as defined in the Hydra config.