ProtectionZone

class ProtectionZoneClient
Canonical

kortex_api.autogen.client_stubs.ProtectionZoneClientRpc

__init__(router, namespace=None)

Constructs a ProtectionZoneClient with an initialized RouterClient and an optional namespace.

Parameters
  • router (RouterClient) – RouterClient used for the communication

  • namespace (string) – Optional namespace on which to initialize the ProtectionZoneClient (defaults to None)

IsAlive(timeoutMs: int = 1000)

Returns True if the Service Server is detected online before timeoutMs is expired, False otherwise.

Parameters

timeoutMs (unsigned int) – The maximum time to wait for an answer from the server

Return type

bool

CreateProtectionZone(protectionzoneconfig, deviceId=0, options=RouterClientSendOptions())
The SAFETIES permission is necessary to call this RPC.

Creates a new protection zone and returns a handle to the protection zone.
The arm must be powered off and not be in an Unrecoverable Fault state to create a protection zone.
The parameter orientation from the ZoneShape needs to be an orthonormal matrix, or else an error ERROR_DEVICE, METHOD_FAILED, is raised.
If the shape dimensions are not greater than 0, an the error ERROR_DEVICE, METHOD_FAILED is raised.
The shape dimensions are entered in meters and must be initialized according to the shape_type. The order is important and must be as followed:
The dimensions must contain the radius it is a sphere, the x, y and z (length, width, height) dimensions if it is a rectangular prism, the radius and height if it is a cylinder.
The shape origin needs to be a three dimensional vector that corresponds to the x,y,z coordinates.

Parameters
Return type

ProtectionZoneHandle

UpdateProtectionZone(protectionzoneconfig, deviceId=0, options=RouterClientSendOptions())
The SAFETIES permission is necessary to call this RPC.

Updates an existing protection zone
The arm must be powered off and not be in an Unrecoverable Fault state to update a protection zone.
Updates on the protection zone fields need to follow the same rules as the ones mentioned in CreateProtectionZone’s description.
The handle.identifier of the protection zone to be updated needs to match the identifier from an existing protection zone, or else an ENTITY_NOT_FOUND exception is thrown.

Parameters
ReadProtectionZone(protectionzonehandle, deviceId=0, options=RouterClientSendOptions())
The READ_ONLY permission is necessary to call this RPC.

Retrieves an existing protection zone
Parameters
Return type

ProtectionZoneConfig

DeleteProtectionZone(protectionzonehandle, deviceId=0, options=RouterClientSendOptions())
The SAFETIES permission is necessary to call this RPC.

Deletes an existing protection zone
The arm must be powered off and not be in an Unrecoverable Fault state to delete a protection zone.
The handle.identifier of the protection zone to be deleted needs to match the identifier from an existing protection zone, or else an ENTITY_NOT_FOUND exception is thrown.

Parameters
ReadAllProtectionZones(deviceId = 0, options = RouterClientSendOptions())
The READ_ONLY permission is necessary to call this RPC.

Retrieves a list of all protection zones
Parameters
  • deviceId (int) – Device’s Id called by rpc (optional)

  • options (RouterClientSendOptions) – Router options for sending the message

Return type

ProtectionZoneConfigList

SetToolSphere(toolsphere, deviceId=0, options=RouterClientSendOptions())
The SAFETIES permission is necessary to call this RPC.

Sets the tool sphere.
The arm must be powered off and not be in an Unrecoverable Fault state to set the tool sphere.

Parameters
GetToolSphere(deviceId = 0, options = RouterClientSendOptions())
The READ_ONLY permission is necessary to call this RPC.

Gets the tool sphere
Parameters
  • deviceId (int) – Device’s Id called by rpc (optional)

  • options (RouterClientSendOptions) – Router options for sending the message

Return type

ToolSphere

OnNotificationProtectionZoneChangeTopic(callback, notificationoptions)
The READ_ONLY permission is necessary to call this RPC.

Subscribes to protection zone change topic for notifications
Parameters
Return type

NotificationHandle

OnNotificationToolSphereChangeTopic(callback, notificationoptions)
The READ_ONLY permission is necessary to call this RPC.

Subscribes to tool sphere change topic for notifications
Parameters
Return type

NotificationHandle

Unsubscribe(notificationhandle, deviceId=0, options=RouterClientSendOptions())
The READ_ONLY permission is necessary to call this RPC.

Unsubscribes client from receiving notifications for the specified topic
Parameters