ouster.sdk.core¶
Module contents¶
Copyright (c) 2021, Ouster, Inc. All rights reserved.
Core namespace provides core classes, functions, and utilities for working with Ouster lidar sensor data in Python. It covers packet and frame handling, data transformations, and various helpers for processing and managing lidar data.
Classes¶
class ClippedFrameSetSource(frame_set_source, fields, lower, upper)class FrameBatcher(self, arg : ouster.sdk.core.SensorInfo, /)class FrameBorder(meta, pred=<function FrameBorder.<lambda>>)class PacketFormat(self, arg : ouster.sdk.core.SensorInfo, /)class XYZLut(self, info : ouster.sdk.core.SensorInfo, use_extrinsics : bool = False)class XYZLutFloat(self, info : ouster.sdk.core.SensorInfo, use_extrinsics : bool = True)
Functions¶
collate(source : ouster.sdk.core.FrameSetSource, dt : int = 0) → ouster.sdk.core.Collatorextension_from_io_type(io_type : ouster.sdk.core.IoType) → Optional [ str ]get_field_types(info : ouster.sdk.core.SensorInfo) → list [ ouster.sdk.core.FieldType ]io_type_from_extension(filename : str) → ouster.sdk.core.IoTypepose_at_timestamp(frame : ouster.sdk.core.LidarFrame, lidar_ts : int) → ouster.sdk.core.Poseread_pointcloud(arg : str, /) → numpy.ndarray[dtype=float32, shape=(*, 3), order='C']transform(points: ndarray[writable=False], pose: ndarray[shape=(4, 4), writable=False]) → object
AutoExposure¶
- class AutoExposure(self)¶
- class AutoExposure(self, update_every: int)
- class AutoExposure(self, lo_percentile: float, hi_percentile: float, update_every: int, damping: float = 0.9)
- __init__(self) None¶
- __init__(self, update_every: int) None
- __init__(self, lo_percentile: float, hi_percentile: float, update_every: int, damping: float = 0.9) None
- __module__ = 'ouster.sdk.core'¶
- __new__(**kwargs)¶
- update(self, image: ndarray[dtype=float32, shape=(*, *, *), order='C'], update_state: bool = True) None¶
- update(self, image: ndarray[dtype=float64, shape=(*, *, *), order='C'], update_state: bool = True) None
- update(self, image: ndarray[dtype=float16, shape=(*, *, *), order='C'], update_state: bool = True) numpy.ndarray[dtype=float32, order='C']
- update(self, image: ndarray[dtype=float32, shape=(*, *), order='C'], update_state: bool = True) None
- update(self, image: ndarray[dtype=float64, shape=(*, *), order='C'], update_state: bool = True) None
BeamUniformityCorrector¶
- class BeamUniformityCorrector(self)¶
- __init__(self) None¶
- __module__ = 'ouster.sdk.core'¶
- __new__(**kwargs)¶
- update(self, image: ndarray[dtype=float32, shape=(*, *), order='C'], update_state: bool = True) None¶
- update(self, image: ndarray[dtype=float64, shape=(*, *), order='C'], update_state: bool = True) None
BloomReductionOptimization¶
- class BloomReductionOptimization(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)¶
Bloom Reduction Optimization.
- __nb_enum__ = <capsule object NULL>¶
- BALANCED = 0¶
- MINIMIZE_FALSE_POSITIVES = 1¶
- values = <nanobind.nb_func object>¶
- __int__(self) int¶
The value of the Enum member.
- from_string = <nanobind.nb_func object>¶
- __annotations__ = {'_unhashable_values_': 'list', '_use_args_': 'bool', '_value_repr_': 'None', 'value': 'int'}¶
- property value: int¶
The value of the Enum member.
- __repr__()¶
Return repr(self).
- __str__(self) str¶
- __module__ = 'ouster.sdk.core'¶
ouster.sdk.core.data¶
Copyright (c) 2021, Ouster, Inc. All rights reserved.
- BufferT¶
Types that support the buffer protocol.
alias of
bytes|bytearray|memoryview|ndarray
- class ChanField[source]¶
Bases:
object- B = 'B'¶
- FLAGS = 'FLAGS'¶
- FLAGS2 = 'FLAGS2'¶
- G = 'G'¶
- GROUND = 'GROUND'¶
- GROUND2 = 'GROUND2'¶
- IMU_ACC = 'IMU_ACC'¶
- IMU_ALERT_FLAGS = 'IMU_ALERT_FLAGS'¶
- IMU_GYRO = 'IMU_GYRO'¶
- IMU_MEASUREMENT_ID = 'IMU_MEASUREMENT_ID'¶
- IMU_PACKET_TIMESTAMP = 'IMU_PACKET_TIMESTAMP'¶
- IMU_STATUS = 'IMU_STATUS'¶
- IMU_TIMESTAMP = 'IMU_TIMESTAMP'¶
- LIVE_ZONESET_HASH = 'LIVE_ZONESET_HASH'¶
- NEAR_IR = 'NEAR_IR'¶
- NORMALS = 'NORMALS'¶
- NORMALS2 = 'NORMALS2'¶
- POSITION_LAT_LONG = 'POSITION_LAT_LONG'¶
- POSITION_STRING = 'POSITION_STRING'¶
- POSITION_TIMESTAMP = 'POSITION_TIMESTAMP'¶
- R = 'R'¶
- RANGE = 'RANGE'¶
- RANGE2 = 'RANGE2'¶
- RAW32_WORD1 = 'RAW32_WORD1'¶
- RAW32_WORD2 = 'RAW32_WORD2'¶
- RAW32_WORD3 = 'RAW32_WORD3'¶
- RAW32_WORD4 = 'RAW32_WORD4'¶
- RAW32_WORD5 = 'RAW32_WORD5'¶
- RAW32_WORD6 = 'RAW32_WORD6'¶
- RAW32_WORD7 = 'RAW32_WORD7'¶
- RAW32_WORD8 = 'RAW32_WORD8'¶
- RAW32_WORD9 = 'RAW32_WORD9'¶
- RAW_HEADERS = 'RAW_HEADERS'¶
- REFLECTIVITY = 'REFLECTIVITY'¶
- REFLECTIVITY2 = 'REFLECTIVITY2'¶
- RGB = 'RGB'¶
- SIGNAL = 'SIGNAL'¶
- SIGNAL2 = 'SIGNAL2'¶
- WINDOW = 'WINDOW'¶
- ZONE = 'ZONE'¶
- ZONE_ALERT_FLAGS = 'ZONE_ALERT_FLAGS'¶
- ZONE_PACKET_TIMESTAMP = 'ZONE_PACKET_TIMESTAMP'¶
- ZONE_STATES = 'ZONE_STATES'¶
- ZONE_TIMESTAMP = 'ZONE_TIMESTAMP'¶
- class ColHeader(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
Bases:
EnumColumn headers available in lidar data.
This definition is deprecated.
- ENCODER_COUNT = 1¶
- FRAME_ID = 4¶
- MEASUREMENT_ID = 2¶
- STATUS = 3¶
- TIMESTAMP = 0¶
- packet_ts(packet)[source]¶
Return the packet timestamp in nanoseconds :rtype:
int- Parameters:
packet (Packet)
- Return type:
int
- stagger(info, fields)[source]¶
Return a staggered copy of the provided fields.
In the default staggered representation, each column corresponds to a single timestamp. A destaggered representation compensates for the azimuth offset of each beam, returning columns that correspond to a single azimuth angle.
- Parameters:
info (
SensorInfo) – Sensor metadata associated with the provided datafields (
ndarray) – A numpy array of shape H X W or H X W X N
- Return type:
ndarray- Returns:
A staggered numpy array of the same shape
CalibrationStatus¶
- class CalibrationStatus(self)¶
Sensor Calibration in a Sensor Metadata, covering reflectivity calibration and more”
- __annotations__ = {'reflectivity_status': 'None', 'reflectivity_timestamp': 'None'}¶
- __eq__(self, arg: object, /) bool¶
- __init__(self) None¶
Sensor Calibration in a Sensor Metadata, covering reflectivity calibration and more”
- __module__ = 'ouster.sdk.core'¶
- __new__(**kwargs)¶
- __str__(self) str¶
- property reflectivity_status: None¶
Reflectivity calibration status.
- property reflectivity_timestamp: None¶
Reflectivity timestamp.
ClassMap¶
ClassMapSet¶
- class ClassMapSet(self, arg: dict, /)¶
- __eq__(self, arg: object, /) bool¶
- __getitem__(self, arg: str, /) ouster.sdk.core.ClassMap¶
- __init__(self, arg: dict, /) None¶
- __module__ = 'ouster.sdk.core'¶
- __ne__(self, arg: object, /) bool¶
- __new__(**kwargs)¶
- get(self, key: str, default_value: object | None = None) object¶
- keys(self) list[str]¶
Get the keys of the class maps in the set. :returns: A list of strings representing the keys of the class maps in the set.
ouster.sdk.core.clipped_frame_set_source¶
- class ClippedFrameSetSource(frame_set_source, fields, lower, upper)[source]¶
Bases:
FrameSetSourcelimits the values of the specified set of fields to within the range = [lower, upper], any value that exceeds this range is replaced by zero.
- Parameters:
frame_set_source (FrameSetSource)
fields (List[str])
lower (int)
upper (int)
- property frames_num: List[int]¶
(self) -> list[int]
- property is_indexed: bool¶
(self) -> bool
- property is_live: bool¶
Check if the frame set source is live.
A live frame set source indicates that it is actively receiving data from a sensor.
- Returns:
True if the frame set source is live, False otherwise.
- Return type:
bool
- property sensor_info: List[SensorInfo]¶
Retrieve sensor information for all sensors in the frame set source.
- Returns:
A list of SensorInfo objects, each containing metadata about a sensor, such as serial number, firmware version, and calibration details.
CoordinateFrame¶
DataFormat¶
- class DataFormat(self)¶
Data Format of a packet coming from sensor
See sensor documentation for the meaning of each property
- __annotations__ = {'column_window': 'None', 'columns_per_frame': 'None', 'columns_per_packet': 'None', 'fps': 'None', 'header_type': 'None', 'imu_measurements_per_packet': 'None', 'imu_packets_per_frame': 'None', 'pixel_shift_by_row': 'None', 'pixels_per_column': 'None', 'udp_profile_imu': 'None', 'udp_profile_lidar': 'None', 'zone_monitoring_enabled': 'None'}¶
- __eq__(self, arg: object, /) bool¶
- __init__(self) None¶
Data Format of a packet coming from sensor
See sensor documentation for the meaning of each property
- __module__ = 'ouster.sdk.core'¶
- __new__(**kwargs)¶
- property column_window: None¶
Firing window of sensor, set by config.azimuth_window
- Type:
Tuple[int, int]
- property columns_per_frame: None¶
Columns per frame in the lidar packet, corresponding with LidarMode
- Type:
int
- property columns_per_packet: None¶
Columns per packet in the lidar packet, typically 16
- Type:
int
- property fps: None¶
Frames per second, e.g., 10 for LidarMode 1024x10
- Type:
int
- property header_type: None¶
Lidar/IMU packet header profile
- property imu_measurements_per_packet: None¶
Number of IMU measurements per IMU packet
- Type:
int
- property imu_packets_per_frame: None¶
Number of IMU packets per frame
- Type:
int
- lidar_packets_per_frame(self) int¶
Return the number of valid packets actually sent per frame of data with the column_window applied.
- property pixel_shift_by_row: None¶
Shift of pixels by row to create natural images
- Type:
List[int]
- property pixels_per_column: None¶
Pixels per column in the lidar packet, synonymous with the number of beams of the sensor
- Type:
int
- property udp_profile_imu: None¶
IMU packet profile
- property udp_profile_lidar: None¶
Lidar packet profile
- valid_columns_per_frame(self) int¶
Return the number of valid columns per complete frame of data with the column_window applied.
- property zone_monitoring_enabled: None¶
True if zone monitoring is enabled, otherwise False.
- Type:
bool
ouster.sdk.core.zone_common¶
FieldClass¶
- class FieldClass(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)¶
LidarFrame field classes
- __format__(format_spec, /)¶
Convert to a string according to format_spec.
- __str__(self) str¶
- __repr__()¶
Return repr(self).
- __new__(value)¶
- __int__(self) int¶
The value of the Enum member.
- __nb_enum__ = <capsule object NULL>¶
- PIXEL_FIELD = 0¶
- COLUMN_FIELD = 1¶
- PACKET_FIELD = 2¶
- FRAME_FIELD = 3¶
- COLLATION_FIELD = 4¶
- values = <nanobind.nb_func object>¶
- from_string = <nanobind.nb_func object>¶
- SCAN_FIELD = 3¶
- property value: int¶
The value of the Enum member.
- __module__ = 'ouster.sdk.core'¶
FieldDecodeInfo¶
- class FieldDecodeInfo(self, dtype_arg: object, offset: int, mask: int, shift: int, num_elements: int = 1)¶
- __annotations__ = {'mask': 'None', 'num_elements': 'None', 'offset': 'None', 'shift': 'None', 'ty_tag': 'object'}¶
- __init__(self, dtype_arg: object, offset: int, mask: int, shift: int, num_elements: int = 1) None¶
- __module__ = 'ouster.sdk.core'¶
- __new__(**kwargs)¶
- property mask: None¶
(self) -> int
- property num_elements: None¶
(self) -> int
- property offset: None¶
(self) -> int
- property shift: None¶
(self) -> int
- property ty_tag: object¶
(self) -> object
FieldType¶
- class FieldType(self, name: str, dtype: object, extra_dims: tuple = (), field_class: int = FieldClass.PIXEL_FIELD)¶
Describes a field.
Construct a FieldType.
- Parameters:
name – name of the field
dt – data type of the field, e.g. np.uint8.
extra_dims – a tuple representing the number of elements. in the dimensions beyond width and height, for fields with three or more dimensions.
field_class – indicates whether the field has an entry per-packet, per-column, per-frame or per-pixel.
- __annotations__ = {'element_type': 'None', 'extra_dims': 'None', 'field_class': 'None', 'name': 'None'}¶
- __eq__(self, arg: object, /) bool¶
- __init__(self, name: str, dtype: object, extra_dims: tuple = (), field_class: int = FieldClass.PIXEL_FIELD) None¶
Construct a FieldType.
- Parameters:
name (str) – name of the field
dt – data type of the field, e.g. np.uint8.
extra_dims (tuple) – a tuple representing the number of elements. in the dimensions beyond width and height, for fields with three or more dimensions.
field_class (int) – indicates whether the field has an entry per-packet, per-column, per-frame or per-pixel.
- __lt__(self, arg: ouster.sdk.core.FieldType, /) bool¶
- __module__ = 'ouster.sdk.core'¶
- __new__(**kwargs)¶
- __repr__(self) str¶
- __str__(self) str¶
- property element_type: None¶
The data type (as a numpy dtype) of the field.
- property extra_dims: None¶
A tuple representing the size of extra dimensions (if the field is greater than 2 dimensions.)
- property field_class: None¶
“field_class - an enum that indicates whether the field has an entry per-packet, per-column, per-frame or per-pixel.
- property name: None¶
The name of the field.
ouster.sdk.core.core¶
Copyright (c) 2021, Ouster, Inc. All rights reserved.
This module contains wrappers for packet sources, frame borders, and pose validation. Defines how to read packets, manage frames, and check pose validity.
- class FrameBorder(meta, pred=<function FrameBorder.<lambda>>)[source]¶
Bases:
objectCreate callable helper that indicates the cross frames packets.
- Parameters:
meta (SensorInfo)
pred (Callable[[Packet], bool])
- class Packets(it, metadata)[source]¶
Bases:
PacketSourceCreate a
PacketSourcefrom an existing iterator.- Parameters:
it (
Iterable[Union[LidarPacket,ImuPacket,ZonePacket]]) – A stream of packetsmetadata (
SensorInfo) – Metadata for the packet stream
- property is_live: bool¶
Check if the packet source is live.
- property sensor_info: List[SensorInfo]¶
Retrieve sensor information for all sensors in the packet source.
- Returns:
A list of SensorInfo objects, each containing metadata about a sensor, such as serial number, firmware version, and calibration details.
- first_valid_column_pose(frame)[source]¶
Return first valid column pose of a LidarFrame :rtype:
ndarray- Parameters:
frame (LidarFrame)
- Return type:
ndarray
- last_valid_column_pose(frame)[source]¶
Return last valid column pose of a LidarFrame :rtype:
ndarray- Parameters:
frame (LidarFrame)
- Return type:
ndarray
FrameBatcher¶
- class FrameBatcher(self, arg: ouster.sdk.core.SensorInfo, /)¶
- __call__(self, arg0: ouster.sdk.core.Packet, arg1: ouster.sdk.core.LidarFrame, /) bool¶
- __init__(self, arg: ouster.sdk.core.SensorInfo, /) None¶
- __module__ = 'ouster.sdk.core'¶
- __new__(**kwargs)¶
- batch(self, arg0: ouster.sdk.core.Packet, arg1: ouster.sdk.core.LidarFrame, /) bool¶
- batched_packets(self) int¶
- dropped_packets(self) int¶
- get_max_cache_size(self) int¶
- reset(self) None¶
- set_max_cache_size(self, arg: int, /) None¶
FrameSet¶
- class FrameSet(self)¶
- class FrameSet(self, frames: Sequence[LidarFrame | None], /)
- class FrameSet(self, *, scans: Sequence[LidarFrame | None])
- __annotations__ = {'fields': 'list[str]', 'objects': 'DictStrObjectList'}¶
- __copy__(self) ouster.sdk.core.FrameSet¶
- __deepcopy__(self, arg: dict, /) ouster.sdk.core.FrameSet¶
- __eq__(self, arg: object, /) bool¶
- __getitem__(self, index: int, /) Optional[LidarFrame]¶
- __init__(self) None¶
- __init__(self, frames: Sequence[LidarFrame | None], /) None
- __init__(self, *, scans: Sequence[LidarFrame | None]) None
- __iter__(self) Iterator[Optional[LidarFrame]]¶
- __len__(self) int¶
- __module__ = 'ouster.sdk.core'¶
- __new__(**kwargs)¶
- __repr__(self) str¶
- __setitem__(self, index: int, value: ouster.sdk.core.LidarFrame | None) None¶
- add_field(self, name: str, data: NDArray, /) NDArray¶
- add_field(self, name: str, dtype: type, shape: Tuple[int, ...] = (), /) NDArray
- del_field(self, name: str, /) NDArray¶
- field(self, name: str, /) NDArray¶
- property fields: list[str]¶
(self) -> list[str]
- has_field(self, arg: str, /) bool¶
- property objects: DictStrObjectList¶
(self) -> ouster.sdk.core.DictStrObjectList
- valid_frames(self) list[ouster.sdk.core.LidarFrame]¶
Return a list of frames that are valid.
- valid_indices(self) list[int]¶
Return a list of the indices for frames that are valid.
- valid_scans(self) list[ouster.sdk.core.LidarFrame]¶
Deprecated: use valid_frames instead.
FrameSetSource¶
- class FrameSetSource(self)¶
FrameSetSource is a base class for reading point cloud data from various sources.
- __annotations__ = {'contains_collations': 'bool', 'frames_num': 'list[int]', 'full_index': 'Annotated[NDArray[numpy.uint64], dict(writable=False)]', 'individual_index': 'list[Annotated[NDArray[numpy.uint64], dict(writable=False)]]', 'is_collated': 'bool', 'is_indexed': 'bool', 'is_live': 'bool', 'scans_num': 'list[int]', 'sensor_info': 'list[SensorInfo]'}¶
- __enter__(self) object¶
- __exit__(self, exc_type: object | None, exc_value: object | None, traceback: object | None) None¶
- __getitem__(self, arg: int, /) ouster.sdk.core.FrameSet¶
- __getitem__(self, arg: slice, /) ouster.sdk.core.Slicer
- __init__(self) None¶
- __len__(self) int¶
- __length_hint__(self) int¶
- __module__ = 'ouster.sdk.core'¶
- __new__(**kwargs)¶
- clip(fields, lower, upper)¶
limits the values of the specified set of fields to within the range = [lower, upper], any value that exceeds this range is replaced by zero.
- Parameters:
self (FrameSetSource)
fields (List[str])
lower (int)
upper (int)
- close(self) None¶
- property contains_collations: bool¶
(self) -> bool
- property frames_num: list[int]¶
(self) -> list[int]
- property full_index: Annotated[NDArray[numpy.uint64], dict(writable=False)]¶
(self) -> numpy.ndarray[dtype=uint64, writable=False]
- property individual_index: list[Annotated[NDArray[numpy.uint64], dict(writable=False)]]¶
(self) -> list[numpy.ndarray[dtype=uint64, writable=False]]
- property is_collated: bool¶
(self) -> bool
- property is_indexed: bool¶
(self) -> bool
- property is_live: bool¶
Check if the frame set source is live.
A live frame set source indicates that it is actively receiving data from a sensor.
- Returns:
True if the frame set source is live, False otherwise.
- Return type:
bool
- mask(fields, masks)¶
- Parameters:
self (FrameSetSource)
fields (List[str])
masks (List[ndarray | None])
- metadata(self, key: str) str | ClassMapSet¶
Retrieve a specific metadata entry associated with the frame set source. :param str key: The key of the metadata entry to retrieve. :type key: str
- Returns:
The FrameSetSourceMetadata object corresponding to the provided key.
- metadata_keys(self) set[str]¶
Get the keys of the metadata entries associated with the frame set source. :returns: A list of strings representing the keys of the metadata entries.
- reduce(beams)¶
Takes a regular FrameSetSource and reduces the beams count to the specified values. :rtype:
FrameSetSource- Parameters:
self (FrameSetSource)
beams (List[int])
- Return type:
- property scans_num: list[int]¶
(self) -> list[int]
- select(indices)¶
Takes a regular FrameSetSource and selects the specified beam indices. :rtype:
FrameSetSource- Parameters:
self (FrameSetSource)
indices (List[List[int]])
- Return type:
- property sensor_info: list[SensorInfo]¶
Retrieve sensor information for all sensors in the frame set source.
- Returns:
A list of SensorInfo objects, each containing metadata about a sensor, such as serial number, firmware version, and calibration details.
- single(self, arg: int, /) ouster.sdk.core.Singler¶
- single_iter(self, arg: int, /) ouster.sdk.core.frame_set_iterator¶
- slice(self, arg: slice, /) ouster.sdk.core.Slicer¶
FrameSetSourceMetadataSet¶
- class FrameSetSourceMetadataSet(self)¶
- __getitem__(self, arg: str, /) object¶
- __init__(self) None¶
- __module__ = 'ouster.sdk.core'¶
- __new__(**kwargs)¶
- __setitem__(self, arg0: str, arg1: object, /) None¶
- keys(self) set[str]¶
Get the keys of the metadata entries in the collection. :returns: A list of strings representing the keys of the metadata entries.
FullScaleRange¶
- class FullScaleRange(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)¶
IMU output scale range.
See sensor documentation for details.
- __nb_enum__ = <capsule object NULL>¶
- NORMAL = 0¶
- EXTENDED = 1¶
- values = <nanobind.nb_func object>¶
- __int__(self) int¶
The value of the Enum member.
- from_string = <nanobind.nb_func object>¶
- property value: int¶
The value of the Enum member.
- __repr__()¶
Return repr(self).
- __str__(self) str¶
- __module__ = 'ouster.sdk.core'¶
HeaderType¶
- class HeaderType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)¶
UDP header format profile.
- __nb_enum__ = <capsule object NULL>¶
- STANDARD = 0¶
- FUSA = 1¶
- values = <nanobind.nb_func object>¶
- __int__(self) int¶
The value of the Enum member.
- from_string = <nanobind.nb_func object>¶
- property value: int¶
The value of the Enum member.
- __repr__()¶
Return repr(self).
- __str__(self) str¶
- __module__ = 'ouster.sdk.core'¶
ImuPacket¶
- class ImuPacket(self, size: int = 65536)¶
- class ImuPacket(self, arg: ouster.sdk.core.PacketFormat, /)
- __annotations__ = {}¶
- __copy__(self) ouster.sdk.core.ImuPacket¶
- __deepcopy__(self, arg: dict, /) ouster.sdk.core.ImuPacket¶
- __init__(self, size: int = 65536) None¶
- __init__(self, arg: ouster.sdk.core.PacketFormat, /) None
- __module__ = 'ouster.sdk.core'¶
- __new__(**kwargs)¶
- accel(self) numpy.ndarray[dtype=float32, shape=(*, 3), order='F']¶
- accel_ts(self) int¶
- gyro(self) numpy.ndarray[dtype=float32, shape=(*, 3), order='F']¶
- gyro_ts(self) int¶
- measurement_id(self) numpy.ndarray[dtype=uint16, shape=(*), order='C']¶
- nmea_sentence(self) str¶
- nmea_ts(self) int¶
- status(self) numpy.ndarray[dtype=uint16, shape=(*), order='C']¶
- sys_ts(self) int¶
- timestamp(self) numpy.ndarray[dtype=uint64, shape=(*), order='C']¶
IoType¶
- class IoType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)¶
Enumeration of input/output types.
This enum defines the various types of input/output formats supported by the SDK.
- __nb_enum__ = <capsule object NULL>¶
- OSF = 0¶
- PCAP = 1¶
- SENSOR = 2¶
- BAG = 3¶
- CSV = 4¶
- PLY = 5¶
- PCD = 6¶
- LAS = 7¶
- LAZ = 12¶
- MCAP = 8¶
- STL = 10¶
- PNG = 9¶
- URL = 11¶
- __repr__()¶
Return repr(self).
- __module__ = 'ouster.sdk.core'¶
LidarFrame¶
- class LidarFrame(self)¶
- class LidarFrame(self, h: int, w: int)
- class LidarFrame(self, h: int, w: int, field_types: collections.abc.Sequence[ouster.sdk.core.FieldType], columns_per_packet: int)
- class LidarFrame(self, h: int, w: int, profile: ouster.sdk.core.UDPProfileLidar, columns_per_packet: int)
- class LidarFrame(self, sensor_info: ouster.sdk.core.SensorInfo)
- class LidarFrame(self, sensor_info: ouster.sdk.core.SensorInfo, field_types: collections.abc.Sequence[ouster.sdk.core.FieldType])
- class LidarFrame(self, source: ouster.sdk.core.LidarFrame, field_types: collections.abc.Sequence[ouster.sdk.core.FieldType])
- class LidarFrame(self, source: ouster.sdk.core.LidarFrame)
Represents a single frame of lidar data.
This is a “struct of arrays” representation of lidar data. Column headers are stored as contiguous W element arrays, while fields are WxH arrays. Channel fields are staggered, so the ith column header value corresponds to the ith column of data in each field.
Overloaded function.
__init__(self) -> NoneDefault constructor creates an invalid 0 x 0 frame
- Returns:
New LidarFrame of 0x0
__init__(self, h: int, w: int) -> NoneDefault constructor creates a H x W frame
- Args:
height: height of frame width: width of frame
- Returns:
New LidarFrame of HxW expecting fields of the LEGACY profile
__init__(self, h: int, w: int, field_types: collections.abc.Sequence[ouster.sdk.core.FieldType], columns_per_packet: int) -> NoneInitialize a frame with a custom set of fields
- Args:
height: height of LidarFrame, i.e., number of channels width: width of LidarFrame field_types: list of FieldType that specifies which fields should be present in the frame
- Returns:
New LidarFrame of specified dimensions expecting fields specified by dict
__init__(self, h: int, w: int, profile: ouster.sdk.core.UDPProfileLidar, columns_per_packet: int) -> NoneInitialize a frame with the default fields for a particular udp profile
- Args:
height: height of LidarFrame, i.e., number of channels width: width of LidarFrame profile: udp profile
- Returns:
New LidarFrame of specified dimensions expecting fields of specified
profile
__init__(self, sensor_info: ouster.sdk.core.SensorInfo) -> NoneInitialize a frame with default fields and size for a given sensor_info
- Args:
sensor_info: SensorInfo to construct a frame for
- Returns:
New LidarFrame approprate for the sensor_info
__init__(self, sensor_info: ouster.sdk.core.SensorInfo, field_types: collections.abc.Sequence[ouster.sdk.core.FieldType]) -> NoneInitialize a frame with default fields and size for a given sensor_info with only the specified fields
- Args:
sensor_info: SensorInfo to construct a frame for field_types: list of fields to have in the new frame where keys are ChanFields
and values are type, e.g., FieldType(client.ChanField.SIGNAL, np.uint32)
- Returns:
New LidarFrame approprate for the sensor_info
__init__(self, source: ouster.sdk.core.LidarFrame, field_types: collections.abc.Sequence[ouster.sdk.core.FieldType]) -> NoneInitialize a lidar frame from another with only the indicated fields. Casts, zero pads or removes fields from the original frame if necessary.
- Args:
source: LidarFrame to copy data from field_types: list of fields to have in the new frame where keys are ChanFields
and values are type, e.g., FieldType(client.ChanField.SIGNAL, np.uint32)
- Returns:
New LidarFrame with selected data copied over or zero padded
__init__(self, source: ouster.sdk.core.LidarFrame) -> NoneInitialize a lidar frame with a copy of the data from another.
- Args:
source: LidarFrame to copy
- Returns:
New LidarFrame with data copied over from provided frame.
- __annotations__ = {'alert_flags': 'Annotated[NDArray[numpy.uint8], dict(shape=(None,))]', 'body_to_world': 'NDArray', 'field_types': 'list[FieldType]', 'fields': 'list[str]', 'frame_id': 'None', 'frame_status': 'None', 'h': 'int', 'measurement_id': 'Annotated[NDArray[numpy.uint16], dict(shape=(None,))]', 'objects': 'DictStrObjectList', 'packet_count': 'int', 'packet_timestamp': 'Annotated[NDArray[numpy.uint64], dict(shape=(None,))]', 'pose': 'NDArray', 'sensor_info': 'None', 'shot_limiting_countdown': 'None', 'shutdown_countdown': 'None', 'status': 'Annotated[NDArray[numpy.uint32], dict(shape=(None,))]', 'timestamp': 'Annotated[NDArray[numpy.uint64], dict(shape=(None,))]', 'w': 'int', 'zones': 'NDArray'}¶
- __copy__(self) ouster.sdk.core.LidarFrame¶
- __deepcopy__(self, arg: dict, /) ouster.sdk.core.LidarFrame¶
- __eq__(self, arg: object, /) bool¶
- __init__(self) None¶
- __init__(self, h: int, w: int) None
- __init__(self, h: int, w: int, field_types: collections.abc.Sequence[ouster.sdk.core.FieldType], columns_per_packet: int) None
- __init__(self, h: int, w: int, profile: ouster.sdk.core.UDPProfileLidar, columns_per_packet: int) None
- __init__(self, sensor_info: ouster.sdk.core.SensorInfo) None
- __init__(self, sensor_info: ouster.sdk.core.SensorInfo, field_types: collections.abc.Sequence[ouster.sdk.core.FieldType]) None
- __init__(self, source: ouster.sdk.core.LidarFrame, field_types: collections.abc.Sequence[ouster.sdk.core.FieldType]) None
- __init__(self, source: ouster.sdk.core.LidarFrame) None
Overloaded function.
__init__(self) -> NoneDefault constructor creates an invalid 0 x 0 frame
- Returns:
New LidarFrame of 0x0
__init__(self, h: int, w: int) -> NoneDefault constructor creates a H x W frame
- Args:
height: height of frame width: width of frame
- Returns:
New LidarFrame of HxW expecting fields of the LEGACY profile
__init__(self, h: int, w: int, field_types: collections.abc.Sequence[ouster.sdk.core.FieldType], columns_per_packet: int) -> NoneInitialize a frame with a custom set of fields
- Args:
height: height of LidarFrame, i.e., number of channels width: width of LidarFrame field_types (Sequence[FieldType]): list of FieldType that specifies which fields should be present in the frame
- Returns:
New LidarFrame of specified dimensions expecting fields specified by dict
__init__(self, h: int, w: int, profile: ouster.sdk.core.UDPProfileLidar, columns_per_packet: int) -> NoneInitialize a frame with the default fields for a particular udp profile
- Args:
height: height of LidarFrame, i.e., number of channels width: width of LidarFrame profile (UDPProfileLidar): udp profile
- Returns:
New LidarFrame of specified dimensions expecting fields of specified
profile
__init__(self, sensor_info: ouster.sdk.core.SensorInfo) -> NoneInitialize a frame with default fields and size for a given sensor_info
- Args:
sensor_info (SensorInfo): SensorInfo to construct a frame for
- Returns:
New LidarFrame approprate for the sensor_info
__init__(self, sensor_info: ouster.sdk.core.SensorInfo, field_types: collections.abc.Sequence[ouster.sdk.core.FieldType]) -> NoneInitialize a frame with default fields and size for a given sensor_info with only the specified fields
- Args:
sensor_info (SensorInfo): SensorInfo to construct a frame for field_types (Sequence[FieldType]): list of fields to have in the new frame where keys are ChanFields
and values are type, e.g., FieldType(client.ChanField.SIGNAL, np.uint32)
- Returns:
New LidarFrame approprate for the sensor_info
__init__(self, source: ouster.sdk.core.LidarFrame, field_types: collections.abc.Sequence[ouster.sdk.core.FieldType]) -> NoneInitialize a lidar frame from another with only the indicated fields. Casts, zero pads or removes fields from the original frame if necessary.
- Args:
source (LidarFrame): LidarFrame to copy data from field_types (Sequence[FieldType]): list of fields to have in the new frame where keys are ChanFields
and values are type, e.g., FieldType(client.ChanField.SIGNAL, np.uint32)
- Returns:
New LidarFrame with selected data copied over or zero padded
__init__(self, source: ouster.sdk.core.LidarFrame) -> NoneInitialize a lidar frame with a copy of the data from another.
- Args:
source (LidarFrame): LidarFrame to copy
- Returns:
New LidarFrame with data copied over from provided frame.
- __module__ = 'ouster.sdk.core'¶
- __new__(**kwargs)¶
- __repr__(self) str¶
- __str__(self) str¶
- add_field(self, name: str, data: NDArray, field_class: FieldClass = ..., /) NDArray¶
- add_field(self, name: str, dtype: numpy.typing.DTypeLike, shape: Tuple[int, ...] = (), field_class: FieldClass = ..., /) NDArray
- add_field(self, type: FieldType, /) NDArray
- add_field(self, name: str, data: numpy.recarray, field_class: FieldClass = ..., /) NDArray
Overloaded function.
add_field(self, name: str, data: NDArray, field_class: FieldClass = ..., /) -> NDArrayAdds a new field under the specified name, with the given contents. IMPORTANT: this will deep copy the supplied data.
- Args:
name (str): the name of the new field data (NDArray): the contents of the new field field_class (FieldClass): class of the field to add, see field_class
- Returns:
The field as a numpy array.
add_field(self, name: str, dtype: numpy.typing.DTypeLike, shape: typing.Tuple[int, ...] = (), field_class: FieldClass = ..., /) -> NDArrayAdds a new field under specified name
- Args:
name (str): name of the field to add shape (Tuple[int, …]): tuple of ints, shape of the field to add dtype (numpy.typing.DTypeLike): dtype of field to add, e.g. np.uint32 field_class (FieldClass): class of the field to add, see field_class
- Returns:
The field as a numpy array
add_field(self, type: FieldType, /) -> NDArrayAdds a new field under specified name and type
- Args:
type (FieldType): FieldType of the field to add
- Returns:
The field as a numpy array
add_field(self, name: str, data: numpy.recarray, field_class: FieldClass = ..., /) -> NDArrayAdds a new field under the specified name, with the given contents. IMPORTANT: this will deep copy the supplied data.
- Args:
name (str): the name of the new field data (NDArray): the contents of the new field field_class (FieldClass): class of the field to add, see field_class
- Returns:
The field as a numpy array.
- property alert_flags: Annotated[NDArray[numpy.uint8], dict(shape=None)]¶
The alert flags header as a numpy array with W/columns-per-packet entries.
- property body_to_world: NDArray¶
The body-to-world transform vector of 4x4 homogeneous matrices (per each timestamp).
- complete(self, window: Optional[tuple[int, int]] | None = None) bool¶
- del_field(self, name: str, /) NDArray¶
Release a field from the LidarFrame and return it to the user
- Parameters:
name (str) – name of the field to drop
- Returns:
The specified field as a numpy array
- field(self, name: str, /) NDArray¶
Return a view of the specified channel field.
- Parameters:
name (str) – name of the field to return
- Returns:
The specified field as a numpy array
- field_class(self, arg: str, /) ouster.sdk.core.FieldClass¶
Retrieve FieldClass of field
- Args:
name: name of the field
- Returns:
FieldClass of the field
- property fields: list[str]¶
Return a list of available fields.
- property frame_id: None¶
Corresponds to the frame id header in the packet format.
- property frame_status: None¶
Information from the packet header which corresponds to a frame.
- get_first_valid_column(self) int¶
Return first valid column index in the frame. Raises RuntimeError if no valid columns are available.
- get_first_valid_lidar_packet_timestamp(self) int¶
Return first valid lidar packet timestamp in the frame. Deprecated: use get_first_valid_packet_timestamp(PacketType.Lidar).
- get_first_valid_packet_timestamp(self) int¶
- get_first_valid_packet_timestamp(self, stream: ouster.sdk.core.PacketType) int
Overloaded function.
get_first_valid_packet_timestamp(self) -> int
Return first valid packet timestamp in the frame. Raises RuntimeError if no valid packets are available.
get_first_valid_packet_timestamp(self, stream: ouster.sdk.core.PacketType) -> int
Return first valid packet timestamp for the given packet type. Raises RuntimeError if no valid packets are available.
- get_last_valid_column(self) int¶
Return last valid column index in the frame. Raises RuntimeError if no valid columns are available.
- get_last_valid_lidar_packet_timestamp(self) int¶
Return last valid lidar packet timestamp in the frame. Deprecated: use get_last_valid_packet_timestamp(PacketType.Lidar).
- get_last_valid_packet_timestamp(self) int¶
- get_last_valid_packet_timestamp(self, stream: ouster.sdk.core.PacketType) int
Overloaded function.
get_last_valid_packet_timestamp(self) -> int
Return last valid packet timestamp in the frame. Raises RuntimeError if no valid packets are available.
get_last_valid_packet_timestamp(self, stream: ouster.sdk.core.PacketType) -> int
Return last valid packet timestamp for the given packet type. Raises RuntimeError if no valid packets are available.
- get_max_valid_packet_timestamp(self) int¶
- get_max_valid_packet_timestamp(self, stream: ouster.sdk.core.PacketType) int
Overloaded function.
get_max_valid_packet_timestamp(self) -> int
Return max valid packet timestamp in the frame. Raises RuntimeError if no valid packets are available.
get_max_valid_packet_timestamp(self, stream: ouster.sdk.core.PacketType) -> int
Return max valid packet timestamp for the given packet type. Raises RuntimeError if no valid packets are available.
- get_min_valid_packet_timestamp(self) int¶
- get_min_valid_packet_timestamp(self, stream: ouster.sdk.core.PacketType) int
Overloaded function.
get_min_valid_packet_timestamp(self) -> int
Return min valid packet timestamp in the frame. Raises RuntimeError if no valid packets are available.
get_min_valid_packet_timestamp(self, stream: ouster.sdk.core.PacketType) -> int
Return min valid packet timestamp for the given packet type. Raises RuntimeError if no valid packets are available.
- property h: int¶
Height or vertical resolution of the frame.
- has_field(self, name: str) bool¶
Returns true if the LidarFrame has a field with the given name
- Parameters:
name (str) – name of the field to check for
- Returns:
True if the field exists in the frame, false otherwise
- property measurement_id: Annotated[NDArray[numpy.uint16], dict(shape=None)]¶
The measurement id header as a W-element numpy array.
- property objects: DictStrObjectList¶
(self) -> ouster.sdk.core.DictStrObjectList
- property packet_count: int¶
The number of packets used to produce a full frame given the width in pixels and the number of columns per packet.
- property packet_timestamp: Annotated[NDArray[numpy.uint64], dict(shape=None)]¶
The host timestamp header as a numpy array with W/columns-per-packet entries.
- property pose: NDArray¶
use body_to_world.
- Type:
The body-to-world transform vector of 4x4 homogeneous matrices (per each timestamp). Deprecated
- property sensor_info: None¶
The SensorInfo associated with this LidarFrame.
- shot_limiting(self) ouster.sdk.core.ShotLimitingStatus¶
The frame shot limiting status.
- property shot_limiting_countdown: None¶
Shot-limiting countdown. Please refer to the firmware documentation for more information.
- property shutdown_countdown: None¶
Thermal shutdown countdown. Please refer to the firmware documentation for more information.
- property status: Annotated[NDArray[numpy.uint32], dict(shape=None)]¶
The measurement status header as a W-element numpy array.
- thermal_shutdown(self) ouster.sdk.core.ThermalShutdownStatus¶
The frame thermal shutdown status.
- property timestamp: Annotated[NDArray[numpy.uint64], dict(shape=None)]¶
The measurement timestamp header as a W-element numpy array.
- property w: int¶
Width or horizontal resolution of the frame.
- property zones: NDArray¶
LidarMode¶
- class LidarMode(self, columns: int, fps: int)¶
- class LidarMode(self, mode_string: str)
Possible Lidar Modes of sensor.
Determines to horizontal and vertical resolution rates of sensor. See sensor documentation for details.
Overloaded function.
__init__(self, columns: int, fps: int) -> NoneConstruct a mode with a given column count and fps.
__init__(self, mode_string: str) -> None- Args:
mode_string (str): mode string to parse
- __annotations__ = {'_1024x10': 'ouster.sdk.core.LidarMode', '_1024x20': 'ouster.sdk.core.LidarMode', '_2048x10': 'ouster.sdk.core.LidarMode', '_4096x5': 'ouster.sdk.core.LidarMode', '_512x10': 'ouster.sdk.core.LidarMode', '_512x20': 'ouster.sdk.core.LidarMode', 'columns': 'int', 'fps': 'int'}¶
- __eq__(self, arg: object, /) bool¶
- __init__(self, columns: int, fps: int) None¶
- __init__(self, mode_string: str) None
Overloaded function.
__init__(self, columns: int, fps: int) -> NoneConstruct a mode with a given column count and fps.
__init__(self, mode_string: str) -> None- Args:
mode_string (str): mode string to parse
- __module__ = 'ouster.sdk.core'¶
- __new__(**kwargs)¶
- __str__(self) str¶
- property columns: int¶
Number of columns per frame.
- property fps: int¶
Framerate of frames.
LidarPacket¶
- class LidarPacket(self, size: int = 65536)¶
- class LidarPacket(self, arg: ouster.sdk.core.PacketFormat, /)
- __annotations__ = {}¶
- __copy__(self) ouster.sdk.core.LidarPacket¶
- __deepcopy__(self, arg: dict, /) ouster.sdk.core.LidarPacket¶
- __init__(self, size: int = 65536) None¶
- __init__(self, arg: ouster.sdk.core.PacketFormat, /) None
- __module__ = 'ouster.sdk.core'¶
- __new__(**kwargs)¶
LocalToneMapper¶
- class LocalToneMapper(self)¶
- class LocalToneMapper(self, update_every: int)
- class LocalToneMapper(self, lo_percentile: float, hi_percentile: float, update_every: int, damping: float, compress_dr: bool, color_correct: bool)
- __init__(self) None¶
- __init__(self, update_every: int) None
- __init__(self, lo_percentile: float, hi_percentile: float, update_every: int, damping: float, compress_dr: bool, color_correct: bool) None
- __module__ = 'ouster.sdk.core'¶
- __new__(**kwargs)¶
- update(self, image: ndarray[dtype=float16, shape=(*, *, *), order='C'], update_state: bool = True) numpy.ndarray[dtype=float32, order='C']¶
ouster.sdk.core.masked_frame_set_source¶
- class MaskedFrameSetSource(frame_set_source, fields, masks)[source]¶
Bases:
FrameSetSource- Parameters:
frame_set_source (FrameSetSource)
fields (List[str])
masks (List[ndarray | None])
- property frames_num: List[int]¶
(self) -> list[int]
- property is_indexed: bool¶
(self) -> bool
- property is_live: bool¶
Check if the frame set source is live.
A live frame set source indicates that it is actively receiving data from a sensor.
- Returns:
True if the frame set source is live, False otherwise.
- Return type:
bool
- property sensor_info: List[SensorInfo]¶
Retrieve sensor information for all sensors in the frame set source.
- Returns:
A list of SensorInfo objects, each containing metadata about a sensor, such as serial number, firmware version, and calibration details.
MultiFrameSetSource¶
MultipurposeIOMode¶
- class MultipurposeIOMode(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)¶
Mode of MULTIPURPOSE_IO pin.
See sensor documentation for details.
- __nb_enum__ = <capsule object NULL>¶
- OFF = 0¶
- INPUT_NMEA_UART = 1¶
- OUTPUT_FROM_INTERNAL_OSC = 2¶
- OUTPUT_FROM_SYNC_PULSE_IN = 3¶
- OUTPUT_FROM_PTP_1588 = 4¶
- OUTPUT_FROM_ENCODER_ANGLE = 5¶
- values = <nanobind.nb_func object>¶
- __int__(self) int¶
The value of the Enum member.
- from_string = <nanobind.nb_func object>¶
- property value: int¶
The value of the Enum member.
- __repr__()¶
Return repr(self).
- __str__(self) str¶
- __module__ = 'ouster.sdk.core'¶
NMEABaudRate¶
- class NMEABaudRate(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)¶
Expected baud rate sensor attempts to decode for NMEA UART input $GPRMC messages.
- __nb_enum__ = <capsule object NULL>¶
- BAUD_9600 = 0¶
- BAUD_115200 = 1¶
- values = <nanobind.nb_func object>¶
- __int__(self) int¶
The value of the Enum member.
- from_string = <nanobind.nb_func object>¶
- property value: int¶
The value of the Enum member.
- __repr__()¶
Return repr(self).
- __str__(self) str¶
- __module__ = 'ouster.sdk.core'¶
Object¶
- class Object(self)¶
Data holder class for perception annotations.
- __annotations__ = {'body_to_world': 'None', 'class_confidence': 'None', 'class_id': 'None', 'creation_ts': 'None', 'dimensions': 'None', 'id': 'None', 'object_to_body': 'None', 'properties': 'None', 'timestamp': 'None', 'velocity': 'None'}¶
- __copy__(self) ouster.sdk.core.Object¶
- __deepcopy__(self, arg: object, /) ouster.sdk.core.Object¶
- __eq__(self, arg: object, /) bool¶
- __init__(self) None¶
- __module__ = 'ouster.sdk.core'¶
- __new__(**kwargs)¶
- property body_to_world: None¶
Transform from the body frame to the world frame.
- property class_confidence: None¶
Classification confidence.
Value between 0 and 1, where 1 is absolute confidence.
- property class_id: None¶
Object classification.
DetectionEngine implementations determine the meaning behind class_id numbers; see ClassMap for corresponding class name strings.
- property creation_ts: None¶
Timestamp of the first detection, in nanoseconds. Lidar time.
- property dimensions: None¶
Full extents of the object’s bounding box.
- property id: None¶
Object ID.
If tracked, objects maintain their IDs between frames.
- property object_to_body: None¶
Transform from the object frame to the body frame.
- property properties: None¶
Properties dictionary.
Allows to extend object information with arbitrary data.
- property timestamp: None¶
Timestamp of the current detection, in nanoseconds. Lidar time.
- property velocity: None¶
Velocity vector (inside worldframe).
OperatingMode¶
- class OperatingMode(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)¶
Possible Operating modes of sensor.
See sensor documentation for details.
- __nb_enum__ = <capsule object NULL>¶
- NORMAL = 0¶
- STANDBY = 1¶
- values = <nanobind.nb_func object>¶
- __int__(self) int¶
The value of the Enum member.
- from_string = <nanobind.nb_func object>¶
- property value: int¶
The value of the Enum member.
- __repr__()¶
Return repr(self).
- __str__(self) str¶
- __module__ = 'ouster.sdk.core'¶
OusterIoType¶
Packet¶
- class Packet¶
- __annotations__ = {'buf': 'Annotated[NDArray[numpy.uint8], dict(shape=(None,))]', 'format': 'None', 'host_timestamp': 'None', 'type': 'PacketType'}¶
- __copy__(self) ouster.sdk.core.Packet¶
- __deepcopy__(self, arg: dict, /) ouster.sdk.core.Packet¶
- __init__(*args, **kwargs)¶
- __module__ = 'ouster.sdk.core'¶
- __new__(**kwargs)¶
- alert_flags(self) int¶
- property buf: Annotated[NDArray[numpy.uint8], dict(shape=None)]¶
(self) -> numpy.ndarray[dtype=uint8, shape=(*)]
- calculate_crc(self) int¶
- countdown_shot_limiting(self) int¶
- countdown_thermal_shutdown(self) int¶
- crc(self) Optional[int]¶
- property format: None¶
(self) -> ouster.sdk.core.PacketFormat
- frame_id(self) int¶
- property host_timestamp: None¶
(self) -> int
- init_id(self) int¶
- packet_type(self) int¶
- prod_sn(self) int¶
- shot_limiting(self) ouster.sdk.core.ShotLimitingStatus¶
- thermal_shutdown(self) ouster.sdk.core.ThermalShutdownStatus¶
- property type: PacketType¶
(self) -> ouster::sdk::core::PacketType
- validate(self, arg0: ouster.sdk.core.SensorInfo, arg1: ouster.sdk.core.PacketFormat, /) ouster.sdk.core.PacketValidationFailure¶
- validate(self, arg: ouster.sdk.core.SensorInfo, /) ouster.sdk.core.PacketValidationFailure
PacketFormat¶
- class PacketFormat(self, arg: ouster.sdk.core.SensorInfo, /)¶
- class PacketFormat(self, arg: ouster.sdk.core.DataFormat, /)
- __annotations__ = {'col_footer_size': 'int', 'col_header_size': 'int', 'col_size': 'int', 'columns_per_packet': 'int', 'fields': 'Iterator[str]', 'imu_measurements_per_packet': 'int', 'imu_packet_size': 'int', 'imu_packets_per_frame': 'int', 'lidar_packet_size': 'int', 'max_frame_id': 'int', 'packet_footer_size': 'int', 'packet_header_size': 'int', 'pixels_per_column': 'int', 'udp_profile_lidar': 'UDPProfileLidar', 'zone_packet_size': 'int'}¶
- __init__(self, arg: ouster.sdk.core.SensorInfo, /) None¶
- __init__(self, arg: ouster.sdk.core.DataFormat, /) None
- __module__ = 'ouster.sdk.core'¶
- __new__(**kwargs)¶
- alert_flags(self, buf: BufferT) int¶
- calculate_crc(self, buf: BufferT) int¶
(self) -> int
- property col_header_size: int¶
(self) -> int
- property col_size: int¶
(self) -> int
- property columns_per_packet: int¶
(self) -> int
- countdown_shot_limiting(self, buf: BufferT) int¶
- countdown_thermal_shutdown(self, buf: BufferT) int¶
- crc(self, buf: BufferT) Optional[int]¶
- field_bitness(self, arg: str, /) int¶
- field_value_mask(self, arg: str, /) int¶
- property fields: Iterator[str]¶
Return an iterator of available channel fields.
- frame_id(self, buf: BufferT) int¶
- from_data_format = <nanobind.nb_func object>¶
- from_info = <nanobind.nb_func object>¶
- from_metadata = <nanobind.nb_func object>¶
- imu_accel_ts(self, buf: BufferT) int¶
- imu_av_x(self, buf: BufferT) float¶
- imu_av_y(self, buf: BufferT) float¶
- imu_av_z(self, buf: BufferT) float¶
- imu_gyro_ts(self, buf: BufferT) int¶
- imu_la_x(self, buf: BufferT) float¶
- imu_la_y(self, buf: BufferT) float¶
- imu_la_z(self, buf: BufferT) float¶
- property imu_measurements_per_packet: int¶
(self) -> int
- property imu_packet_size: int¶
(self) -> int
- property imu_packets_per_frame: int¶
(self) -> int
- imu_sys_ts(self, buf: BufferT) int¶
- init_id(self, buf: BufferT) int¶
- property lidar_packet_size: int¶
(self) -> int
- property max_frame_id: int¶
(self) -> int
- packet_field(self, name: str, buf: NDArray, /) NDArray¶
(self) -> int
- packet_header(self, header_type: object, buf: NDArray, /) NDArray¶
- property packet_header_size: int¶
(self) -> int
- packet_type(self, buf: BufferT) int¶
- property pixels_per_column: int¶
(self) -> int
- prod_sn(self, buf: BufferT) int¶
- set_alert_flags(self, arg0: ouster.sdk.core.LidarPacket, arg1: int, /) None¶
- set_col_measurement_id(self, arg0: ouster.sdk.core.LidarPacket, arg1: int, arg2: int, /) None¶
- set_col_status(self, arg0: ouster.sdk.core.LidarPacket, arg1: int, arg2: int, /) None¶
- set_col_timestamp(self, arg0: ouster.sdk.core.LidarPacket, arg1: int, arg2: int, /) None¶
- set_field(self, arg0: ouster.sdk.core.LidarPacket, arg1: str, arg2: ndarray[dtype=uint8, order='C'], /) None¶
- set_field(self, arg0: ouster.sdk.core.LidarPacket, arg1: str, arg2: ndarray[dtype=uint16, order='C'], /) None
- set_field(self, arg0: ouster.sdk.core.LidarPacket, arg1: str, arg2: ndarray[dtype=uint32, order='C'], /) None
- set_field(self, arg0: ouster.sdk.core.LidarPacket, arg1: str, arg2: ndarray[dtype=uint64, order='C'], /) None
- set_field(self, arg0: ouster.sdk.core.LidarPacket, arg1: str, arg2: ndarray[dtype=int8, order='C'], /) None
- set_field(self, arg0: ouster.sdk.core.LidarPacket, arg1: str, arg2: ndarray[dtype=int16, order='C'], /) None
- set_field(self, arg0: ouster.sdk.core.LidarPacket, arg1: str, arg2: ndarray[dtype=int32, order='C'], /) None
- set_field(self, arg0: ouster.sdk.core.LidarPacket, arg1: str, arg2: ndarray[dtype=int64, order='C'], /) None
- set_field(self, arg0: ouster.sdk.core.LidarPacket, arg1: str, arg2: ndarray[dtype=float32, order='C'], /) None
- set_field(self, arg0: ouster.sdk.core.LidarPacket, arg1: str, arg2: ndarray[dtype=float64, order='C'], /) None
- set_frame_id(self, arg0: ouster.sdk.core.LidarPacket, arg1: int, /) None¶
- set_frame_id(self, arg0: ouster.sdk.core.ImuPacket, arg1: int, /) None
- set_shot_limiting_countdown(self, arg0: ouster.sdk.core.LidarPacket, arg1: int, /) None¶
- set_shutdown_countdown(self, arg0: ouster.sdk.core.LidarPacket, arg1: int, /) None¶
- shot_limiting(self, buf: BufferT) int¶
- thermal_shutdown(self, buf: BufferT) int¶
- property udp_profile_lidar: UDPProfileLidar¶
(self) -> ouster.sdk.core.UDPProfileLidar
- property zone_packet_size: int¶
(self) -> int
PacketSource¶
- class PacketSource(self)¶
PacketSource is a base class for reading packet data from various sources.
- SensorInfo¶
Metadata about the sensors providing the packets.
- Type:
List[SensorInfo]
- is_live¶
Indicates whether the packet source is live (actively receiving data).
- Type:
bool
- close()¶
Closes the packet source and releases any associated resources.
- __iter__()¶
Returns an iterator over the packets in the source.
- __annotations__ = {'is_live': 'bool', 'sensor_info': 'list[SensorInfo]'}¶
- __enter__(self) None¶
- __exit__(self, exc_type: object | None, exc_value: object | None, traceback: object | None) None¶
- __init__(self) None¶
- __iter__(self, /) Iterator[Tuple[int, LidarPacket | ImuPacket | ZonePacket]]¶
- __module__ = 'ouster.sdk.core'¶
- __new__(**kwargs)¶
- close(self) None¶
- property is_live: bool¶
Check if the packet source is live.
- property sensor_info: list[SensorInfo]¶
Retrieve sensor information for all sensors in the packet source.
- Returns:
A list of SensorInfo objects, each containing metadata about a sensor, such as serial number, firmware version, and calibration details.
PacketValidationFailure¶
- class PacketValidationFailure(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)¶
- __format__(format_spec, /)¶
Convert to a string according to format_spec.
- __str__()¶
Return repr(self).
- __repr__()¶
Return repr(self).
- __new__(value)¶
- __nb_enum__ = <capsule object NULL>¶
- NONE = 0¶
- PACKET_SIZE = 1¶
- ID = 2¶
- __module__ = 'ouster.sdk.core'¶
Polarity¶
- class Polarity(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)¶
Pulse Polarity.
Applicable to several Polarity settings on sensor.
- __nb_enum__ = <capsule object NULL>¶
- ACTIVE_LOW = 0¶
- ACTIVE_HIGH = 1¶
- values = <nanobind.nb_func object>¶
- __int__(self) int¶
The value of the Enum member.
- from_string = <nanobind.nb_func object>¶
- property value: int¶
The value of the Enum member.
- __repr__()¶
Return repr(self).
- __str__(self) str¶
- __module__ = 'ouster.sdk.core'¶
Pose¶
- class Pose(self)¶
- class Pose(self, arg: numpy.ndarray[dtype=float64, shape=(4, 4), order='C'], /)
- class Pose(self, position: numpy.ndarray[dtype=float64, shape=(3), order='C'], rotation: Eigen::Quaternion<double, 0>)
A rigid-body pose represented by translation and rotation.
Overloaded function.
__init__(self) -> None__init__(self, arg: numpy.ndarray[dtype=float64, shape=(4, 4), order='C'], /) -> None__init__(self, position: numpy.ndarray[dtype=float64, shape=(3), order='C'], rotation: Eigen::Quaternion<double, 0>) -> None
Construct from translation and a unit quaternion.
- __annotations__ = {'position': 'None', 'rotation': 'None'}¶
- __eq__(self, arg: object, /) bool¶
- __init__(self) None¶
- __init__(self, arg: numpy.ndarray[dtype=float64, shape=(4, 4), order='C'], /) None
- __init__(self, position: numpy.ndarray[dtype=float64, shape=(3), order='C'], rotation: Eigen::Quaternion<double, 0>) None
Overloaded function.
__init__(self) -> None__init__(self, arg: numpy.ndarray[dtype=float64, shape=(4, 4), order='C'], /) -> None__init__(self, position: numpy.ndarray[dtype=float64, shape=(3), order='C'], rotation: Eigen::Quaternion<double, 0>) -> None
Construct from translation and a unit quaternion.
- __module__ = 'ouster.sdk.core'¶
- __mul__(self, other: ouster.sdk.core.Pose) ouster.sdk.core.Pose¶
- __mul__(self, point: numpy.ndarray[dtype=float64, shape=(3), order='C']) numpy.ndarray[dtype=float64, shape=(3), order='C']
Overloaded function.
__mul__(self, other: ouster.sdk.core.Pose) -> ouster.sdk.core.Pose
Compose this pose with another pose.
__mul__(self, point: numpy.ndarray[dtype=float64, shape=(3), order='C']) -> numpy.ndarray[dtype=float64, shape=(3), order='C']
Transform a 3D point by this pose.
- __new__(**kwargs)¶
- euler_angles(self) numpy.ndarray[dtype=float64, shape=(3), order='C']¶
Return fixed-axis Euler angles [roll, pitch, yaw] in radians.
- inverse(self) ouster.sdk.core.Pose¶
Return the inverse of this pose.
- property position: None¶
Translation vector (x, y, z) in meters. Accepts a length-3 array or sequence.
- property rotation: None¶
Orientation as a unit quaternion [w, x, y, z]. Accepts a length-4 array or sequence.
- set_rotation(self, rotation_matrix: numpy.ndarray[dtype=float64, shape=(3, 3), order='C']) None¶
- set_rotation(self, euler_angles: numpy.ndarray[dtype=float64, shape=(3), order='C']) None
Overloaded function.
set_rotation(self, rotation_matrix: numpy.ndarray[dtype=float64, shape=(3, 3), order='C']) -> None
Set rotation from a 3x3 rotation matrix.
set_rotation(self, euler_angles: numpy.ndarray[dtype=float64, shape=(3), order='C']) -> None
Set rotation from fixed-axis Euler angles [roll, pitch, yaw] in radians.
- to_matrix(self) numpy.ndarray[dtype=float64, shape=(4, 4), order='C']¶
Return a 4x4 row-major homogeneous transformation matrix.
ProductInfo¶
- class ProductInfo¶
- __annotations__ = {'beam_config': 'str', 'beam_count': 'int', 'form_factor': 'str', 'full_product_info': 'str', 'rgb': 'bool', 'short_range': 'bool'}¶
- __eq__(self, arg: object, /) bool¶
- __init__(*args, **kwargs)¶
- __module__ = 'ouster.sdk.core'¶
- __new__(**kwargs)¶
- __str__(self) str¶
- property beam_config: str¶
The beam configuration of the product..
- Type:
string
- property beam_count: int¶
Number of beams
- Type:
int
- property form_factor: str¶
The form factor of the product.
- Type:
string
- property full_product_info: str¶
The original full product info string.
- Type:
string
- property rgb: bool¶
If the product is a rgb make.
- Type:
bool
- property short_range: bool¶
If the product is a short range make.
- Type:
bool
ouster.sdk.core.reduced_frame_set_source¶
- class ReducedFrameSetSource(frame_set_source, beams)[source]¶
Bases:
FrameSetSourceTakes a regular FrameSetSource and reduces the beams count to the specified values.
- Parameters:
frame_set_source (FrameSetSource)
beams (List[int])
- property frames_num: List[int]¶
(self) -> list[int]
- property is_indexed: bool¶
(self) -> bool
- property is_live: bool¶
Check if the frame set source is live.
A live frame set source indicates that it is actively receiving data from a sensor.
- Returns:
True if the frame set source is live, False otherwise.
- Return type:
bool
- property sensor_info: List[SensorInfo]¶
Retrieve sensor information for all sensors in the frame set source.
- Returns:
A list of SensorInfo objects, each containing metadata about a sensor, such as serial number, firmware version, and calibration details.
ReturnOrder¶
- class ReturnOrder(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)¶
Sensor return order.
See sensor documentation for details.
- __nb_enum__ = <capsule object NULL>¶
- STRONGEST_TO_WEAKEST = 0¶
- FARTHEST_TO_NEAREST = 1¶
- NEAREST_TO_FARTHEST = 2¶
- STRONGEST_RETURN_FIRST = 3¶
- LAST_RETURN_FIRST = 4¶
- values = <nanobind.nb_func object>¶
- __int__(self) int¶
The value of the Enum member.
- from_string = <nanobind.nb_func object>¶
- property value: int¶
The value of the Enum member.
- __repr__()¶
Return repr(self).
- __str__(self) str¶
- __module__ = 'ouster.sdk.core'¶
ouster.sdk.core.selected_frame_set_source¶
- class SelectedFrameSetSource(frame_set_source, indices)[source]¶
Bases:
FrameSetSourceTakes a regular FrameSetSource and selects the specified beam indices.
- Parameters:
frame_set_source (FrameSetSource)
indices (List[List[int]])
- property frames_num: List[int]¶
(self) -> list[int]
- property is_indexed: bool¶
(self) -> bool
- property is_live: bool¶
Check if the frame set source is live.
A live frame set source indicates that it is actively receiving data from a sensor.
- Returns:
True if the frame set source is live, False otherwise.
- Return type:
bool
- property sensor_info: List[SensorInfo]¶
Retrieve sensor information for all sensors in the frame set source.
- Returns:
A list of SensorInfo objects, each containing metadata about a sensor, such as serial number, firmware version, and calibration details.
SensorConfig¶
- class SensorConfig(self)¶
- class SensorConfig(self, config_string: str)
Corresponds to sensor config parameters.
Please see sensor documentation for the meaning of each property.
Overloaded function.
__init__(self) -> None
Construct an empty SensorConfig.
__init__(self, config_string: str) -> NoneConstruct a SensorConfig from a json string. Args:
config_string (str): json string to parse
- __annotations__ = {'accel_fsr': 'None', 'azimuth_window': 'None', 'bloom_reduction_optimization': 'None', 'columns_per_packet': 'None', 'extra_options': 'None', 'gyro_fsr': 'None', 'header_type': 'None', 'imu_packets_per_frame': 'None', 'lidar_frame_azimuth_offset': 'None', 'lidar_mode': 'None', 'min_range_threshold_cm': 'None', 'multipurpose_io_mode': 'None', 'nmea_baud_rate': 'None', 'nmea_ignore_valid_char': 'None', 'nmea_in_polarity': 'None', 'nmea_leap_seconds': 'None', 'operating_mode': 'None', 'phase_lock_enable': 'None', 'phase_lock_offset': 'None', 'return_order': 'None', 'signal_multiplier': 'None', 'sync_pulse_in_polarity': 'None', 'sync_pulse_out_angle': 'None', 'sync_pulse_out_frequency': 'None', 'sync_pulse_out_polarity': 'None', 'sync_pulse_out_pulse_width': 'None', 'timestamp_mode': 'None', 'udp_dest': 'None', 'udp_dest_zm': 'None', 'udp_multicast_ttl': 'None', 'udp_multicast_ttl_zm': 'None', 'udp_port_imu': 'None', 'udp_port_lidar': 'None', 'udp_port_zm': 'None', 'udp_profile_imu': 'None', 'udp_profile_lidar': 'None'}¶
- __copy__(self) ouster.sdk.core.SensorConfig¶
- __deepcopy__(self, arg: dict, /) ouster.sdk.core.SensorConfig¶
- __eq__(self, arg: object, /) bool¶
- __init__(self) None¶
- __init__(self, config_string: str) None
Overloaded function.
__init__(self) -> None
Construct an empty SensorConfig.
__init__(self, config_string: str) -> NoneConstruct a SensorConfig from a json string. Args:
config_string (str): json string to parse
- __module__ = 'ouster.sdk.core'¶
- __new__(**kwargs)¶
- __str__(self) str¶
- property accel_fsr: None¶
The accelerometer full scale measurement range to use. See sensor documentation for details.
- property azimuth_window: None¶
Tuple representing the visible region of interest of the sensor in millidegrees, .e.g., (0, 360000) for full visibility.
- property bloom_reduction_optimization: None¶
The type of bloom reduction optimization to use.
- property columns_per_packet: None¶
Measurement blocks per UDP packet. See sensor documentation for details.
- property extra_options: None¶
Extra configuration options on the sensor. Each value should be stringized json.
- property gyro_fsr: None¶
The gyro full scale measurement range to use. See sensor documentation for details.
- property header_type: None¶
Type of UDP packet header to use.
- property imu_packets_per_frame: None¶
Number of IMU packets per lidar frame.
- property lidar_frame_azimuth_offset: None¶
Origin angle for the sensor in millidegrees.
- property lidar_mode: None¶
Horizontal and Vertical Resolution rate of sensor as mode, e.g., 1024x10. See class LidarMode.
- property min_range_threshold_cm: None¶
The minimum detection range of the sensor in cm. See sensor documentation for details.
- property multipurpose_io_mode: None¶
Mode of MULTIPURPOSE_IO pin. See class MultipurposeIOMode.
- property nmea_baud_rate: None¶
Expected baud rate sensor attempts to decode for NMEA UART input $GPRMC messages.
- property nmea_ignore_valid_char: None¶
NMEA Ignore Valid Char. True corresponds to 1 and False to 0 for property; see sensor documentation for details.
- property nmea_in_polarity: None¶
Polarity of NMEA UART input $GPRMC messages. See sensor documentation for details.
- property nmea_leap_seconds: None¶
Integer number of leap seconds that will be added to the UDP timetsamp when calculating seconds since Unix Epoch time. See sensor documentation for details.
- property operating_mode: None¶
Operating Mode of sensor. See class OperatingMode.
- property phase_lock_enable: None¶
Enable phase lock. See sensor documentation for more details.
- property phase_lock_offset: None¶
Angle in Lidar Coordinate Frame that sensors are locked to, in millidegrees. See sensor documentation for details.
- property return_order: None¶
The priority of sensor returns to output. See sensor documentation for details.
- property signal_multiplier: None¶
Multiplier for signal strength of sensor, corresponding to maximum allowable azimuth_window. Gen 2 Only.
- property sync_pulse_in_polarity: None¶
Polarity of SYNC_PULSE_IN pin. See sensor documentation for details.
- property sync_pulse_out_angle: None¶
Polarity of SYNC_PULSE_OUT output. See sensor documentation for details.
- property sync_pulse_out_frequency: None¶
SYNC_PULSE_OUT rate. See sensor documentation for details.
- property sync_pulse_out_polarity: None¶
Polarity of SYNC_PULSE_OUT output. See sensor documentation for details.
- property sync_pulse_out_pulse_width: None¶
SYNC_PULSE_OUT pulse width in ms. See sensor documentation for details.
- property timestamp_mode: None¶
Timestamp mode of sensor. See class TimestampMode.
- property udp_dest: None¶
Destination to which sensor sends UDP traffic.
- property udp_dest_zm: None¶
Destination to which sensor sends ZM UDP traffic.
- property udp_multicast_ttl: None¶
Multicast TTL for IMU and lidar UDP traffic.
- property udp_multicast_ttl_zm: None¶
Multicast TTL for ZM UDP traffic.
- property udp_port_imu: None¶
Port on UDP destination to which IMU data will be sent.
- property udp_port_lidar: None¶
Port on UDP destination to which lidar data will be sent.
- property udp_port_zm: None¶
Port on UDP destination to which ZM data will be sent.
- property udp_profile_imu: None¶
UDP packet format for imu data. See sensor documentation for details.
- property udp_profile_lidar: None¶
UDP packet format for lidar data. See sensor documentation for details.
SensorInfo¶
- class SensorInfo(self)¶
- class SensorInfo(self, json_string: str)
Sensor Info required to interpret UDP data streams.
See the sensor documentation for the meaning of each property.
Overloaded function.
__init__(self) -> NoneConstruct an empty metadata.
__init__(self, json_string: str) -> None- Args:
json_string (str): json string to parse
- __annotations__ = {'beam_altitude_angles': 'None', 'beam_azimuth_angles': 'None', 'beam_to_lidar_transform': 'None', 'build_date': 'None', 'cal': 'None', 'client_version': 'None', 'config': 'None', 'extrinsic': 'None', 'format': 'None', 'fw_rev': 'None', 'h': 'int', 'image_rev': 'None', 'imu_to_sensor_transform': 'None', 'init_id': 'None', 'lidar_origin_to_beam_origin_mm': 'None', 'lidar_to_sensor_transform': 'None', 'num_returns': 'int', 'prod_line': 'None', 'prod_pn': 'None', 'sensor_to_body': 'None', 'sn': 'None', 'status': 'None', 'user_data': 'None', 'w': 'int', 'xyzlut_double': 'XYZLut', 'xyzlut_float': 'XYZLutFloat', 'zone_set': 'None'}¶
- __copy__(self) ouster.sdk.core.SensorInfo¶
- __deepcopy__(self, arg: dict, /) ouster.sdk.core.SensorInfo¶
- __eq__(self, arg: object, /) bool¶
- __init__(self) None¶
- __init__(self, json_string: str) None
Overloaded function.
__init__(self) -> NoneConstruct an empty metadata.
__init__(self, json_string: str) -> None- Args:
json_string (str): json string to parse
- __module__ = 'ouster.sdk.core'¶
- __new__(**kwargs)¶
- __repr__(self) str¶
- property beam_altitude_angles: None¶
Beam altitude angles, useful for XYZ projection.
- property beam_azimuth_angles: None¶
Beam azimuth angles, useful for XYZ projection.
- property beam_to_lidar_transform: None¶
Homogenous transformation matrix reprsenting Beam to Lidar Transform
- property build_date: None¶
Build date
- property cal: None¶
sensor calibration
- clear_cache(self) None¶
Clear cached data such as xyzluts calculated from other members.
- property client_version: None¶
version of library that wrote metadata
- property config: None¶
sensor config
- property extrinsic: None¶
use sensor_to_body.
- Type:
Deprecated
- property format: None¶
Describes the structure of a lidar packet. See class DataFormat.
- from_default = <nanobind.nb_func object>¶
- property fw_rev: None¶
Sensor firmware revision.
- get_product_info(self) ouster.sdk.core.ProductInfo¶
Get parsed product info
- get_version(self) ouster.sdk.core.Version¶
Get parsed sensor version
- property h: int¶
returns the height of a frame (equivalent to format.pixels_per_column)
- has_fields_equal(self, arg: ouster.sdk.core.SensorInfo, /) bool¶
Compare public fields
- property image_rev: None¶
Image rev
- property imu_to_sensor_transform: None¶
Homogenous transformation matrix representing IMU offset to Sensor Coordinate Frame.
- property init_id: None¶
Initialization id.
- property lidar_origin_to_beam_origin_mm: None¶
Distance between lidar origin and beam origin in millimeters.
- property lidar_to_sensor_transform: None¶
Homogeneous transformation matrix from Lidar Coordinate Frame to Sensor Coordinate Frame.
- property num_returns: int¶
(self) -> int
- property prod_line: None¶
Product line, e.g., ‘OS-1-128’.
- property prod_pn: None¶
Prod pn
- property sensor_to_body: None¶
Homogeneous transformation matrix from sensor frame to body frame.
- property sn: None¶
Sensor serial number.
- property status: None¶
sensor status
- to_json_string(self) str¶
Return metadata string made from current entries
- property user_data: None¶
sensor user data
- property w: int¶
returns the width of a frame (equivalent to format.columns_per_frame)
- property xyzlut_float: XYZLutFloat¶
(self) -> ouster::sdk::core::XYZLutT<float>
- property zone_set: None¶
zone monitor configuration
Severity¶
ShotLimitingStatus¶
- class ShotLimitingStatus(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)¶
Shot Limiting Status.
- __nb_enum__ = <capsule object NULL>¶
- NORMAL = 0¶
- IMMINENT = 1¶
- REDUCTION_0_10 = 2¶
- REDUCTION_10_20 = 3¶
- REDUCTION_20_30 = 4¶
- REDUCTION_30_40 = 5¶
- REDUCTION_40_50 = 6¶
- REDUCTION_50_60 = 7¶
- REDUCTION_60_70 = 8¶
- REDUCTION_70_75 = 9¶
- values = <nanobind.nb_func object>¶
- __int__(self) int¶
The value of the Enum member.
- from_string = <nanobind.nb_func object>¶
- property value: int¶
The value of the Enum member.
- __repr__()¶
Return repr(self).
- __str__(self) str¶
- __module__ = 'ouster.sdk.core'¶
Stl¶
- class Stl(self, arg: str, /)¶
- class Stl(self, arg: collections.abc.Sequence[int], /)
- __annotations__ = {'coordinate_frame': 'None', 'filename': 'None', 'hash': 'str'}¶
- __eq__(self, arg: object, /) bool¶
- __init__(self, arg: str, /) None¶
- __init__(self, arg: collections.abc.Sequence[int], /) None
- __module__ = 'ouster.sdk.core'¶
- __new__(**kwargs)¶
- property coordinate_frame: None¶
(self) -> ouster.sdk.core.CoordinateFrame
- property filename: None¶
(self) -> str
- property hash: str¶
(self) -> str
- to_mesh(self) ouster.sdk.core.Mesh¶
ThermalShutdownStatus¶
- class ThermalShutdownStatus(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)¶
Thermal Shutdown Status.
- __nb_enum__ = <capsule object NULL>¶
- NORMAL = 0¶
- IMMINENT = 1¶
- values = <nanobind.nb_func object>¶
- __int__(self) int¶
The value of the Enum member.
- from_string = <nanobind.nb_func object>¶
- property value: int¶
The value of the Enum member.
- __repr__()¶
Return repr(self).
- __str__(self) str¶
- __module__ = 'ouster.sdk.core'¶
TimestampMode¶
- class TimestampMode(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)¶
Possible Timestamp modes of sensor.See sensor documentation for details.
- __nb_enum__ = <capsule object NULL>¶
- TIME_FROM_INTERNAL_OSC = 0¶
- TIME_FROM_SYNC_PULSE_IN = 1¶
- TIME_FROM_PTP_1588 = 2¶
- values = <nanobind.nb_func object>¶
- __int__(self) int¶
The value of the Enum member.
- from_string = <nanobind.nb_func object>¶
- property value: int¶
The value of the Enum member.
- __repr__()¶
Return repr(self).
- __str__(self) str¶
- __module__ = 'ouster.sdk.core'¶
UDPProfileIMU¶
- class UDPProfileIMU(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)¶
UDP imu profile.
- __nb_enum__ = <capsule object NULL>¶
- LEGACY = 0¶
- ACCEL32_GYRO32_NMEA = 1¶
- OFF = 100¶
- values = <nanobind.nb_func object>¶
- __int__(self) int¶
The value of the Enum member.
- from_string = <nanobind.nb_func object>¶
- property value: int¶
The value of the Enum member.
- __repr__()¶
Return repr(self).
- __str__(self) str¶
- __module__ = 'ouster.sdk.core'¶
UDPProfileLidar¶
- class UDPProfileLidar(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)¶
- __nb_enum__ = <capsule object NULL>¶
- UNKNOWN = 0¶
- LEGACY = 1¶
- RNG19_RFL8_SIG16_NIR16_DUAL = 2¶
- RNG19_RFL8_SIG16_NIR16 = 3¶
- RNG15_RFL8_NIR8 = 4¶
- FIVE_WORD_PIXEL = 5¶
- FUSA_RNG15_RFL8_NIR8_DUAL = 6¶
- RNG15_RFL8_NIR8_DUAL = 7¶
- RNG15_RFL8_NIR8_ZONE16 = 8¶
- RNG19_RFL8_SIG16_NIR16_ZONE16 = 9¶
- RNG15_RFL8_WIN8 = 10¶
- RNG19_RFL8_SIG16_ZONE16_DUAL = 11¶
- RNG19_RFL8_SIG16_NIR16_RGB16 = 12¶
- RNG19_RFL8_SIG16_NIR16_RGB16_DUAL = 13¶
- OFF = 100¶
- from_string = <nanobind.nb_func object>¶
- __int__(self) int¶
The value of the Enum member.
- values = <nanobind.nb_func object>¶
- property value: int¶
The value of the Enum member.
- __str__(self) str¶
- __repr__()¶
Return repr(self).
- __module__ = 'ouster.sdk.core'¶
ValidatorEntry¶
- class ValidatorEntry¶
- __init__(*args, **kwargs)¶
- __module__ = 'ouster.sdk.core'¶
- __new__(**kwargs)¶
- __repr__(self) str¶
Get the string representation of a ValidatorEntry
- Returns:
returns the string representation of a ValidatorEntry
- __str__(self) str¶
Get the string representation of a ValidatorEntry
- Returns:
returns the string representation of a ValidatorEntry
- get_msg(self) str¶
Get the message of the ValidatorEntry
- Returns:
returns the message of the ValidatorEntry
- get_path(self) str¶
Get the entry path to the issue.
- Returns:
returns the entry path to the issue.
ValidatorIssues¶
- class ValidatorIssues¶
- __annotations__ = {'critical': 'list[ValidatorEntry]', 'information': 'list[ValidatorEntry]', 'warning': 'list[ValidatorEntry]'}¶
- __init__(*args, **kwargs)¶
- __module__ = 'ouster.sdk.core'¶
- __new__(**kwargs)¶
- property critical: list[ValidatorEntry]¶
Critical validator issues.
- property information: list[ValidatorEntry]¶
Information validator issues
- property warning: list[ValidatorEntry]¶
Warning validator issues.
Version¶
- class Version(self)¶
- class Version(self, major: int, minor: int, patch: int)
- __annotations__ = {'build': 'None', 'machine': 'None', 'major': 'None', 'minor': 'None', 'patch': 'None', 'prerelease': 'None', 'stage': 'None'}¶
- __eq__(self, arg: object, /) bool¶
- __init__(self) None¶
- __init__(self, major: int, minor: int, patch: int) None
- __le__(self, arg: ouster.sdk.core.Version, /) bool¶
- __lt__(self, arg: ouster.sdk.core.Version, /) bool¶
- __module__ = 'ouster.sdk.core'¶
- __new__(**kwargs)¶
- property build: None¶
(self) -> str
- from_string = <nanobind.nb_func object>¶
- property machine: None¶
(self) -> str
- property major: None¶
(self) -> int
- property minor: None¶
(self) -> int
- property patch: None¶
(self) -> int
- property prerelease: None¶
(self) -> str
- property stage: None¶
(self) -> str
VoxelDownsampleStrategy¶
VoxelHashMap3d¶
- class VoxelHashMap3d(self, voxel_size: float = 0.1, max_distance: float = 100.0, max_points_per_voxel: int = 20, min_pts_threshold: int = 1)¶
- __annotations__ = {'empty': 'bool'}¶
- __init__(self, voxel_size: float = 0.1, max_distance: float = 100.0, max_points_per_voxel: int = 20, min_pts_threshold: int = 1) None¶
- __module__ = 'ouster.sdk.core'¶
- __new__(**kwargs)¶
- add_points(self, points: numpy.ndarray[dtype=float64, shape=(*, *), order='C', writable=False]) None¶
- clear(self) None¶
- property empty: bool¶
(self) -> bool
- extract_voxels_far_from_location(self, point: numpy.ndarray[dtype=float64, shape=(*), order='C', writable=False]) numpy.ndarray[dtype=float64, order='C']¶
- get_closest_neighbor(self, point: numpy.ndarray[dtype=float64, shape=(*), order='C', writable=False], max_distance_sq: float = 1.7976931348623157e+308) tuple[numpy.ndarray[dtype=float64, shape=(3), order='C'], float]¶
- point_cloud(self) numpy.ndarray[dtype=float64, order='C']¶
- remove_voxels_far_from_location(self, point: numpy.ndarray[dtype=float64, shape=(*), order='C', writable=False]) None¶
VoxelHashMapXd¶
- class VoxelHashMapXd(self, voxel_size: float = 0.1, max_distance: float = 100.0, max_points_per_voxel: int = 20, min_pts_threshold: int = 1, num_attributes: int = 0)¶
- __annotations__ = {'empty': 'bool'}¶
- __init__(self, voxel_size: float = 0.1, max_distance: float = 100.0, max_points_per_voxel: int = 20, min_pts_threshold: int = 1, num_attributes: int = 0) None¶
- __module__ = 'ouster.sdk.core'¶
- __new__(**kwargs)¶
- add_points(self, points: numpy.ndarray[dtype=float64, shape=(*, *), order='C', writable=False]) None¶
- clear(self) None¶
- property empty: bool¶
(self) -> bool
- extract_voxels_far_from_location(self, point: numpy.ndarray[dtype=float64, shape=(*), order='C', writable=False]) numpy.ndarray[dtype=float64, order='C']¶
- get_closest_neighbor(self, point: numpy.ndarray[dtype=float64, shape=(*), order='C', writable=False], max_distance_sq: float = 1.7976931348623157e+308) tuple[numpy.ndarray[dtype=float64, shape=(*), order='C'], float]¶
- point_cloud(self) numpy.ndarray[dtype=float64, order='C']¶
- remove_voxels_far_from_location(self, point: numpy.ndarray[dtype=float64, shape=(*), order='C', writable=False]) None¶
XYZLut¶
- class XYZLut(self, info: ouster.sdk.core.SensorInfo, use_extrinsics: bool = False)¶
Return a function that can project frames into Cartesian coordinates.
If called with a numpy array representing a range image, the range image must be in “staggered” form, where each column corresponds to a single measurement block. LidarFrame fields are always staggered.
Internally, this will pre-compute a lookup table using the supplied intrinsic parameters. XYZ points are returned as a H x W x 3 array of doubles, where H is the number of beams and W is the horizontal resolution of the frame.
The coordinates are reported in meters in the sensor frame (when
use_extrinsicsis False, default) as defined in the sensor documentation.However, the result is returned in the “extrinsics frame” if
use_extrinsicsis True, which makes additional transform from “sensor frame” to “extrinsics frame” using the homogeneous 4x4 transform matrix frominfo.sensor_to_bodyproperty.- Parameters:
info – sensor metadata
use_extrinsics – if True, applies the
info.sensor_to_bodytransform to the resulting “sensor frame” coordinates and returns the result in “extrinsics frame”.
- Returns:
A function that computes a point cloud given a range image
- __annotations__ = {'direction': "Annotated[NDArray[numpy.float64], dict(order='C', writable=False)]", 'h': 'int', 'offset': "Annotated[NDArray[numpy.float64], dict(order='C', writable=False)]", 'w': 'int'}¶
- __init__(self, info: ouster.sdk.core.SensorInfo, use_extrinsics: bool = False) None¶
Return a function that can project frames into Cartesian coordinates.
If called with a numpy array representing a range image, the range image must be in “staggered” form, where each column corresponds to a single measurement block. LidarFrame fields are always staggered.
Internally, this will pre-compute a lookup table using the supplied intrinsic parameters. XYZ points are returned as a H x W x 3 array of doubles, where H is the number of beams and W is the horizontal resolution of the frame.
The coordinates are reported in meters in the sensor frame (when
use_extrinsicsis False, default) as defined in the sensor documentation.However, the result is returned in the “extrinsics frame” if
use_extrinsicsis True, which makes additional transform from “sensor frame” to “extrinsics frame” using the homogeneous 4x4 transform matrix frominfo.sensor_to_bodyproperty.- Parameters:
info (SensorInfo) – sensor metadata
use_extrinsics (bool) – if True, applies the
info.sensor_to_bodytransform to the resulting “sensor frame” coordinates and returns the result in “extrinsics frame”.
- Returns:
A function that computes a point cloud given a range image
- __module__ = 'ouster.sdk.core'¶
- __new__(**kwargs)¶
- property direction: Annotated[NDArray[numpy.float64], dict(order='C', writable=False)]¶
(self) -> numpy.ndarray[dtype=float64, order=’C’, writable=False]
- property h: int¶
(self) -> int
- property offset: Annotated[NDArray[numpy.float64], dict(order='C', writable=False)]¶
(self) -> numpy.ndarray[dtype=float64, order=’C’, writable=False]
- property w: int¶
(self) -> int
XYZLutFloat¶
- class XYZLutFloat(self, info: ouster.sdk.core.SensorInfo, use_extrinsics: bool = True)¶
Return a function that can project frames into Cartesian coordinates.
If called with a numpy array representing a range image, the range image must be in “staggered” form, where each column corresponds to a single measurement block. LidarFrame fields are always staggered.
Internally, this will pre-compute a lookup table using the supplied intrinsic parameters. XYZ points are returned as a H x W x 3 array of doubles, where H is the number of beams and W is the horizontal resolution of the frame.
The coordinates are reported in meters in the sensor frame (when
use_extrinsicsis False, default True) as defined in the sensor documentation.However, the result is returned in the “extrinsics frame” if
use_extrinsicsis True, which makes additional transform from “sensor frame” to “extrinsics frame” using the homogeneous 4x4 transform matrix frominfo.sensor_to_bodyproperty.- Parameters:
info – sensor metadata
use_extrinsics – if True, applies the
info.sensor_to_bodytransform to the resulting “sensor frame” coordinates and returns the result in “extrinsics frame”.
- Returns:
A function that computes a point cloud given a range image
- __annotations__ = {'direction': "Annotated[NDArray[numpy.float32], dict(order='C', writable=False)]", 'h': 'int', 'offset': "Annotated[NDArray[numpy.float32], dict(order='C', writable=False)]", 'w': 'int'}¶
- __init__(self, info: ouster.sdk.core.SensorInfo, use_extrinsics: bool = True) None¶
Return a function that can project frames into Cartesian coordinates.
If called with a numpy array representing a range image, the range image must be in “staggered” form, where each column corresponds to a single measurement block. LidarFrame fields are always staggered.
Internally, this will pre-compute a lookup table using the supplied intrinsic parameters. XYZ points are returned as a H x W x 3 array of doubles, where H is the number of beams and W is the horizontal resolution of the frame.
The coordinates are reported in meters in the sensor frame (when
use_extrinsicsis False, default True) as defined in the sensor documentation.However, the result is returned in the “extrinsics frame” if
use_extrinsicsis True, which makes additional transform from “sensor frame” to “extrinsics frame” using the homogeneous 4x4 transform matrix frominfo.sensor_to_bodyproperty.- Parameters:
info (SensorInfo) – sensor metadata
use_extrinsics (bool) – if True, applies the
info.sensor_to_bodytransform to the resulting “sensor frame” coordinates and returns the result in “extrinsics frame”.
- Returns:
A function that computes a point cloud given a range image
- __module__ = 'ouster.sdk.core'¶
- __new__(**kwargs)¶
- property direction: Annotated[NDArray[numpy.float32], dict(order='C', writable=False)]¶
(self) -> numpy.ndarray[dtype=float32, order=’C’, writable=False]
- property h: int¶
(self) -> int
- property offset: Annotated[NDArray[numpy.float32], dict(order='C', writable=False)]¶
(self) -> numpy.ndarray[dtype=float32, order=’C’, writable=False]
- property w: int¶
(self) -> int
Zone¶
- class Zone(self)¶
- __annotations__ = {'frame_count': 'None', 'label': 'None', 'mode': 'None', 'point_count': 'None', 'stl': 'None', 'zrb': 'None'}¶
- __eq__(self, arg: object, /) bool¶
- __init__(self) None¶
- __module__ = 'ouster.sdk.core'¶
- __new__(**kwargs)¶
- property frame_count: None¶
(self) -> int
- property label: None¶
(self) -> str
- property mode: None¶
(self) -> ouster.sdk.core.ZoneMode
- property point_count: None¶
(self) -> int
- property stl: None¶
- property zrb: None¶
ZoneMode¶
ZonePacket¶
- class ZonePacket(self, size: int = 65536)¶
- class ZonePacket(self, arg: ouster.sdk.core.PacketFormat, /)
- __annotations__ = {}¶
- __copy__(self) ouster.sdk.core.ZonePacket¶
- __deepcopy__(self, arg: dict, /) ouster.sdk.core.ZonePacket¶
- __init__(self, size: int = 65536) None¶
- __init__(self, arg: ouster.sdk.core.PacketFormat, /) None
- __module__ = 'ouster.sdk.core'¶
- __new__(**kwargs)¶
ZoneSet¶
- class ZoneSet(self)¶
- class ZoneSet(self, arg: str, /)
- class ZoneSet(self, arg: bytes, /)
- __annotations__ = {'label': 'None', 'power_on_live_ids': 'None', 'sensor_to_body_transform': 'None', 'zones': 'None'}¶
- __eq__(self, arg: object, /) bool¶
- __init__(self) None¶
- __init__(self, arg: str, /) None
- __init__(self, arg: bytes, /) None
- __module__ = 'ouster.sdk.core'¶
- __new__(**kwargs)¶
- property label: None¶
(self) -> str
- property power_on_live_ids: None¶
(self) -> list[int]
- render(self, arg: ouster.sdk.core.SensorInfo, /) None¶
- save(self, arg0: str, arg1: ouster.sdk.core.ZoneSetOutputFilter, /) None¶
- save_to_directory(self, arg0: str, arg1: ouster.sdk.core.ZoneSetOutputFilter, /) None¶
- property sensor_to_body_transform: None¶
(self) -> object
- to_json(self, arg: ouster.sdk.core.ZoneSetOutputFilter, /) str¶
- to_zip_blob(self, arg: ouster.sdk.core.ZoneSetOutputFilter, /) bytes¶
- property zones: None¶
(self) -> ouster.sdk.core.AvailableZonesMap
ZoneSetOutputFilter¶
ZoneState¶
- class ZoneState¶
- __annotations__ = {'count': 'None', 'error_flags': 'None', 'id': 'None', 'invalid_count': 'None', 'live': 'None', 'max_count': 'None', 'max_range': 'None', 'mean_range': 'None', 'min_range': 'None', 'occlusion_count': 'None', 'trigger_status': 'None', 'trigger_type': 'None', 'triggered_frames': 'None'}¶
- __init__(*args, **kwargs)¶
- __module__ = 'ouster.sdk.core'¶
- __new__(**kwargs)¶
- property count: None¶
(self) -> int
- dtype = <nanobind.nb_func object>¶
- property error_flags: None¶
(self) -> int
- property id: None¶
(self) -> int
- property invalid_count: None¶
(self) -> int
- property live: None¶
(self) -> int
- property max_count: None¶
(self) -> int
- property max_range: None¶
(self) -> int
- property mean_range: None¶
(self) -> int
- property min_range: None¶
(self) -> int
- property occlusion_count: None¶
(self) -> int
- property trigger_status: None¶
(self) -> int
- property trigger_type: None¶
(self) -> int
- property triggered_frames: None¶
(self) -> int
Zrb¶
- class Zrb(self)¶
- class Zrb(self, arg: str, /)
- class Zrb(self, arg: collections.abc.Sequence[int], /)
- __annotations__ = {'beam_to_lidar_transform': 'None', 'far_range_mm': 'None', 'hash': 'str', 'lidar_to_sensor_transform': 'None', 'near_range_mm': 'None', 'sensor_to_body_transform': 'None', 'serial_number': 'None', 'stl_hash': 'object'}¶
- __eq__(self, arg: object, /) bool¶
- __init__(self) None¶
- __init__(self, arg: str, /) None
- __init__(self, arg: collections.abc.Sequence[int], /) None
- __module__ = 'ouster.sdk.core'¶
- __new__(**kwargs)¶
- property beam_to_lidar_transform: None¶
(self) -> numpy.ndarray[dtype=float64, shape=(4, 4), order=’C’]
- blob(self) list[int]¶
- property hash: str¶
(self) -> str
- property lidar_to_sensor_transform: None¶
(self) -> numpy.ndarray[dtype=float64, shape=(4, 4), order=’C’]
- save(self, arg: str, /) None¶
- property sensor_to_body_transform: None¶
(self) -> numpy.ndarray[dtype=float64, shape=(4, 4), order=’C’]
- property serial_number: None¶
(self) -> int
- property stl_hash: object¶
(self) -> object
add_custom_profile¶
- add_custom_profile(arg0: int, arg1: str, arg2: collections.abc.Sequence[tuple[str, ouster.sdk.core.FieldDecodeInfo]], arg3: int, /) None¶
- add_custom_profile(arg0: str, arg1: collections.abc.Sequence[tuple[str, ouster.sdk.core.FieldDecodeInfo]], arg2: int, /) ouster.sdk.core.UDPProfileLidar
client_version¶
- client_version() str¶
Get the client version string.
collate¶
- collate(source: ouster.sdk.core.FrameSetSource, dt: int = 0) ouster.sdk.core.Collator¶
Collate frames from a frame set source.
This function creates a Collator object that combines frames from a frame set source.
- Parameters:
source (FrameSetSource) – The frame set source to collate.
dt (int) – The time delta in nanoseconds for collating frames. Default is 0 to autodetect.
- Returns:
A collator object for the given frame set source.
- Return type:
Collator
destagger¶
- destagger(img: Annotated[NDArray, dict(order='C', writable=False)], pixel_shift_by_row: Sequence[int], inverse: bool = False) Annotated[NDArray, dict(order='C')]¶
- destagger(sensor_info: SensorInfo, img: Annotated[NDArray, dict(order='C', writable=False)], inverse: bool = False) Annotated[NDArray, dict(order='C')]
dewarp¶
- dewarp(points: ndarray[shape=(*, *, 3), writable=False], poses: ndarray[shape=(*, 4, 4), writable=False]) object¶
Applies a set of 4x4 pose transformations to a collection of 3D points. :param Annotated[NDArray, dict(shape=(None, None, 3), writable=False)] points: A NumPy array of shape (H, W, 3) representing the 3D points. :param Annotated[NDArray, dict(shape=(None, 4, 4), writable=False)] poses: A NumPy array of shape (W, 4, 4) representing the 4x4 pose
- Returns:
A NumPy array of shape (H, W, 3) containing the dewarped 3D points
euler_pose_to_matrix¶
- euler_pose_to_matrix(arg: numpy.ndarray[dtype=float64, shape=(6), order='C'], /) numpy.ndarray[dtype=float64, shape=(4, 4), order='C']¶
Convert a pose given in Euler angles and translation to a 4x4 transformation matrix.
- The pose vector should contain the following elements in order:
[roll, pitch, yaw, x, y, z]
where roll, pitch, and yaw are in radians.
- Returns:
A 4x4 homogeneous transformation matrix.
extension_from_io_type¶
- extension_from_io_type(io_type: ouster.sdk.core.IoType) Optional[str]¶
Get the file extension for a given input/output type.
frame_to_packets¶
- frame_to_packets(*args, **kwargs)¶
- Parameters:
args (Any)
kwargs (Any)
- Return type:
Any
get_field_types¶
- get_field_types(info: ouster.sdk.core.SensorInfo) list[ouster.sdk.core.FieldType]¶
- get_field_types(format: ouster.sdk.core.DataFormat, version: ouster.sdk.core.Version) list[ouster.sdk.core.FieldType]
Overloaded function.
get_field_types(info: ouster.sdk.core.SensorInfo) -> list[ouster.sdk.core.FieldType]Extracts LidarFrame fields with types for a given SensorInfo
- Args:
info (SensorInfo): sensor metadata for which to find fields types
- Returns:
returns field types
get_field_types(format: ouster.sdk.core.DataFormat, version: ouster.sdk.core.Version) -> list[ouster.sdk.core.FieldType]Extracts LidarFrame fields with types for a given SensorInfo
- Args:
info (SensorInfo): sensor data format for which to find field types fw_version: sensor firmware version
- Returns:
returns field types
get_rot_matrix_to_align_to_gravity¶
- get_rot_matrix_to_align_to_gravity(accel_x: float, accel_y: float, accel_z: float, fix_yaw: bool = True) numpy.ndarray[dtype=float64, shape=(3, 3), order='F']¶
Computes a 3x3 rotation matrix that aligns acceleration to gravity [0, 0, 1].
- Parameters:
accel_x (float) – x-component of acceleration.
accel_y (float) – y-component of acceleration.
accel_z (float) – z-component of acceleration.
fix_yaw (bool) – if true (default), neutralize yaw; if false, keep the shortest gravity-alignment rotation without forced yaw.
init_logger¶
- init_logger(log_level: str, log_file_path: str = '', rotating: bool = False, max_size_in_bytes: int = 0, max_files: int = 0) bool¶
Initializes and configures ouster_client logs. This method should be invoked only once before calling any other method from the library if the user wants to direct the library log statements to a different medium (other than console which is the default).
- Parameters:
client. (log_level Control the level of log messages outputed by the) – Valid options are (case-sensitive): “trace”, “debug”, “info”, “warning”, “error”, “critical” and “off”.
log_file_path (str) – Path to location where log files are stored. The path must be in a location that the process has write access to. If an empty string is provided then the logs will be directed to the console. When an empty string is passed then the rest of parameters are ignored.
rotating (bool) – Configure the log file with rotation, rotation rules are specified through the two following parameters max_size_in_bytes and max_files. If rotating is set to false the following parameters are ignored
max_size_in_bytes (int) – Maximum number of bytes to write to a rotating log file before starting a new file. ignored if rotating is set to False.
max_files (int) – Maximum number of rotating files to accumlate before re-using the first file. ignored if rotating is set to False.
- Returns:
returns True on success, False otherwise.
interp_pose¶
- interp_pose(x_interp: ndarray[writable=False], x_known: ndarray[writable=False], poses_known: ndarray[shape=(*, 4, 4), writable=False]) numpy.ndarray[dtype=float64, order='C']¶
Interpolate 4x4 pose matrices at given x-coordinate values (double precision). :param Annotated[NDArray, dict(writable=False)] x_interp: (N,) or (N,1) array of interpolation x values (float64) :param Annotated[NDArray, dict(writable=False)] x_known: (M,) or (M,1) array of known x values (float64) :param Annotated[NDArray, dict(shape=(None, 4, 4), writable=False)] poses_known: (M, 4, 4) array of known pose matrices (float64)
- Returns:
(N, 4, 4) array of interpolated pose matrices (float64)
interp_pose_float¶
- interp_pose_float(x_interp: ndarray[writable=False], x_known: ndarray[writable=False], poses_known: ndarray[shape=(*, 4, 4), writable=False]) numpy.ndarray[dtype=float32, order='C']¶
Interpolate 4x4 pose matrices at given x-coordinate values (float precision for poses). :param Annotated[NDArray, dict(writable=False)] x_interp: (N,) or (N,1) array of interpolation x values (float64) :param Annotated[NDArray, dict(writable=False)] x_known: (M,) or (M,1) array of known x values (float64) :param Annotated[NDArray, dict(shape=(None, 4, 4), writable=False)] poses_known: (M, 4, 4) array of known pose matrices (float32)
- Returns:
(N, 4, 4) array of interpolated pose matrices (float32)
io_type¶
- io_type(uri: str) ouster.sdk.core.IoType¶
Determine the input/output type for a given URI.
io_type_from_extension¶
- io_type_from_extension(filename: str) ouster.sdk.core.IoType¶
Determine the input/output type based on a file extension.
matrix_to_euler¶
- matrix_to_euler(arg: numpy.ndarray[dtype=float64, shape=(3, 3), order='C'], /) numpy.ndarray[dtype=float64, shape=(3), order='C']¶
Extract ZYX Euler angles (roll, pitch, yaw) from a 3x3 rotation matrix.
- Parameters:
matrix – A 3x3 rotation matrix (numpy array, float64).
- Returns:
A length-3 array [roll, pitch, yaw] in radians.
parse_and_validate_metadata¶
- parse_and_validate_metadata(arg: str, /) tuple[Optional[ouster.sdk.core.SensorInfo], ouster.sdk.core.ValidatorIssues]¶
Parse and validate sensor metadata
- Parameters:
metadata (str) – The metadata json to parse and validate.
- Returns:
- The list of issues that were encountered
and the parsed SensorInfo
- Return type:
returns (ValidatorIssues, SensorInfo)
parse_and_validate_sensor_config¶
- parse_and_validate_sensor_config(arg: str, /) tuple[ouster.sdk.core.SensorConfig, ouster.sdk.core.ValidatorIssues]¶
pose_at_timestamp¶
- pose_at_timestamp(frame: ouster.sdk.core.LidarFrame, lidar_ts: int) ouster.sdk.core.Pose¶
Interpolate the body-to-world pose at a lidar timestamp.
- Parameters:
frame (LidarFrame) – Lidar frame providing column timestamps, status, and poses
lidar_ts (int) – Lidar timestamp in nanoseconds
- Returns:
Interpolated pose at the requested lidar timestamp
- Raises:
ValueError – if the timestamp cannot be bracketed by valid columns
quaternion_pose_to_matrix¶
- quaternion_pose_to_matrix(arg: numpy.ndarray[dtype=float64, shape=(7), order='C'], /) numpy.ndarray[dtype=float64, shape=(4, 4), order='C']¶
Convert a pose given as a quaternion and translation to a 4x4 transformation matrix.
- The pose vector should contain the following elements in order:
[qw, qx, qy, qz, x, y, z]
- Returns:
A 4x4 homogeneous transformation matrix.
read_pointcloud¶
- read_pointcloud(arg: str, /) numpy.ndarray[dtype=float32, shape=(*, 3), order='C']¶
[BETA] Loads the 3D X Y and Z points from a PCD or PLY file and returns them as Nx3 matrix.
- Parameters:
filename – filename to load
- Returns:
Nx3 matrix of the resulting points.
Note
This is a beta feature and its API may change in future releases.
restore_instance_ids¶
- restore_instance_ids(object: ouster.sdk.core.Object, points: ndarray[dtype=float64, order='C', writable=False], poses: ndarray[dtype=uint32, order='C']) ndarray[dtype=uint32, order='C']¶
- restore_instance_ids(object: ouster.sdk.core.Object, points: ndarray[dtype=float32, order='C', writable=False], poses: ndarray[dtype=uint32, order='C']) ndarray[dtype=uint32, order='C']
Fills instance_ids pixel field based on object’s oriented bounding box. :param Object object: an object, such as one produced by detection engine :param Annotated[NDArray[numpy.float64], dict(order=’C’, writable=False)] points: A NumPy array of shape (H, W, 3) representing the 3D points. :param instance_ids: A NumPy array of shape (H, W) representing the instance ids
- Returns:
(H, W) updated instance_ids field
transform¶
- transform(points: ndarray[writable=False], pose: ndarray[shape=(4, 4), writable=False]) object¶
Applies a single of 4x4 pose transformations to a collection of 3D points. Args: points: A NumPy array of shape (H, W, 3), or (N, 3) pose: A NumPy array of shape (4, 4) representing the 4x4 pose
Return: A NumPy array of shape (H, W, 3) or (N, 3) containing the transformed 3D points after applying the corresponding 4x4 transformation matrices to the points
voxel_downsample¶
- voxel_downsample(*args, **kwargs)¶
voxel_downsample_xd(frame: ndarray[dtype=float64, order=’C’, writable=False], voxel_size: float, max_points_per_voxel: int = 1, min_pts_threshold: int = 1, strategy: ouster.sdk.core.VoxelDownsampleStrategy = VoxelDownsampleStrategy.RANDOM) -> numpy.ndarray[dtype=float64, shape=(*, *), order=’C’]
[BETA] Downsample an NxD pointcloud using a voxel hash map.
- Parameters:
frame (Annotated[NDArray[numpy.float64], dict(order='C', writable=False)]) – NxD array of points (D >= 3; first 3 columns are x,y,z).
voxel_size (float) – Edge length of each cubic voxel.
max_points_per_voxel (int) – Maximum points kept per voxel (FIRST_N_POINT, RANDOM).
min_pts_threshold (int) – Minimum raw insertions required before a voxel contributes to the output (AVERAGE_POINT).
strategy (VoxelDownsampleStrategy) – VoxelDownsampleStrategy selecting the per-voxel reduction.
- Returns:
MxD array of downsampled points (M <= N, same column layout as input).
voxel_downsample_3d¶
- voxel_downsample_3d(frame: ndarray[dtype=float64, order='C', writable=False], voxel_size: float, max_points_per_voxel: int = 1, min_pts_threshold: int = 1, strategy: ouster.sdk.core.VoxelDownsampleStrategy = VoxelDownsampleStrategy.RANDOM) numpy.ndarray[dtype=float64, shape=(*, 3), order='C']¶
[BETA] Downsample an Nx3 pointcloud using a voxel hash map.
- Parameters:
frame (Annotated[NDArray[numpy.float64], dict(order='C', writable=False)]) – Nx3 array of points (x,y,z).
voxel_size (float) – Edge length of each cubic voxel.
max_points_per_voxel (int) – Maximum points kept per voxel (FIRST_N_POINT, RANDOM).
min_pts_threshold (int) – Minimum raw insertions required before a voxel contributes to the output (AVERAGE_POINT).
strategy (VoxelDownsampleStrategy) – VoxelDownsampleStrategy selecting the per-voxel reduction.
- Returns:
Mx3 array of downsampled points (M <= N).
voxel_downsample_xd¶
- voxel_downsample_xd(frame: ndarray[dtype=float64, order='C', writable=False], voxel_size: float, max_points_per_voxel: int = 1, min_pts_threshold: int = 1, strategy: ouster.sdk.core.VoxelDownsampleStrategy = VoxelDownsampleStrategy.RANDOM) numpy.ndarray[dtype=float64, shape=(*, *), order='C']¶
[BETA] Downsample an NxD pointcloud using a voxel hash map.
- Parameters:
frame (Annotated[NDArray[numpy.float64], dict(order='C', writable=False)]) – NxD array of points (D >= 3; first 3 columns are x,y,z).
voxel_size (float) – Edge length of each cubic voxel.
max_points_per_voxel (int) – Maximum points kept per voxel (FIRST_N_POINT, RANDOM).
min_pts_threshold (int) – Minimum raw insertions required before a voxel contributes to the output (AVERAGE_POINT).
strategy (VoxelDownsampleStrategy) – VoxelDownsampleStrategy selecting the per-voxel reduction.
- Returns:
MxD array of downsampled points (M <= N, same column layout as input).
Submodules¶
ouster.sdk.core.clipped_scan_source¶
Copyright (c) 2024, Ouster, Inc. All rights reserved.
Deprecated module. Use ouster.sdk.core.clipped_frame_set_source instead.
ouster.sdk.core.frame_ops¶
- filter_uv(frame, coord_2d, lower, upper, invalid=0, filtered_fields=None)[source]¶
Filters the frame based on the specified image axis (‘u’ or ‘v’). Pixel values that fall within the specified index range [lower, upper) are replaced by the supplied invalid value (default is zero).
Parameters: - frame: LidarFrame - coord_2d: str; image axis to filter (‘u’ rows, ‘v’ columns) - lower: Union[int, float]; lower bound if float it is assumed a percentage - upper: Union[int, float]; upper bound if float it is assumed a percentage - invalid: int; the invalid value to use default is 0 - filtered_fields: Optional[List[str]]; an optional list of fields to filter :rtype:
None- Parameters:
frame (LidarFrame)
coord_2d (str)
lower (int | float)
upper (int | float)
invalid (int)
filtered_fields (List[str] | None)
- Return type:
None
- filter_xyz(frame, xyzlut, axis_idx, lower=-inf, upper=inf, invalid=0, filtered_fields=None, dewarp_points=False)[source]¶
Filters the frame based on spatial coordinates (X, Y, or Z). Points with coordinates inside the specified range [lower, upper] are replaced with the invalid value (default is zero).
Only PIXEL_FIELD types (spatial/image-like data such as RANGE, SIGNAL, REFLECTIVITY) are filtered. Non-spatial fields (IMU, GNSS position, etc.) are preserved.
Parameters: - frame: LidarFrame - xyzlut: Callable[[Union[LidarFrame, np.ndarray]], np.ndarray] - axis_idx: int; spatial axis to filter (0=X, 1=Y, 2=Z) - lower: float; lower bound - upper: float; upper bound - invalid: int; the invalid value to use (default is 0) - filtered_fields: Optional[List[str]]; specific fields to filter (if None, filters all PIXEL_FIELD types) - dewarp_points: bool; if True, dewarp XYZ points using frame.body_to_world :rtype:
None- Parameters:
frame (LidarFrame)
xyzlut (Callable[[LidarFrame | ndarray], ndarray])
axis_idx (int)
lower (float)
upper (float)
invalid (int)
filtered_fields (List[str] | None)
dewarp_points (bool)
- Return type:
None
- mask(frame, fields, mask)[source]¶
Applies a boolean mask to frame pixel fields.
mask should have shape (frame.h, frame.w). Pixels where mask == 0 are set to 0. :rtype:
None- Parameters:
frame (LidarFrame)
fields (List[str])
mask (ndarray)
- Return type:
None
- reduce_by_factor(frame, factor, update_metadata=False)[source]¶
Vertically downsample the LidarFrame by the supplied factor factor must by a divisor of the LidarFrame height :rtype:
LidarFrame- Parameters:
frame (LidarFrame)
factor (int)
update_metadata (bool)
- Return type:
- reduce_by_factor_metadata(metadata, factor)[source]¶
- Return type:
- Parameters:
metadata (SensorInfo)
factor (int)
- select_by_index(frame, indices, update_metadata=False)[source]¶
Select specific beam rows from the LidarFrame by the supplied indices. Indices must be within the range of the LidarFrame height. :rtype:
LidarFrame- Parameters:
frame (LidarFrame)
indices (List[int])
update_metadata (bool)
- Return type:
- select_by_index_metadata(metadata, indices)[source]¶
Generate a SensorInfo matching an arbitrary subset of beam indices. :rtype:
SensorInfo- Parameters:
metadata (SensorInfo)
indices (List[int])
- Return type:
ouster.sdk.core.masked_scan_source¶
Copyright (c) 2024, Ouster, Inc. All rights reserved.
Deprecated module. Use ouster.sdk.core.masked_frame_set_source instead.
ouster.sdk.core.reduced_scan_source¶
Copyright (c) 2024, Ouster, Inc. All rights reserved.
Deprecated module. Use ouster.sdk.core.reduced_frame_set_source instead.
ouster.sdk.core.scan_ops¶
Copyright (c) 2024, Ouster, Inc. All rights reserved.
Deprecated module. Use ouster.sdk.core.frame_ops instead.