当前位置: 首页>>代码示例>>Python>>正文


Python Serializer.read_process_covariance方法代码示例

本文整理汇总了Python中serializer.Serializer.read_process_covariance方法的典型用法代码示例。如果您正苦于以下问题:Python Serializer.read_process_covariance方法的具体用法?Python Serializer.read_process_covariance怎么用?Python Serializer.read_process_covariance使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在serializer.Serializer的用法示例。


在下文中一共展示了Serializer.read_process_covariance方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from serializer import Serializer [as 别名]
# 或者: from serializer.Serializer import read_process_covariance [as 别名]
 def __init__(self, save):
     logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.INFO)
     if not os.path.isdir("stats"):
         os.makedirs("stats")      
     self.save = save
     self.utils = Utils()
     logging.info("Loading cartesian coordinates...") 
     serializer = Serializer()
     
     rave_env = Environment()
     f = "stats/model/test.urdf"
     rave_env.initializeEnvironment(f)
     self.link_dimensions = rave_env.getRobotLinkDimensions()
     rave_env.destroy()
     
     self.setup_kinematics(serializer, "stats")
     self.process_covariances = []
     for logfile in glob.glob("stats" + "/*.log"):
         self.process_covariances.append(serializer.read_process_covariance(logfile))
     #arr = serializer.deserialize_joint_angles(path="stats", file="state_path1.txt")        
     #self.plot_state_path(serializer, arr)
     #sleep()
     
     self.create_video(serializer, "stats")
     logging.info("plotting paths")  
     try:  
         self.plot_paths(serializer)
     except:
         logging.warn("Paths could not be plotted")        
     logging.info("Reading config") 
     config = serializer.read_config("config.yaml", path="stats")
         
     #try:
     #self.plot_end_effector_paths(serializer, plot_scenery=True, plot_manipulator=True)
     #except:
     #    print "Error. End effector paths could not be plotted"
     
     logging.info("Plotting mean planning times")
     self.plot_mean_planning_times(serializer, 
                                   dir="stats", 
                                   filename="mean_planning_times_per_step*.yaml", 
                                   output="mean_planning_times_per_step.pdf")
     self.plot_mean_planning_times(serializer, 
                                   dir="stats", 
                                   filename="mean_planning_times_per_run*.yaml", 
                                   output="mean_planning_times_per_run.pdf")
     
     self.plot_particles(serializer, particle_limit=config['particle_plot_limit'])
     
     try:
         self.plot_paths(serializer, best_paths=True)
     except:
         logging.warn("Best_paths could not be plotted")
         
     try:
         cart_coords = serializer.load_cartesian_coords(path="stats")
     except:
         logging.warn("Cartesian_coords could not be plotted")
     
     logging.info("Plotting average distance to goal" )       
     try:
         self.plot_average_dist_to_goal(serializer, cart_coords)
     except:
         logging.warn("Average distance to goal could not be plotted")
     
     logging.info("plotting mean rewards")
     try:
         self.plot_mean_rewards(serializer)
     except Exception as e:
         logging.warn("Mean rewards could not be plotted: " + str(e))       
     
     logging.info("Plotting EMD graph...")       
     try:
         self.plot_emd_graph(serializer, cart_coords) 
     except:
         logging.warn("EMD graphs could not be plotted")
     
     logging.info("Plotting histograms...") 
     try:            
         self.save_histogram_plots(serializer, cart_coords) 
     except:
         logging.warn("Histograms could not be plotted")  
开发者ID:hoergems,项目名称:abt_newt,代码行数:84,代码来源:plot_stats.py


注:本文中的serializer.Serializer.read_process_covariance方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。