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

Functions

 align (model, data)
 
 plot_traj (ax, stamps, traj, style, color, label)
 

Variables

 parser = argparse.ArgumentParser(description=)
 
 help
 
 default
 
 action
 
 args = parser.parse_args()
 
 first_list = associate.read_file_list(args.first_file)
 
 second_list = associate.read_file_list(args.second_file)
 
 matches = associate.associate(first_list, second_list,float(args.offset),float(args.max_difference))
 
 first_xyz = numpy.matrix([[float(value) for value in first_list[a][0:3]] for a,b in matches]).transpose()
 
 second_xyz = numpy.matrix([[float(value)*float(args.scale) for value in second_list[b][0:3]] for a,b in matches]).transpose()
 
 rot
 
 trans
 
 trans_error
 
 second_xyz_aligned = rot * second_xyz + trans
 
 first_stamps = first_list.keys()
 
 first_xyz_full = numpy.matrix([[float(value) for value in first_list[b][0:3]] for b in first_stamps]).transpose()
 
 second_stamps = second_list.keys()
 
 second_xyz_full = numpy.matrix([[float(value)*float(args.scale) for value in second_list[b][0:3]] for b in second_stamps]).transpose()
 
 second_xyz_full_aligned = rot * second_xyz_full + trans
 
 file = open(args.save_associations,"w")
 
 fig = plt.figure()
 
 ax = fig.add_subplot(111)
 
str label = "difference"
 
 color
 
 plot
 
 dpi
 

Detailed Description

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

Function Documentation

◆ align()

evaluate_ate.align (   model,
  data 
)
Align two trajectories using the method of Horn (closed-form).

Input:
model -- first trajectory (3xn)
data -- second trajectory (3xn)

Output:
rot -- rotation matrix (3x3)
trans -- translation vector (3x1)
trans_error -- translational error per point (1xn)

◆ plot_traj()

evaluate_ate.plot_traj (   ax,
  stamps,
  traj,
  style,
  color,
  label 
)
Plot a trajectory using matplotlib. 

Input:
ax -- the plot
stamps -- time stamps (1xn)
traj -- trajectory (3xn)
style -- line style
color -- line color
label -- plot legend