LiDAR

LiDAR Data

class py123d.datatypes.sensors.LiDAR[source]

Data structure for LiDAR point cloud data and associated metadata.

Public Data Attributes:

metadata

The LiDARMetadata associated with this LiDAR recording.

point_cloud

The raw point cloud as an NxM numpy array, where N is the number of points and M is the number of attributes per point, as defined by the LiDARIndex.

xyz

The point cloud as an Nx3 array of x, y, z coordinates.

xy

The point cloud as an Nx2 array of x, y coordinates.

intensity

The point cloud as an Nx1 array of intensity values, if available.

range

The point cloud as an Nx1 array of range values, if available.

elongation

The point cloud as an Nx1 array of elongation values, if available.

ring

The point cloud as an Nx1 array of ring values, if available.


property metadata: LiDARMetadata

The LiDARMetadata associated with this LiDAR recording.

property point_cloud: ndarray[tuple[Any, ...], dtype[float32]]

The raw point cloud as an NxM numpy array, where N is the number of points and M is the number of attributes per point, as defined by the LiDARIndex. Point cloud in vehicle frame.

property xyz: ndarray[tuple[Any, ...], dtype[float32]]

The point cloud as an Nx3 array of x, y, z coordinates.

property xy: ndarray[tuple[Any, ...], dtype[float32]]

The point cloud as an Nx2 array of x, y coordinates.

property intensity: ndarray[tuple[Any, ...], dtype[float32]] | None

The point cloud as an Nx1 array of intensity values, if available.

property range: ndarray[tuple[Any, ...], dtype[float32]] | None

The point cloud as an Nx1 array of range values, if available.

property elongation: ndarray[tuple[Any, ...], dtype[float32]] | None

The point cloud as an Nx1 array of elongation values, if available.

property ring: ndarray[tuple[Any, ...], dtype[int32]] | None

The point cloud as an Nx1 array of ring values, if available.

LiDAR Metadata

class py123d.datatypes.sensors.LiDARMetadata[source]

Metadata for LiDAR sensor, static for a given sensor.

Public Data Attributes:

lidar_type

The type of the LiDAR sensor.

lidar_index

The indexing schema of the LiDAR point cloud.

extrinsic

The extrinsic PoseSE3 of the LiDAR sensor, relative to the vehicle frame.

Public Methods:

from_dict(data_dict)

Construct the LiDAR metadata from a dictionary.

to_dict()

Convert the LiDAR metadata to a dictionary.


property lidar_type: LiDARType

The type of the LiDAR sensor.

property lidar_index: LiDARIndex

The indexing schema of the LiDAR point cloud.

property extrinsic: PoseSE3 | None

The extrinsic PoseSE3 of the LiDAR sensor, relative to the vehicle frame.

classmethod from_dict(data_dict)[source]

Construct the LiDAR metadata from a dictionary.

Parameters:

data_dict (dict) – A dictionary containing LiDAR metadata.

Raises:

ValueError – If the dictionary is missing required fields or contains invalid data.

Return type:

LiDARMetadata

Returns:

An instance of LiDARMetadata.

to_dict()[source]

Convert the LiDAR metadata to a dictionary.

Return type:

Dict[str, Any]

Returns:

A dictionary representation of the LiDAR metadata.

LiDAR Types

class py123d.datatypes.sensors.LiDARType[source]

Enumeration of LiDAR sensors, in multi-sensor setups.

LIDAR_UNKNOWN = 0

Unknown LiDAR type.

LIDAR_MERGED = 1

Merged LiDAR type.

LIDAR_TOP = 2

Top-facing LiDAR type.

LIDAR_FRONT = 3

Front-facing LiDAR type.

LIDAR_SIDE_LEFT = 4

Left-side LiDAR type.

LIDAR_SIDE_RIGHT = 5

Right-side LiDAR type.

LIDAR_BACK = 6

Back-facing LiDAR type.

LIDAR_DOWN = 7

Down-facing LiDAR type.