Beispiel #1
0
def testRegression(setupFile, thetaFile):
    """ 
    
    """
    rs=ReadXmlFile(setupFile)
    stateAll, commandAll = loadTrajs(pathDataFolder + "Brent/", 0.01, rs.det)
    stateAll=np.array(stateAll)
    arm=ArmType[rs.Arm]()
    trajReg = np.empty_like(stateAll)
    trajMaker = TrajMaker(rs,0.02,None,rs.path+thetaFile)

    for i in range(stateAll.shape[0]):
        coordHand = arm.mgdEndEffector(stateAll[i][0][2:])
        trajReg[i]=trajMaker.runTrajectory2(coordHand[0], coordHand[1])[0]
        
    plotRegBrent(trajReg, stateAll)