Ptz

For clients to the Spot CAM Ptz service.

class bosdyn.client.spot_cam.ptz.PtzClient[source]

Bases: BaseClient

A client calling Spot CAM Ptz service.

default_service_name = 'spot-cam-ptz'
service_type = 'bosdyn.api.spot_cam.PtzService'
list_ptz(**kwargs)[source]

List all the available ptzs

list_ptz_async(**kwargs)[source]

Async version of list_ptz()

get_ptz_position(ptz_desc, **kwargs)[source]

Position of the specified ptz

get_ptz_position_async(ptz_desc, **kwargs)[source]

Async version of get_ptz_position()

get_ptz_velocity(ptz_desc, **kwargs)[source]

Velocity of the specified ptz

get_ptz_velocity_async(ptz_desc, **kwargs)[source]

Async version of get_ptz_velocity()

set_ptz_position(ptz_desc, pan, tilt, zoom, **kwargs)[source]

Set position of the specified ptz in PTZ-space

set_ptz_position_async(ptz_desc, pan, tilt, zoom, **kwargs)[source]

Async version of set_ptz_position()

set_ptz_velocity(ptz_desc, pan, tilt, zoom, **kwargs)[source]

Set velocity of the specified ptz in PTZ-space

set_ptz_velocity_async(ptz_desc, pan, tilt, zoom, **kwargs)[source]

Async version of set_ptz_velocity()

initialize_lens(**kwargs)[source]

Initializes the PTZ autofocus or resets it if already initialized

initialize_lens_async(**kwargs)[source]

Async version of initialize_lens()

get_ptz_focus_state(**kwargs)[source]

Retrieve focus of the mechanical ptz

Parameters:
  • focus_mode (PtzFocusMode) – Enum indicating whether to autofocus or manually focus

  • distance (float) – Approximate distance to focus on, most accurate between 1.2m and 20m, only settable in PTZ_FOCUS_MANUAL mode

  • focus_position (int32) – Precise lens position for the camera for repeatable operations, overrides distance if specified, only settable in PTZ_FOCUS_MANUAL mode

Returns:

PtzFocusState containing the current focus mode and position

get_ptz_focus_state_async(**kwargs)[source]

Async version of get_ptz_focus_state()

set_ptz_focus_state(focus_mode, distance=None, focus_position=None, **kwargs)[source]

Set focus of the mechanical ptz

Parameters:
  • focus_mode (PtzFocusMode) – Enum indicating whether to autofocus or manually focus

  • distance (float) – Approximate distance to focus on, most accurate between 1.2m and 20m, only settable in PTZ_FOCUS_MANUAL mode

  • focus_position (int32) – Precise lens position for the camera for repeatable operations, overrides distance if specified, only settable in PTZ_FOCUS_MANUAL mode

Returns:

SetPtzFocusStateResponse indicating whether the call was successful

set_ptz_focus_state_async(focus_mode, distance=None, focus_position=None, **kwargs)[source]

Async version of set_ptz_focus_state()

bosdyn.client.spot_cam.ptz.shift_pan_angle(pan)[source]

Shift the pan angle (degrees) so that it is in the [0,360] range.