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'
- 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
- 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
- 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