Skip to main content

Camera Service

We recommend accessing the Camera Service through the provided camera client class. This class is a Python wrapper for the service's gRPC interface and offers dedicated methods for each camera operation, simplifying interaction with the service.

View the Process camera images guide to learn how to use the camera service via the client from a skill.

Checking camera service state

If you are using the CameraService API, the System Service State is essential for managing its state and provides the following RPCs:

  1. EnableService() and DisableService(): Call these RPCs to enable or disable a CameraService instance.

  2. GetInstanceState(): Retrieve the current state of the CameraService. If the service is in an error state, the extended_status field in the response provides details on the cause of the failure and suggests mitigation steps.

  3. RestartService(): After resolving the root cause of the CameraService failure (e.g., by restarting the camera or validating network connections), call the RestartService RPC on the SystemServiceState to resume the CameraService's operation.

Note that these RPCs can be called programmatically, through the API, or via inctl commands within a devcontainer. For instance,

inctl service state enable <camera-service-instance-name> --org=<your_organization> --cluster=<cluster-id>

is a command-line instruction equivalent to the EnableService RPC of the SystemServiceState.

If you wish to check the state of a camera service via an HMI, you will need a client to communicate with the SystemServiceState service. For this, you need to establish a corresponding connection. SystemServiceState is a cluster service, available from HMI services at istio-ingressgateway.app-ingress.svc.cluster.local:80.