Esempio n. 1
0
def main():
    """use 2d simulation to optimize parameters to construct a robot."""

    constraints = []

    # A=axe, L=length, P=proport., I=Integrate, D=Differentiate,  
    params = [104, 125, 1.0, 0, 0.0] # start with a working configuration
    dparams = [0, 0, 0, 0, 1.0]  # note that optimization for A, L, and I is disabled!

    twiddle(params, dparams, constraints, run_laptime)
Esempio n. 2
0
def main():
    """use 2d simulation to optimize parameters to construct a robot."""

    def axe_constraint(params):
        return params[0] < 85

    def length_constraint(params):
        return params[1] < 0

    constraints = [axe_constraint, length_constraint]

    # A=axe, L=length, P=proport., I=Integrate, D=Differentiate
    # params = [100, 35, 230.0, 0.0, 3000.0] # start with a working configuration
    # dparams = [10, 5, 20.0, 1.0, 300.0]  # note that A, L are integers!
    params = [95, 25, 213.0, -2.85, 3347.0]  # start with a working configuration
    dparams = [0, 0, 1.0, 1.0, 1.0]  # note that A, L are disabled!

    twiddle(params, dparams, constraints, run_cte)