Lidar¶
Lidar Data¶
- class py123d.datatypes.Lidar[source]¶
Data structure for Lidar point cloud data and associated metadata.
Public Data Attributes:
lidar_metadatasReturns the dictionary of per-lidar metadata contained in this Lidar's metadata.
is_mergedReturns True if this Lidar contains merged data from multiple lidars, False if it contains data from a single lidar.
metadataThe
LidarMetadataassociated with this Lidar recording.timestampThe timestamp associated with this Lidar recording.
timestamp_endThe end timestamp associated with this Lidar recording.
point_cloud_3dLidar point cloud as an Nx3 numpy array, where N is the number of points, and the (x, y, z), indexed by
Point3DIndexpoint_cloud_featuresThe point cloud features as a dictionary of numpy arrays.
xyzThe point cloud as an Nx3 array of x, y, z coordinates.
xyThe point cloud as an Nx2 array of x, y coordinates.
idsThe point cloud as an Nx1 array of point IDs, if available.
intensityThe point cloud as an Nx1 array of intensity values, if available.
channelThe point cloud as an Nx1 array of channel/ring values, if available.
timestampsThe point cloud as an Nx1 array of timestamps in microseconds, if available.
rangeThe point cloud as an Nx1 array of range values, if available.
elongationThe point cloud as an Nx1 array of elongation values, if available.
Inherited from
BaseModalitytimestampReturns the timestamp associated with this modality data, if available.
metadataReturns the metadata associated with this modality data.
modality_typeConvenience property to access the modality type directly from the modality data.
modality_idConvenience property to access the modality id directly from the modality data.
modality_keyConvenience property to access the modality key directly from the modality data.
- property lidar_metadatas: Dict[LidarID, LidarMetadata]¶
Returns the dictionary of per-lidar metadata contained in this Lidar’s metadata.
If the metadata is a
LidarMergedMetadata, returns its internal dictionary. If the metadata is a singleLidarMetadata, returns a dictionary with one entry.
- property is_merged: bool¶
Returns True if this Lidar contains merged data from multiple lidars, False if it contains data from a single lidar.
- property metadata: LidarMetadata | LidarMergedMetadata¶
The
LidarMetadataassociated with this Lidar recording.
- property modality_id: str | SerialIntEnum | None¶
Convenience property to access the modality id directly from the modality data.
- property modality_key: str¶
Convenience property to access the modality key directly from the modality data.
- property modality_type: ModalityType¶
Convenience property to access the modality type directly from the modality data.
- property point_cloud_3d: ndarray[tuple[Any, ...], dtype[float32]]¶
Lidar point cloud as an Nx3 numpy array, where N is the number of points, and the (x, y, z), indexed by
Point3DIndex
- property point_cloud_features: Dict[str, ndarray[tuple[Any, ...], dtype[_ScalarT]]] | None¶
The point cloud features as a dictionary of numpy arrays.
- 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 ids: ndarray[tuple[Any, ...], dtype[uint8]] | None¶
The point cloud as an Nx1 array of point IDs, if available.
- property intensity: ndarray[tuple[Any, ...], dtype[uint8]] | None¶
The point cloud as an Nx1 array of intensity values, if available.
- property channel: ndarray[tuple[Any, ...], dtype[uint8]] | None¶
The point cloud as an Nx1 array of channel/ring values, if available.
- property timestamps: ndarray[tuple[Any, ...], dtype[int64]] | None¶
The point cloud as an Nx1 array of timestamps in microseconds, if available.
Lidar Metadata¶
- class py123d.datatypes.LidarMetadata[source]¶
Metadata for Lidar sensor, static for a given sensor.
Public Data Attributes:
lidar_nameThe name of the Lidar sensor from the dataset.
lidar_idThe ID of the Lidar sensor.
lidar_to_imu_se3The extrinsic
PoseSE3of the Lidar sensor, relative to the IMU frame.modality_typeReturns the type of the modality that this metadata describes.
modality_idOptional identifier for the modality, e.g. sensor ID for sensor modalities.
Inherited from
BaseModalityMetadatamodality_typeReturns the type of the modality that this metadata describes.
modality_idOptional identifier for the modality, e.g. sensor ID for sensor modalities.
modality_keyReturns a unique key for this modality, combining type and id if applicable.
Public Methods:
from_dict(data_dict)Construct the Lidar metadata from a dictionary.
to_dict()Convert the Lidar metadata to a dictionary.
Inherited from
BaseMetadatato_dict()Serialize the metadata instance to a plain Python dictionary.
from_dict(data_dict)Construct a metadata instance from a plain Python dictionary.
- property lidar_to_imu_se3: PoseSE3¶
The extrinsic
PoseSE3of the Lidar sensor, relative to the IMU frame.
- property modality_type: ModalityType¶
Returns the type of the modality that this metadata describes.
- property modality_id: str | SerialIntEnum | None¶
Optional identifier for the modality, e.g. sensor ID for sensor modalities. Can be a string or a SerialIntEnum.
- 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:
- Returns:
An instance of LidarMetadata.
Lidar IDs¶
- class py123d.datatypes.LidarID[source]¶
Enumeration of Lidar sensors, in multi-sensor setups.
- LIDAR_UNKNOWN = 0¶
Unknown Lidar type.
- LIDAR_MERGED = 1¶
Merged sensor 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.