pycram.worlds.multiverse_communication.client_manager#

Classes#

Module Contents#

class pycram.worlds.multiverse_communication.client_manager.MultiverseClientManager(simulation_wait_time_factor: typing_extensions.Optional[float] = 1.0)#
BASE_PORT: int#

The base port of the Multiverse client.

clients: typing_extensions.Optional[typing_extensions.Dict[str, pycram.worlds.multiverse_communication.clients.MultiverseClient]]#

The list of Multiverse clients.

last_used_port: int#
simulation_wait_time_factor = 1.0#
create_reader(is_prospection_world: typing_extensions.Optional[bool] = False) pycram.worlds.multiverse_communication.clients.MultiverseReader#

Create a Multiverse reader client.

Parameters:

is_prospection_world – Whether the reader is connected to the prospection world.

create_writer(simulation: str, is_prospection_world: typing_extensions.Optional[bool] = False) pycram.worlds.multiverse_communication.clients.MultiverseWriter#

Create a Multiverse writer client.

Parameters:
  • simulation – The name of the simulation that the writer is connected to (usually the name defined in the .muv file).

  • is_prospection_world – Whether the writer is connected to the prospection world.

create_controller(is_prospection_world: typing_extensions.Optional[bool] = False) pycram.worlds.multiverse_communication.clients.MultiverseController#

Create a Multiverse controller client.

Parameters:

is_prospection_world – Whether the controller is connected to the prospection world.

create_api_requester(simulation: str, is_prospection_world: typing_extensions.Optional[bool] = False) pycram.worlds.multiverse_communication.clients.MultiverseAPI#

Create a Multiverse API client.

Parameters:
  • simulation – The name of the simulation that the API is connected to (usually the name defined in the .muv file).

  • is_prospection_world – Whether the API is connected to the prospection world.

create_client(client_type: typing_extensions.Type[pycram.worlds.multiverse_communication.clients.MultiverseClient], name: typing_extensions.Optional[str] = None, is_prospection_world: typing_extensions.Optional[bool] = False, **kwargs) typing_extensions.Union[pycram.worlds.multiverse_communication.clients.MultiverseClient, pycram.worlds.multiverse_communication.clients.MultiverseAPI, pycram.worlds.multiverse_communication.clients.MultiverseReader, pycram.worlds.multiverse_communication.clients.MultiverseWriter, pycram.worlds.multiverse_communication.clients.MultiverseController]#

Create a Multiverse client.

Parameters:
  • client_type – The type of the client to create.

  • name – The name of the client.

  • is_prospection_world – Whether the client is connected to the prospection world.

  • kwargs – Any other keyword arguments that should be passed to the client constructor.

classmethod stop_all_clients()#

Stop all clients.