Canny-EVT
A library for ***
|
Functions | |
transform44 (l) | |
read_trajectory (filename, matrix=True) | |
find_closest_index (L, t) | |
ominus (a, b) | |
scale (a, scalar) | |
compute_distance (transform) | |
compute_angle (transform) | |
distances_along_trajectory (traj) | |
rotations_along_trajectory (traj, scale) | |
evaluate_trajectory (traj_gt, traj_est, param_max_pairs=10000, param_fixed_delta=False, param_delta=1.00, param_delta_unit="s", param_offset=0.00, param_scale=1.00) | |
percentile (seq, q) | |
Variables | |
float | _EPS = numpy.finfo(float).eps * 4.0 |
parser = argparse.ArgumentParser(description=) | |
help | |
default | |
action | |
args = parser.parse_args() | |
traj_gt = read_trajectory(args.groundtruth_file) | |
traj_est = read_trajectory(args.estimated_file) | |
result | |
stamps = numpy.array(result)[:,0] | |
trans_error = numpy.array(result)[:,4] | |
rot_error = numpy.array(result)[:,5] | |
f = open(args.save,"w") | |
fig = plt.figure() | |
ax = fig.add_subplot(111) | |
color | |
plot | |
dpi | |
This script computes the relative pose error from the ground truth trajectory and the estimated trajectory.
evaluate_rpe.compute_angle | ( | transform | ) |
Compute the rotation angle from a 4x4 homogeneous matrix.
evaluate_rpe.compute_distance | ( | transform | ) |
Compute the distance of the translational component of a 4x4 homogeneous matrix.
evaluate_rpe.distances_along_trajectory | ( | traj | ) |
Compute the translational distances along a trajectory.
evaluate_rpe.evaluate_trajectory | ( | traj_gt, | |
traj_est, | |||
param_max_pairs = 10000 , |
|||
param_fixed_delta = False , |
|||
param_delta = 1.00 , |
|||
param_delta_unit = "s" , |
|||
param_offset = 0.00 , |
|||
param_scale = 1.00 |
|||
) |
Compute the relative pose error between two trajectories. Input: traj_gt -- the first trajectory (ground truth) traj_est -- the second trajectory (estimated trajectory) param_max_pairs -- number of relative poses to be evaluated param_fixed_delta -- false: evaluate over all possible pairs true: only evaluate over pairs with a given distance (delta) param_delta -- distance between the evaluated pairs param_delta_unit -- unit for comparison: "s": seconds "m": meters "rad": radians "deg": degrees "f": frames param_offset -- time offset between two trajectories (to model the delay) param_scale -- scale to be applied to the second trajectory Output: list of compared poses and the resulting translation and rotation error
evaluate_rpe.find_closest_index | ( | L, | |
t | |||
) |
Find the index of the closest value in a list. Input: L -- the list t -- value to be found Output: index of the closest element
evaluate_rpe.ominus | ( | a, | |
b | |||
) |
Compute the relative 3D transformation between a and b. Input: a -- first pose (homogeneous 4x4 matrix) b -- second pose (homogeneous 4x4 matrix) Output: Relative 3D transformation from a to b.
evaluate_rpe.percentile | ( | seq, | |
q | |||
) |
Return the q-percentile of a list
evaluate_rpe.read_trajectory | ( | filename, | |
matrix = True |
|||
) |
Read a trajectory from a text file. Input: filename -- file to be read matrix -- convert poses to 4x4 matrices Output: dictionary of stamped 3D poses
evaluate_rpe.rotations_along_trajectory | ( | traj, | |
scale | |||
) |
Compute the angular rotations along a trajectory.
evaluate_rpe.scale | ( | a, | |
scalar | |||
) |
Scale the translational components of a 4x4 homogeneous matrix by a scale factor.
evaluate_rpe.transform44 | ( | l | ) |
Generate a 4x4 homogeneous transformation matrix from a 3D point and unit quaternion. Input: l -- tuple consisting of (stamp,tx,ty,tz,qx,qy,qz,qw) where (tx,ty,tz) is the 3D position and (qx,qy,qz,qw) is the unit quaternion. Output: matrix -- 4x4 homogeneous transformation matrix
evaluate_rpe.result |