ouster.sdk.sensor

Module contents

Copyright (c) 2024, Ouster, Inc. All rights reserved.

This module provides interfaces and utilities for interacting with Ouster lidar sensors directly. It includes classes for streaming packets and scans from a sensor, configuring sensor settings, handling HTTP communication, and managing sensor-related errors.

SensorPacketSource

class SensorPacketSource(*args, **kwargs)

SensorPacketSource is a class for reading packet data from a sensor.

Examples

  • Reading packets from a sensor:

    SensorPacketSource(sensors, config_timeout, buffer_time)

Parameters:
  • sensors (List[Sensor]) – A list of sensors to read packets from.

  • config_timeout (float) – Timeout for sensor configuration in seconds.

  • buffer_time (float) – Buffer time for packet storage in seconds.

Returns:

An instance of the packet source for reading packets.

Return type:

SensorPacketSource

Overloaded function.

  1. __init__(self: ouster.sdk._bindings.client.SensorPacketSource, sensors: list[ouster::sdk::sensor::Sensor], config_timeout: float = 40, buffer_time: float = 0) -> None

  2. __init__(self: ouster.sdk._bindings.client.SensorPacketSource, file: str, **kwargs) -> None

  3. __init__(self: ouster.sdk._bindings.client.SensorPacketSource, file: list[str], **kwargs) -> None

  4. __init__(self: ouster.sdk._bindings.client.SensorPacketSource, sensors: list[ouster::sdk::sensor::Sensor], metadata: list[ouster.sdk._bindings.client.SensorInfo], config_timeout: float = 40, buffer_time: float = 0) -> None

__annotations__ = {}
__init__(*args, **kwargs)

Overloaded function.

  1. __init__(self: ouster.sdk._bindings.client.SensorPacketSource, sensors: list[ouster::sdk::sensor::Sensor], config_timeout: float = 40, buffer_time: float = 0) -> None

  2. __init__(self: ouster.sdk._bindings.client.SensorPacketSource, file: str, **kwargs) -> None

  3. __init__(self: ouster.sdk._bindings.client.SensorPacketSource, file: list[str], **kwargs) -> None

  4. __init__(self: ouster.sdk._bindings.client.SensorPacketSource, sensors: list[ouster::sdk::sensor::Sensor], metadata: list[ouster.sdk._bindings.client.SensorInfo], config_timeout: float = 40, buffer_time: float = 0) -> None

__module__ = 'ouster.sdk._bindings.client'
buffer_size(self: ouster.sdk._bindings.client.SensorPacketSource) int
property dropped_packets
flush(self: ouster.sdk._bindings.client.SensorPacketSource) None
get_packet(self: ouster.sdk._bindings.client.SensorPacketSource, timeout: float = 0.1) ouster::sdk::sensor::ClientEvent

SensorScanSource

class SensorScanSource(*args, **kwargs)

Overloaded function.

  1. __init__(self: ouster.sdk._bindings.client.SensorScanSource, file: str) -> None

  2. __init__(self: ouster.sdk._bindings.client.SensorScanSource, sensors: list[ouster::sdk::sensor::Sensor], config_timeout: float = 40, queue_size: int = 2, soft_id_check: bool = False) -> None

  3. __init__(self: ouster.sdk._bindings.client.SensorScanSource, file: str, **kwargs) -> None

  4. __init__(self: ouster.sdk._bindings.client.SensorScanSource, file: list[str], **kwargs) -> None

  5. __init__(self: ouster.sdk._bindings.client.SensorScanSource, sensors: list[ouster::sdk::sensor::Sensor], metadata: list[ouster.sdk._bindings.client.SensorInfo], config_timeout: float = 40, queue_size: int = 2, soft_id_check: bool = False) -> None

  6. __init__(self: ouster.sdk._bindings.client.SensorScanSource, sensors: list[ouster::sdk::sensor::Sensor], metadata: list[ouster.sdk._bindings.client.SensorInfo], fields: list[list[ouster.sdk._bindings.client.FieldType]], config_timeout: float = 40, queue_size: int = 2, soft_id_check: bool = False) -> None

__annotations__ = {}
__init__(*args, **kwargs)

Overloaded function.

  1. __init__(self: ouster.sdk._bindings.client.SensorScanSource, file: str) -> None

  2. __init__(self: ouster.sdk._bindings.client.SensorScanSource, sensors: list[ouster::sdk::sensor::Sensor], config_timeout: float = 40, queue_size: int = 2, soft_id_check: bool = False) -> None

  3. __init__(self: ouster.sdk._bindings.client.SensorScanSource, file: str, **kwargs) -> None

  4. __init__(self: ouster.sdk._bindings.client.SensorScanSource, file: list[str], **kwargs) -> None

  5. __init__(self: ouster.sdk._bindings.client.SensorScanSource, sensors: list[ouster::sdk::sensor::Sensor], metadata: list[ouster.sdk._bindings.client.SensorInfo], config_timeout: float = 40, queue_size: int = 2, soft_id_check: bool = False) -> None

  6. __init__(self: ouster.sdk._bindings.client.SensorScanSource, sensors: list[ouster::sdk::sensor::Sensor], metadata: list[ouster.sdk._bindings.client.SensorInfo], fields: list[list[ouster.sdk._bindings.client.FieldType]], config_timeout: float = 40, queue_size: int = 2, soft_id_check: bool = False) -> None

__module__ = 'ouster.sdk._bindings.client'
property dropped_scans
flush(self: ouster.sdk._bindings.client.SensorScanSource) None
get_scan(self: ouster.sdk._bindings.client.SensorScanSource, timeout: float = 0.1) tuple[int, ouster.sdk._bindings.client.LidarScan]
property id_error_count

