parser=argparse.ArgumentParser(description='Analyse the estimator_status and ekf2_innovation message data for all .ulg files in the specified directory')
parser.add_argument("directory_path")
defis_valid_directory(parser,arg):
ifos.path.isdir(arg):
# Directory exists so return the directory
returnarg
else:
parser.error('The directory {} does not exist'.format(arg))
args=parser.parse_args()
ulog_directory=args.directory_path
print("\n"+"analysing all .ulog files in "+ulog_directory)
# Run the analysis script on all the log files found in the specified directory