Network Compute Bridge Client

For clients to the network compute bridge service.

exception bosdyn.client.network_compute_bridge_client.ExternalServiceNotFoundError(response, error_message=None)[source]

Bases: ResponseError

The requested service for external computation was not found in the directory.

exception bosdyn.client.network_compute_bridge_client.ExternalServerError(response, error_message=None)[source]

Bases: ResponseError

The call to the external server did not complete successfully.

exception bosdyn.client.network_compute_bridge_client.NetworkComputeRotationError(response, error_message=None)[source]

Bases: ResponseError

The robot failed to rotate the image as requested.

exception bosdyn.client.network_compute_bridge_client.NetworkComputeAnalysisFailedError(response, error_message=None)[source]

Bases: ResponseError

The model failed to analyze the set of input images, but a retry might work.

class bosdyn.client.network_compute_bridge_client.NetworkComputeBridgeClient[source]

Bases: BaseClient

Client to either the NetworkComputeBridgeService or the NetworkComputeBridgeWorkerService.

default_service_name = 'network-compute-bridge'
service_type = 'bosdyn.api.NetworkComputeBridge'
list_available_models(service_name, **kwargs)[source]

List all available models that the service knows.

Parameters:

service_name (str) – The service to query for models.

Returns:

The full ListAvailableModelsResponse, which contains any models the service or worker service advertise.

Raises:
  • RpcError – Problem communicating with the robot.

  • ExternalServiceNotFoundError – The network compute bridge worker service was not found in the robot’s directory.

  • ExternalServerError – Either the service or worker service threw an error when responding with the set of all models.

list_available_models_async(service_name, **kwargs)[source]

Async version of list_available_models().

list_available_models_command(list_request, **kwargs)[source]

List all available models that the service knows.

Parameters:

list_request (ListAvailableModelsRequest) – The request to list all models.

Returns:

The full ListAvailableModelsResponse, which contains any models the service or worker service advertise.

Raises:
  • RpcError – Problem communicating with the robot.

  • ExternalServiceNotFoundError – The network compute bridge worker service was not found in the robot’s directory.

  • ExternalServerError – Either the service or worker service threw an error when responding with the set of all models.

list_available_models_command_async(list_request, **kwargs)[source]

Async version of list_available_models_command().

network_compute_bridge_command(network_compute_request, **kwargs)[source]

Issue the main network compute bridge request to run a model on specific, requested data.

Parameters:

network_compute_request (NetworkComputeRequest) – The request which contains what type of data should be processed, and which model the server should run.

Returns:

The full NetworkComputeResponse, which contains the processed data.

Raises:
network_compute_bridge_command_async(network_compute_request, **kwargs)[source]

Async version of network_compute_bridge_command().