plot_solution.py
Go to the documentation of this file.
00001 import matplotlib.pyplot as plt
00002 import matplotlib.lines as mlines
00003 import numpy as np
00004 import pandas as pd
00005 import os as os
00006 colors = plt.cm.Set1(np.linspace(0, 1, 9))
00007 from matplotlib2tikz import save as tikz_save
00008 def newline(p1, p2):
00009     ax = plt.gca()
00010     l = mlines.Line2D([p1[0],p2[0]], [p1[1],p2[1]], color='grey')
00011     ax.add_line(l)
00012     return l
00013 
00014 name = "gps_alignment_solution_final"
00015 df = pd.read_csv(os.path.expanduser('~') + "/.ros/" + name + ".csv")
00016 
00017 for i in range(0,  df["world_x"].size, 3):
00018     p1 = [df["gps_x"][i],df["gps_y"][i]]
00019     p2 = [df["world_x"][i], df["world_y"][i]]
00020     newline(p1,p2)
00021     
00022 plt.scatter(df["world_x"], df["world_y"], label="world", c='orange', marker="+")
00023 #plt.scatter(df["gps_x"], df["gps_y"], label="gps", c=df["covariance"], marker="+")
00024 plt.scatter(df["gps_x"], df["gps_y"], label="gps", c=df["covariance"], marker="+")
00025 plt.xlabel('East [m]')
00026 plt.ylabel('North [m]')
00027 plt.xlim((475245, 475390))
00028 plt.ylim((5524880, 5525075))
00029 plt.legend()
00030 tikz_save(name + '.tikz')
00031 
00032 plt.show()


hector_gps_calibration
Author(s):
autogenerated on Wed May 8 2019 02:32:14