evalio.stats
Error
dataclass
Dataclass to hold the error between two trajectories. Generally output from computing ate or rte.
Contains a (n,) arrays of translation and rotation errors.
summarize
summarize(metric: MetricKind) -> Metric
How to summarize the vector of errors.
Parameters:
-
metric
(MetricKind
) –The metric to use for summarizing the error, either mean, median, or sse.
Returns:
-
Metric
(Metric
) –The summarized error
Metric
dataclass
Simple dataclass to hold the resulting metrics. Likely output from Error.
MetricKind
Bases: StrEnum
Simple enum to define the metric to use for summarizing the error. Used in Error.
align
align(
traj: Trajectory, gt: Trajectory, in_place: bool = False
) -> tuple[Trajectory, Trajectory]
Align the trajectories both spatially and temporally.
The resulting trajectories will be have the same origin as the second ("gt") trajectory. See align_poses and align_stamps for more details.
Parameters:
-
traj
(Trajectory
) –One of the trajectories to align.
-
gt
(Trajectory
) –The other trajectory to align to.
-
in_place
(bool
, default:False
) –If true, the original trajectory will be modified. Defaults to False.
align_poses
align_poses(traj: Trajectory, other: Trajectory)
Align the trajectory in place to another trajectory. Operates in place.
This results in the current trajectory having an identical first pose to the other trajectory. Assumes the first pose of both trajectories have the same stamp.
Parameters:
-
traj
(Trajectory
) –The trajectory that will be modified
-
other
(Trajectory
) –The trajectory to align to.
align_stamps
align_stamps(traj1: Trajectory, traj2: Trajectory)
Select the closest poses in traj1 and traj2. Operates in place.
Does this by finding the higher frame rate trajectory and subsampling it to the closest poses of the other one. Additionally it checks the beginning of the trajectories to make sure they start at about the same stamp.
Parameters:
-
traj1
(Trajectory
) –One trajectory
-
traj2
(Trajectory
) –Other trajectory
ate
ate(traj: Trajectory, gt: Trajectory) -> Error
Compute the Absolute Trajectory Error (ATE) between two trajectories.
Will check if the two trajectories are aligned and if not, will align them. Will not modify the original trajectories.
Parameters:
-
traj
(Trajectory
) –One of the trajectories
-
gt
(Trajectory
) –The other trajectory
Returns:
-
Error
(Error
) –The computed error
rte
rte(
traj: Trajectory, gt: Trajectory, window: int = 100
) -> Error
Compute the Relative Trajectory Error (RTE) between two trajectories.
Will check if the two trajectories are aligned and if not, will align them. Will not modify the original trajectories.
Parameters:
-
traj
(Trajectory
) –One of the trajectories
-
gt
(Trajectory
) –The other trajectory
-
window
(int
, default:100
) –Window size for the RTE. Defaults to 100.
Returns:
-
Error
(Error
) –The computed error