Evaluation¶
evaluation ¶
ate ¶
ate(
trajectory: Trajectory,
other: Trajectory,
processing_settings: ProcessingSettings = ProcessingSettings(),
return_alignment: bool = False,
align: bool = True,
) -> Union[ATEResult, Tuple[ATEResult, AlignmentResult]]
Computes the absolute trajectory error (ATE) between two trajectories.
The ATE is computed by first matching the estimated trajectory to the ground truth trajectory. Then, the alignment between the two trajectories is estimated. The estimated trajectory is aligned to the ground truth trajectory using the estimated alignment. Finally, the ATE is computed by comparing the aligned estimated trajectory to the ground truth trajectory.
Parameters:
-
trajectory(Trajectory) –Trajectory to be evaluated.
-
other(Trajectory) –Ground truth trajectory.
-
processing_settings(ProcessingSettings, default:ProcessingSettings()) –Processing settings.
-
return_alignment(bool, default:False) –Whether to return the alignment result. Defaults to False.
-
align(bool, default:True) –Whether to perform alignment. Defaults to True.
Returns:
-
ATEResult(Union[ATEResult, Tuple[ATEResult, AlignmentResult]]) –Result of the ATE computation. If return_alignment is True, returns a tuple containing (ATEResult, AlignmentResult).
Source code in trajectopy\processing\evaluation.py
rpe ¶
rpe(
trajectory: Trajectory,
other: Trajectory,
processing_settings: ProcessingSettings = ProcessingSettings(),
) -> RPEResult
Computes the relative pose error (RPE) between two trajectories.
The RPE is computed by comparing the relative poses between the estimated and ground truth trajectories. The pose distances are either defined in meters or in seconds depending on the settings.
Parameters:
-
trajectory(Trajectory) –Trajectory to be evaluated.
-
other(Trajectory) –Ground truth trajectory.
-
processing_settings(ProcessingSettings, default:ProcessingSettings()) –Processing settings.
Returns:
-
RPEResult(RPEResult) –Result of the RPE computation.