Radar¶
Radar Data¶
- class py123d.datatypes.Radar[source]¶
Data structure for Radar point cloud data and associated metadata.
Public Data Attributes:
radar_metadatasReturns the dictionary of per-radar metadata contained in this Radar's metadata.
is_mergedReturns True if this Radar contains merged data from multiple radars, False if it contains data from a single radar.
metadataThe
RadarMetadataassociated with this Radar recording.timestampThe timestamp associated with this Radar recording.
point_cloud_3dRadar 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 originating
RadarIDvalues, if available.timestampsThe point cloud as an Nx1 array of timestamps in microseconds, if available.
cluster_idThe point cloud as an Nx1 array of cluster ids, if available.
rcsThe point cloud as an Nx1 array of radar cross section values (dBsm), if available.
velocityThe point cloud as an Nx2 array of raw (vx, vy) velocities in m/s, if available.
velocity_compThe point cloud as an Nx2 array of ego-motion compensated (vx, vy) velocities in m/s, 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.
Private Methods:
_feature(feature)Returns the requested feature array cast to its canonical dtype, if available.
- 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 radar_metadatas: Dict[RadarID, RadarMetadata]¶
Returns the dictionary of per-radar metadata contained in this Radar’s metadata.
If the metadata is a
RadarMergedMetadata, returns its internal dictionary. If the metadata is a singleRadarMetadata, returns a dictionary with one entry.
- property is_merged: bool¶
Returns True if this Radar contains merged data from multiple radars, False if it contains data from a single radar.
- property metadata: RadarMetadata | RadarMergedMetadata¶
The
RadarMetadataassociated with this Radar recording.
- property point_cloud_3d: ndarray[tuple[Any, ...], dtype[float32]]¶
Radar 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 originating
RadarIDvalues, if available.
- property timestamps: ndarray[tuple[Any, ...], dtype[int64]] | None¶
The point cloud as an Nx1 array of timestamps in microseconds, if available.
- property cluster_id: ndarray[tuple[Any, ...], dtype[uint16]] | None¶
The point cloud as an Nx1 array of cluster ids, if available.
- property rcs: ndarray[tuple[Any, ...], dtype[float32]] | None¶
The point cloud as an Nx1 array of radar cross section values (dBsm), if available.
Radar Metadata¶
- class py123d.datatypes.RadarMetadata[source]¶
Metadata for Radar sensor, static for a given sensor.
Public Data Attributes:
radar_nameThe name of the Radar sensor from the dataset.
radar_idThe ID of the Radar sensor.
radar_to_imu_se3The extrinsic
PoseSE3of the Radar 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 Radar metadata from a dictionary.
to_dict()Convert the Radar 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 radar_to_imu_se3: PoseSE3¶
The extrinsic
PoseSE3of the Radar 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 Radar metadata from a dictionary.
- Parameters:
data_dict (
dict) – A dictionary containing Radar metadata.- Return type:
- Returns:
An instance of RadarMetadata.
- class py123d.datatypes.RadarMergedMetadata[source]¶
Public Data Attributes:
modality_typeReturns the type of the modality that this metadata describes.
modality_idOptional identifier for the modality, e.g. sensor ID for sensor modalities.
radar_metadatasReturns the dictionary of per-radar metadata contained in this merged metadata.
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:
to_dict()Serialize the metadata instance to a plain Python dictionary.
from_dict(data_dict)Construct a metadata instance from a plain Python 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.
Inherited from
Mappingget(k[,d])keys()items()values()
- get(k[, d]) D[k] if k in D, else d. d defaults to None.¶
- items() a set-like object providing a view on D's items¶
- keys() a set-like object providing a view on D's keys¶
- property modality_key: str¶
Returns a unique key for this modality, combining type and id if applicable.
- values() an object providing a view on D's values¶
- 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.
- property radar_metadatas: Dict[RadarID, RadarMetadata]¶
Returns the dictionary of per-radar metadata contained in this merged metadata.
Radar IDs¶
- class py123d.datatypes.RadarID[source]¶
Enumeration of Radar sensors, in multi-sensor setups.
- RADAR_UNKNOWN = 0¶
Unknown Radar type.
- RADAR_MERGED = 1¶
Merged sensor Radar type.
- RADAR_FRONT = 2¶
Front-facing (center) Radar type.
- RADAR_FRONT_LEFT = 3¶
Front-left corner Radar type.
- RADAR_FRONT_RIGHT = 4¶
Front-right corner Radar type.
- RADAR_SIDE_LEFT = 5¶
Left-side Radar type.
- RADAR_SIDE_RIGHT = 6¶
Right-side Radar type.
- RADAR_BACK_LEFT = 7¶
Back-left corner Radar type.
- RADAR_BACK_RIGHT = 8¶
Back-right corner Radar type.
- RADAR_BACK = 9¶
Back-facing (center) Radar type.
- RADAR_REAR_LEFT = 10¶
Rear-left-facing Radar type (distinct from the back-left corner radar).
- RADAR_REAR_RIGHT = 11¶
Rear-right-facing Radar type (distinct from the back-right corner radar).
Radar Features¶
- class py123d.datatypes.RadarFeature[source]¶
Enumeration of common Radar point cloud features.
Aligned with the (rich) nuScenes radar schema; datasets populate the subset they provide. Extending is additive: append a member here and a dtype in
RADAR_FEATURE_DTYPES.- TIMESTAMPS = 1¶
Per-point timestamp feature index, in microseconds.
- CLUSTER_ID = 2¶
Per-point cluster id feature index (the nuScenes
idfield).
- DYN_PROP = 3¶
Dynamic property feature index (moving/stationary classification, dataset-native).
- RCS = 4¶
Radar cross section feature index, in dBsm.
- VELOCITY_X = 5¶
Raw radial velocity x feature index, in m/s.
- VELOCITY_Y = 6¶
Raw radial velocity y feature index, in m/s.
- VELOCITY_X_COMP = 7¶
Ego-motion compensated velocity x feature index, in m/s.
- VELOCITY_Y_COMP = 8¶
Ego-motion compensated velocity y feature index, in m/s.
- IS_QUALITY_VALID = 9¶
Quality-valid state flag feature index.
- AMBIG_STATE = 10¶
Doppler ambiguity state feature index.
- X_RMS = 11¶
x position RMS feature index.
- Y_RMS = 12¶
y position RMS feature index.
- INVALID_STATE = 13¶
Invalid state flag feature index.
- PDH0 = 14¶
False-alarm probability feature index.
- VX_RMS = 15¶
Velocity x RMS feature index.
- VY_RMS = 16¶
Velocity y RMS feature index.
- SNR = 17¶
Signal-to-noise ratio feature index, in dB.
- EXIST_PROBABILITY = 18¶
Detection existence probability feature index.