HoloOcean Client

The client used for subscribing shared memory between python and c++.

Classes:

HoloOceanClient([uuid])

HoloOceanClient for controlling a shared memory session.

class holoocean.holooceanclient.HoloOceanClient(uuid='')

HoloOceanClient for controlling a shared memory session.

Parameters:

uuid (str, optional) – A UUID to indicate which server this client is associated with. The same UUID should be passed to the world through a command line flag. Defaults to “”.

Methods:

acquire([timeout])

Used to acquire control.

malloc(key, shape, dtype)

Allocates a block of shared memory, and returns a numpy array whose data corresponds with that block.

release()

Used to release control.

acquire(timeout=60)

Used to acquire control. Will wait until the HolodeckServer has finished its work.

malloc(key, shape, dtype)

Allocates a block of shared memory, and returns a numpy array whose data corresponds with that block.

Parameters:
  • key (str) – The key to identify the block.

  • shape (list of int) – The shape of the numpy array to allocate.

  • dtype (type) – The numpy data type (e.g. np.float32).

Returns:

The numpy array that is positioned on the shared memory.

Return type:

np.ndarray

release()

Used to release control. Will allow the HolodeckServer to take a step.