plot_solution.py
Go to the documentation of this file.
1 import matplotlib.pyplot as plt
2 import matplotlib.lines as mlines
3 import numpy as np
4 import pandas as pd
5 import os as os
6 colors = plt.cm.Set1(np.linspace(0, 1, 9))
7 from matplotlib2tikz import save as tikz_save
8 def newline(p1, p2):
9  ax = plt.gca()
10  l = mlines.Line2D([p1[0],p2[0]], [p1[1],p2[1]], color='grey')
11  ax.add_line(l)
12  return l
13 
14 name = "gps_alignment_solution_final"
15 df = pd.read_csv(os.path.expanduser('~') + "/.ros/" + name + ".csv")
16 
17 for i in range(0, df["world_x"].size, 3):
18  p1 = [df["gps_x"][i],df["gps_y"][i]]
19  p2 = [df["world_x"][i], df["world_y"][i]]
20  newline(p1,p2)
21 
22 plt.scatter(df["world_x"], df["world_y"], label="world", c='orange', marker="+")
23 #plt.scatter(df["gps_x"], df["gps_y"], label="gps", c=df["covariance"], marker="+")
24 plt.scatter(df["gps_x"], df["gps_y"], label="gps", c=df["covariance"], marker="+")
25 plt.xlabel('East [m]')
26 plt.ylabel('North [m]')
27 plt.xlim((475245, 475390))
28 plt.ylim((5524880, 5525075))
29 plt.legend()
30 tikz_save(name + '.tikz')
31 
32 plt.show()
def newline(p1, p2)
Definition: plot_solution.py:8


hector_gps_calibration
Author(s):
autogenerated on Mon Jun 10 2019 13:34:46