Canny-EVT
A library for ***
Loading...
Searching...
No Matches
evaluate_rpe Namespace Reference

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
 

Detailed Description

This script computes the relative pose error from the ground truth trajectory
and the estimated trajectory.

Function Documentation

◆ compute_angle()

evaluate_rpe.compute_angle (   transform)
Compute the rotation angle from a 4x4 homogeneous matrix.

◆ compute_distance()

evaluate_rpe.compute_distance (   transform)
Compute the distance of the translational component of a 4x4 homogeneous matrix.

◆ distances_along_trajectory()

evaluate_rpe.distances_along_trajectory (   traj)
Compute the translational distances along a trajectory. 

◆ evaluate_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

◆ find_closest_index()

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

◆ ominus()

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.

◆ percentile()

evaluate_rpe.percentile (   seq,
  q 
)
Return the q-percentile of a list

◆ read_trajectory()

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

◆ rotations_along_trajectory()

evaluate_rpe.rotations_along_trajectory (   traj,
  scale 
)
Compute the angular rotations along a trajectory. 

◆ scale()

evaluate_rpe.scale (   a,
  scalar 
)
Scale the translational components of a 4x4 homogeneous matrix by a scale factor.

◆ transform44()

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

Variable Documentation

◆ result

evaluate_rpe.result
Initial value:
1= evaluate_trajectory(traj_gt,
2 traj_est,
3 int(args.max_pairs),
4 args.fixed_delta,
5 float(args.delta),
6 args.delta_unit,
7 float(args.offset),
8 float(args.scale))