def getXYEstimError(foldername): ''' Returns the error estimations in the trajectories from the given foldername Outputs: -errors: dictionary keys = filenames, values = array of data ''' arm = Arm() errors = {} for el in os.listdir(foldername): errors[el] = [] data = np.loadtxt(foldername + el) for i in range(data.shape[0]): statePos = (data[i][10], data[i][11]) estimStatePos = (data[i][6], data[i][7]) errors[el].append(arm.estimErrorReduced(statePos, estimStatePos)) return errors
def getXYEstimError(foldername): """ Returns the error estimations in the trajectories from the given foldername Outputs: -errors: dictionary keys = filenames, values = array of data """ arm = Arm() errors = {} for el in os.listdir(foldername): errors[el] = [] data = np.loadtxt(foldername + el) for i in range(data.shape[0]): statePos = (data[i][10], data[i][11]) estimStatePos = (data[i][6], data[i][7]) errors[el].append(arm.estimErrorReduced(statePos, estimStatePos)) return errors
def getXYEstimErrorOfSpeed(foldername): """ Returns the error estimations in the trajectories as a function of speed from the given foldername Outputs: -state: dictionary keys = filenames, values = array of data """ arm = Arm() errors = {} for el in os.listdir(foldername): errors[el] = [] data = np.loadtxt(foldername + el) for i in range(data.shape[0]): speed = arm.cartesianSpeed((data[i][8], data[i][9], data[i][10], data[i][11])) statePos = (data[i][10], data[i][11]) estimStatePos = (data[i][6], data[i][7]) error = arm.estimErrorReduced(statePos, estimStatePos) errors[el].append((speed, error)) return errors
def getXYEstimError(foldername): ''' Returns the error estimations in the trajectories from the given foldername Outputs: -errors: dictionary keys = filenames, values = array of data ''' arm = Arm() errors = {} for el in os.listdir(foldername): errors[el] = [] data = np.loadtxt(foldername + el) for i in range(data.shape[0]): currentState = (data[i][12], data[i][13], data[i][14], data[i][15], data[i][16], data[i][17]) estimState = (data[i][6], data[i][7], data[i][8], data[i][9], data[i][10], data[i][11]) statePos = (currentState[3], currentState[4], currentState[5]) estimStatePos = (estimState[3], estimState[4], estimState[5]) errors[el].append(arm.estimErrorReduced(statePos,estimStatePos)) return errors
def getXYEstimErrorOfSpeed(foldername): ''' Returns the error estimations in the trajectories as a function of speed from the given foldername Outputs: -state: dictionary keys = filenames, values = array of data ''' arm = Arm() errors = {} for el in os.listdir(foldername): errors[el] = [] data = np.loadtxt(foldername + el) for i in range(data.shape[0]): speed = arm.cartesianSpeed( (data[i][8], data[i][9], data[i][10], data[i][11])) statePos = (data[i][10], data[i][11]) estimStatePos = (data[i][6], data[i][7]) error = arm.estimErrorReduced(statePos, estimStatePos) errors[el].append((speed, error)) return errors