ouster.sdk.core.data module
Copyright (c) 2021, Ouster, Inc. All rights reserved.
- BufferT
Types that support the buffer protocol.
alias of
Union[bytes,bytearray,memoryview,ndarray]
- class ChanField[source]
Bases:
object- RANGE = 'RANGE'
- RANGE2 = 'RANGE2'
- SIGNAL = 'SIGNAL'
- SIGNAL2 = 'SIGNAL2'
- REFLECTIVITY = 'REFLECTIVITY'
- REFLECTIVITY2 = 'REFLECTIVITY2'
- NEAR_IR = 'NEAR_IR'
- FLAGS = 'FLAGS'
- FLAGS2 = 'FLAGS2'
- WINDOW = 'WINDOW'
- ZONE = 'ZONE'
- RAW_HEADERS = 'RAW_HEADERS'
- 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'
- NORMALS = 'NORMALS'
- NORMALS2 = 'NORMALS2'
- IMU_ACC = 'IMU_ACC'
- IMU_GYRO = 'IMU_GYRO'
- IMU_TIMESTAMP = 'IMU_TIMESTAMP'
- IMU_MEASUREMENT_ID = 'IMU_MEASUREMENT_ID'
- IMU_STATUS = 'IMU_STATUS'
- IMU_PACKET_TIMESTAMP = 'IMU_PACKET_TIMESTAMP'
- IMU_ALERT_FLAGS = 'IMU_ALERT_FLAGS'
- POSITION_STRING = 'POSITION_STRING'
- POSITION_LAT_LONG = 'POSITION_LAT_LONG'
- POSITION_TIMESTAMP = 'POSITION_TIMESTAMP'
- LIVE_ZONESET_HASH = 'LIVE_ZONESET_HASH'
- ZONE_TIMESTAMP = 'ZONE_TIMESTAMP'
- ZONE_PACKET_TIMESTAMP = 'ZONE_PACKET_TIMESTAMP'
- ZONE_STATES = 'ZONE_STATES'
- ZONE_ALERT_FLAGS = 'ZONE_ALERT_FLAGS'
- class ColHeader(value)[source]
Bases:
EnumColumn headers available in lidar data.
This definition is deprecated.
- TIMESTAMP = 0
- ENCODER_COUNT = 1
- MEASUREMENT_ID = 2
- STATUS = 3
- FRAME_ID = 4
- 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
- destagger(info, fields, inverse=False)[source]
Return a destaggered 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 Ninverse – perform inverse “staggering” operation
- Return type:
ndarray- Returns:
A destaggered numpy array of the same shape
- XYZLut(info, use_extrinsics=False)[source]
Return a function that can project scans 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. LidarScan 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 scan.
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.extrinsicproperty.- Parameters:
info (
SensorInfo) – sensor metadatause_extrinsics (
bool) – if True, applies theinfo.extrinsictransform to the resulting “sensor frame” coordinates and returns the result in “extrinsics frame”.
- Return type:
Callable[[Union[LidarScan,ndarray]],ndarray]- Returns:
A function that computes a point cloud given a range image