parser.add_argument( "-a", "--alldata", action="store_const", const=True, help= "Analyze all data (both auto and manual), otherwise auto data only without this option." ) args = parser.parse_args() record_file = args.file reader = RecordReader(record_file) control_analyzer = ControlAnalyzer() planning_analyzer = PlannigAnalyzer(args.simulation, args.simulation2) lidar_endtoend_analyzer = LidarEndToEndAnalyzer() process(control_analyzer, planning_analyzer, lidar_endtoend_analyzer, args.simulation, args.planningpath, args.planningrefpath, args.alldata) if args.simulation: planning_analyzer.print_simulation_results() elif args.simulation2: planning_analyzer.print_sim_results() elif args.planningpath or args.planningrefpath: plt.axis('equal') plt.show() else: control_analyzer.print_latency_statistics()
if len(sys.argv) < 2: print "usage: python main.py record_file" parser = argparse.ArgumentParser( description="Recode Analyzer is a tool to analyze record files.", prog="main.py") parser.add_argument( "-f", "--file", action="store", type=str, required=True, help="Specify the record file for analysis.") parser.add_argument( "-s", "--simulation", action="store_const", const=True, help="For simulation API call") args = parser.parse_args() record_file = args.file reader = RecordReader(record_file) control_analyzer = ControlAnalyzer() planning_analyzer = PlannigAnalyzer(args.simulation) lidar_endtoend_analyzer = LidarEndToEndAnalyzer() process(control_analyzer, planning_analyzer, lidar_endtoend_analyzer, args.simulation) if args.simulation: planning_analyzer.print_simulation_results() else: control_analyzer.print_latency_statistics() planning_analyzer.print_latency_statistics() lidar_endtoend_analyzer.print_endtoend_latency()
point_cloud = pointcloud_pb2.PointCloud() point_cloud.ParseFromString(msg.message) lidar_endtoend_analyzer.put_lidar(point_cloud) if __name__ == "__main__": if len(sys.argv) < 2: print "usage: python main.py record_file" parser = argparse.ArgumentParser( description="Recode Analyzer is a tool to analyze record files.", prog="main.py") parser.add_argument( "-f", "--file", action="store", type=str, required=True, help="Specify the record file for analysis.") args = parser.parse_args() record_file = args.file reader = RecordReader(record_file) control_analyzer = ControlAnalyzer() planning_analyzer = PlannigAnalyzer() lidar_endtoend_analyzer = LidarEndToEndAnalyzer() process(control_analyzer, planning_analyzer, lidar_endtoend_analyzer) control_analyzer.print_latency_statistics() planning_analyzer.print_latency_statistics() lidar_endtoend_analyzer.print_endtoend_latency()
parser.add_argument( "-acc", "--showacc", action="store_const", const=True, help= "Analyze all data (both auto and manual), otherwise auto data only without this option." ) args = parser.parse_args() record_file = args.file reader = RecordReader(record_file) control_analyzer = ControlAnalyzer() planning_analyzer = PlannigAnalyzer(args) lidar_endtoend_analyzer = LidarEndToEndAnalyzer() process(control_analyzer, planning_analyzer, lidar_endtoend_analyzer, args.simulation, args.planningpath, args.planningrefpath, args.alldata) if args.simulation: planning_analyzer.print_sim_results() elif args.planningpath or args.planningrefpath: plt.axis('equal') plt.show() else: control_analyzer.print_latency_statistics() planning_analyzer.print_latency_statistics() lidar_endtoend_analyzer.print_endtoend_latency()