HoloOcean

Module containing high level interface for loading environments.

Classes:

GL_VERSION()

OpenGL Version enum.

Functions:

make([scenario_name, scenario_cfg, ...])

Creates a HoloOcean environment

class holoocean.holoocean.GL_VERSION

OpenGL Version enum.

OPENGL3

The value for OpenGL3.

Type:

int

OPENGL4

The value for OpenGL4.

Type:

int

holoocean.holoocean.make(scenario_name='', scenario_cfg=None, gl_version=4, window_res=None, verbose=False, show_viewport=True, ticks_per_sec=None, frames_per_sec=None, copy_state=True, start_world=True)

Creates a HoloOcean environment

Parameters:
  • world_name (str) – The name of the world to load as an environment. Must match the name of a world in an installed package.

  • scenario_cfg (dict) – Dictionary containing scenario configuration, instead of loading a scenario from the installed packages. Dictionary should match the format of the JSON configuration files

  • gl_version (int, optional) – The OpenGL version to use (Linux only). Defaults to GL_VERSION.OPENGL4.

  • window_res ((int, int), optional) – The (height, width) to load the engine window at. Overrides the (optional) resolution in the scenario config file

  • verbose (bool, optional) – Whether to run in verbose mode. Defaults to False.

  • show_viewport (bool, optional) – If the viewport window should be shown on-screen (Linux only). Defaults to True

  • ticks_per_sec (int, optional) – The number of frame ticks per unreal seconds. This will override whatever is in the configuration json. Defaults to 30.

  • frames_per_sec (int or bool, optional) – The max number of frames ticks per real seconds. This will override whatever is in the configuration json. If True, will match ticks_per_sec. If False, will not be turned on. If an integer, will set to that value. Defaults to True.

  • copy_state (bool, optional) – If the state should be copied or passed as a reference when returned. Defaults to True

  • start_world (bool, optional) – If the world should be started immediately. Defaults to True Set to false if you are running the environment in the editor as play as standalone.

Returns:

A holoocean environment instantiated

with all the settings necessary for the specified world, and other supplied arguments.

Return type:

HoloOceanEnvironment