Ego Metadata

class py123d.datatypes.EgoStateSE3Metadata[source]

Metadata that describes the physical dimensions of the ego vehicle.

Public Data Attributes:

half_width

Half the width of the vehicle.

half_length

Half the length of the vehicle.

half_height

Half the height of the vehicle.

rear_axle_to_center_longitudinal

Longitudinal offset from the rear axle to the vehicle center (along the x-axis).

rear_axle_to_center_vertical

Vertical offset from the rear axle to the vehicle center (along the z-axis).

modality_type

Returns the name of the modality that this metadata describes.

center_to_imu_se3

The center-to-IMU extrinsic PoseSE3 of the vehicle.

height

Height of the vehicle.

length

Length of the vehicle.

rear_axle_to_imu_se3

The rear axle-to-IMU extrinsic PoseSE3 of the vehicle.

vehicle_name

Name of the vehicle model.

wheel_base

Wheel base of the vehicle (longitudinal distance between front and rear axles).

width

Width of the vehicle.

Inherited from BaseModalityMetadata

modality_type

Returns the type of the modality that this metadata describes.

modality_id

Optional identifier for the modality, e.g. sensor ID for sensor modalities.

modality_key

Returns a unique key for this modality, combining type and id if applicable.

Public Methods:

from_dict(data_dict)

Creates a EgoStateSE3Metadata instance from a dictionary.

to_dict()

Converts the EgoStateSE3Metadata instance to a dictionary.

Inherited from BaseMetadata

to_dict()

Serialize the metadata instance to a plain Python dictionary.

from_dict(data_dict)

Construct a metadata instance from a plain Python dictionary.


__init__(vehicle_name, width, length, height, wheel_base, center_to_imu_se3, rear_axle_to_imu_se3)[source]
Parameters:
Return type:

None

vehicle_name: str

Name of the vehicle model.

width: float

Width of the vehicle.

length: float

Length of the vehicle.

height: float

Height of the vehicle.

wheel_base: float

Wheel base of the vehicle (longitudinal distance between front and rear axles).

center_to_imu_se3: PoseSE3

The center-to-IMU extrinsic PoseSE3 of the vehicle.

Maps coordinates from the vehicle center frame to the IMU frame. The translation component gives the position of the vehicle center in the IMU frame.

rear_axle_to_imu_se3: PoseSE3

The rear axle-to-IMU extrinsic PoseSE3 of the vehicle.

Maps coordinates from the rear axle frame to the IMU frame. Identity for most datasets where the IMU is co-located with the rear axle.

classmethod from_dict(data_dict)[source]

Creates a EgoStateSE3Metadata instance from a dictionary.

Parameters:

data_dict (dict) – Dictionary containing ego metadata.

Return type:

EgoStateSE3Metadata

Returns:

EgoStateSE3Metadata instance.

property half_width: float

Half the width of the vehicle.

property half_length: float

Half the length of the vehicle.

property half_height: float

Half the height of the vehicle.

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 modality_key: str

Returns a unique key for this modality, combining type and id if applicable.

property rear_axle_to_center_longitudinal: float

Longitudinal offset from the rear axle to the vehicle center (along the x-axis).

property rear_axle_to_center_vertical: float

Vertical offset from the rear axle to the vehicle center (along the z-axis).

property modality_type: ModalityType

Returns the name of the modality that this metadata describes.

to_dict()[source]

Converts the EgoStateSE3Metadata instance to a dictionary.

Return type:

dict

Returns:

Dictionary representation of the ego metadata.