SensorHttp

class SensorHttp
__annotations__ = {}
__init__(*args, **kwargs)
__module__ = 'ouster.sdk._bindings.client'
active_config_params(self: ouster.sdk._bindings.client.SensorHttp, timeout_sec: int = 4) str
apply_zone_monitor_staged_config_to_active(self: ouster.sdk._bindings.client.SensorHttp, timeout_sec: int = 40) None
auto_detected_udp_dest(self: ouster.sdk._bindings.client.SensorHttp, timeout_sec: int = 4, original_destination: str | None = None) str
beam_intrinsics(self: ouster.sdk._bindings.client.SensorHttp, timeout_sec: int = 4) str
static create(hostname: str, timeout_sec: int = 40) ouster.sdk._bindings.client.SensorHttp
delete_static_ip(self: ouster.sdk._bindings.client.SensorHttp, timeout_sec: int = 4) None
delete_user_data(self: ouster.sdk._bindings.client.SensorHttp, timeout_sec: int = 4) None
delete_zone_monitor_staged_config(self: ouster.sdk._bindings.client.SensorHttp, timeout_sec: int = 40) None
diagnostics_dump(self: ouster.sdk._bindings.client.SensorHttp, timeout_sec: int = 40) bytes
firmware_version(self: ouster.sdk._bindings.client.SensorHttp) ouster.sdk._bindings.client.Version
get_config_params(self: ouster.sdk._bindings.client.SensorHttp, active: bool, timeout_sec: int = 4) str
static get_firmware_version(hostname: str, timeout_sec: int = 4) ouster.sdk._bindings.client.Version
get_user_data(self: ouster.sdk._bindings.client.SensorHttp, timeout_sec: int = 4) str
get_zone_monitor_config_zip(self: ouster.sdk._bindings.client.SensorHttp, staged: bool = False, timeout_sec: int = 40) bytes
get_zone_monitor_live_ids(self: ouster.sdk._bindings.client.SensorHttp, timeout_sec: int = 4) list[int]
hostname(self: ouster.sdk._bindings.client.SensorHttp) str
imu_intrinsics(self: ouster.sdk._bindings.client.SensorHttp, timeout_sec: int = 4) str
lidar_data_format(self: ouster.sdk._bindings.client.SensorHttp, timeout_sec: int = 4) str
lidar_intrinsics(self: ouster.sdk._bindings.client.SensorHttp, timeout_sec: int = 4) str
metadata(self: ouster.sdk._bindings.client.SensorHttp, timeout_sec: int = 4) str
network(self: ouster.sdk._bindings.client.SensorHttp, timeout_sec: int = 4) str
reinitialize(self: ouster.sdk._bindings.client.SensorHttp, timeout_sec: int = 4) None
restart(self: ouster.sdk._bindings.client.SensorHttp, timeout_sec: int = 40) None
save_config_params(self: ouster.sdk._bindings.client.SensorHttp, timeout_sec: int = 4) None
sensor_info(self: ouster.sdk._bindings.client.SensorHttp, timeout_sec: int = 4) str
set_config_param(self: ouster.sdk._bindings.client.SensorHttp, key: str, value: str, timeout_sec: int = 4) None
set_static_ip(*args, **kwargs)

Overloaded function.

  1. set_static_ip(self: ouster.sdk._bindings.client.SensorHttp, ip_address: str, timeout_sec: int = 4) -> None

  2. set_static_ip(self: ouster.sdk._bindings.client.SensorHttp, ip_address: str, gateway_address: str, timeout_sec: int = 4) -> None

set_udp_dest_auto(self: ouster.sdk._bindings.client.SensorHttp, timeout_sec: int = 4) None
set_user_data(self: ouster.sdk._bindings.client.SensorHttp, data: str, keep_on_config_delete: bool = True, timeout_sec: int = 4) None
set_zone_monitor_config_zip(self: ouster.sdk._bindings.client.SensorHttp, zip_bytes: str, timeout_sec: int = 40) None
set_zone_monitor_live_ids(self: ouster.sdk._bindings.client.SensorHttp, zone_ids: list[int], timeout_sec: int = 4) None
staged_config_params(self: ouster.sdk._bindings.client.SensorHttp, timeout_sec: int = 4) str

ClientTimeout

class ClientTimeout
__module__ = 'ouster.sdk._bindings.client'

ClientError

class ClientError
__annotations__ = {}
__module__ = 'ouster.sdk._bindings.client'
__weakref__

list of weak references to the object (if defined)

ClientOverflow

class ClientOverflow
__annotations__ = {}
__module__ = 'ouster.sdk._bindings.client'

get_config

get_config(hostname: str, active: bool = True) ouster.sdk._bindings.client.SensorConfig

Returns sensor config parameters as SensorConfig.

Parameters:
  • hostname (str) – hostname of the sensor

  • active (bool) – return active or staged sensor configuration

set_config

set_config(hostname: str, config: ouster.sdk._bindings.client.SensorConfig, persist: bool = False, udp_dest_auto: bool = False, force_reinit: bool = False) None

Set sensor config parameters on sensor.

Parameters:
  • hostname (str) – hostname of the sensor

  • config (SensorConfig) – config to set sensor parameters to

  • persist (bool) – persist parameters after sensor disconnection (default = False)

  • udp_dest_auto (bool) – automatically determine sender’s IP at the time command was sent and set it as destination of UDP traffic. Function will error out if config has udp_dest member. (default = False)

  • force_reinit (bool) – forces the sensor to re-init during set_config even when config params have not changed. (default = False)

set_http_api_headers

set_http_api_headers(headers: list[str]) None

set_http_api_prefix

set_http_api_prefix(prefix: str) None