start using config gen.py again
This commit is contained in:
parent
fe6effe50f
commit
26d25f5cbb
|
|
@ -1,2 +1,3 @@
|
|||
/target
|
||||
results/
|
||||
configurations/final
|
||||
|
|
|
|||
|
|
@ -1,47 +0,0 @@
|
|||
|
||||
|
||||
|
||||
tickrate = 6000.0
|
||||
drone_tick_rate = 600
|
||||
max_thrust = 2.6
|
||||
max_torque = 0.5
|
||||
mass = 0.350
|
||||
|
||||
# The Stack: First layer computes target speed, second layer computes motor torque
|
||||
layers = [
|
||||
# { type = "Angle", max_angle = 0.78, kp = [4.0, 4.0, 4.0], ki = [0.0, 0.0, 0.0], kd = [0.1, 0.1, 0.1] },
|
||||
{ type = "Rate", max_rate = 3.14, kp = [
|
||||
0.01,
|
||||
0.1,
|
||||
0.01,
|
||||
], ki = [
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
], kd = [
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
] },
|
||||
]
|
||||
|
||||
# + (map[0] * setpoint.x) // Roll
|
||||
# + (map[1] * setpoint.y) // Yaw
|
||||
# + (map[2] * setpoint.z); // Pitch
|
||||
|
||||
# /*
|
||||
# * Motor position indices
|
||||
# * ^ - Front
|
||||
# * |
|
||||
# * |
|
||||
# * 1 --- 0
|
||||
# * | |
|
||||
# * | |
|
||||
# * 2 --- 3
|
||||
# */
|
||||
motor_map = [
|
||||
[-1.0, 1.0, 1.0], # Front Right
|
||||
[1.0, -1.0, 1.0], # Front Left
|
||||
[1.0, 1.0, -1.0], # Rear Left
|
||||
[-1.0, -1.0, -1.0], # Rear Right
|
||||
]
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
import os
|
||||
import subprocess
|
||||
|
||||
subprocess.run("rm configurations/*.toml", shell=True)
|
||||
subprocess.run("rm -rf final && mkdir final", shell=True)
|
||||
|
||||
MOT_FOLDER = "configurations/mot/"
|
||||
SIM_FOLDER = "configurations/sim/"
|
||||
PID_FOLDER = "configurations/pid_cont/"
|
||||
MOT_FOLDER = "mot/"
|
||||
SIM_FOLDER = "sim/"
|
||||
PID_FOLDER = "pid_cont/"
|
||||
|
||||
mot_files = os.listdir(MOT_FOLDER)
|
||||
sim_files = os.listdir(SIM_FOLDER)
|
||||
|
|
@ -22,15 +22,7 @@ for case in prod:
|
|||
with open(PID_FOLDER + case[2], "r") as f3:
|
||||
settings = f1.read() + "\n" + f2.read() + "\n" + f3.read()
|
||||
with open(
|
||||
"configurations/"
|
||||
+ "".join(case).replace(".toml", "_").removesuffix("_")
|
||||
+ ".toml",
|
||||
"final/" + "".join(case).replace(".toml", "_").removesuffix("_") + ".toml",
|
||||
"w",
|
||||
) as f:
|
||||
f.write(settings)
|
||||
|
||||
# cont = open(PID_FOLDER + "low_1.toml").read()
|
||||
# for i in range(1, 11):
|
||||
# num = 0.005 * i
|
||||
# with open(PID_FOLDER + f"low_{i:02d}.toml", "w") as f:
|
||||
# f.write(cont.replace("0.005", str(num)))
|
||||
|
|
@ -3,3 +3,11 @@ max_thrust = 2.6
|
|||
max_torque = 0.5
|
||||
mass = 0.350
|
||||
|
||||
time_constant = 0.00
|
||||
|
||||
motor_map = [
|
||||
[-1.0, 1.0, 1.0], # Front Right
|
||||
[1.0, -1.0, 1.0], # Front Left
|
||||
[1.0, 1.0, -1.0], # Rear Left
|
||||
[-1.0, -1.0, -1.0], # Rear Right
|
||||
]
|
||||
|
|
|
|||
|
|
@ -3,3 +3,10 @@ max_torque = 0.5
|
|||
mass = 0.350
|
||||
|
||||
time_constant = 0.01
|
||||
|
||||
motor_map = [
|
||||
[-1.0, 1.0, 1.0], # Front Right
|
||||
[1.0, -1.0, 1.0], # Front Left
|
||||
[1.0, 1.0, -1.0], # Rear Left
|
||||
[-1.0, -1.0, -1.0], # Rear Right
|
||||
]
|
||||
|
|
|
|||
|
|
@ -1,5 +0,0 @@
|
|||
|
||||
target_rate = 3.141592
|
||||
proportional_multiplier = [0.005, 0.005, 0.005]
|
||||
integral_multiplier = [0.0, 0.0, 0.0]
|
||||
diferential_multiplier = [0.0, 0.0, 0.0]
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
|
||||
target_rate = 3.141592
|
||||
proportional_multiplier = [0.01, 0.01, 0.01]
|
||||
integral_multiplier = [0.0, 0.0, 0.0]
|
||||
diferential_multiplier = [0.0, 0.0, 0.0]
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
|
||||
target_rate = 3.141592
|
||||
proportional_multiplier = [0.015, 0.015, 0.015]
|
||||
integral_multiplier = [0.0, 0.0, 0.0]
|
||||
diferential_multiplier = [0.0, 0.0, 0.0]
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
|
||||
target_rate = 3.141592
|
||||
proportional_multiplier = [0.02, 0.02, 0.02]
|
||||
integral_multiplier = [0.0, 0.0, 0.0]
|
||||
diferential_multiplier = [0.0, 0.0, 0.0]
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
|
||||
target_rate = 3.141592
|
||||
proportional_multiplier = [0.025, 0.025, 0.025]
|
||||
integral_multiplier = [0.0, 0.0, 0.0]
|
||||
diferential_multiplier = [0.0, 0.0, 0.0]
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
|
||||
target_rate = 3.141592
|
||||
proportional_multiplier = [0.03, 0.03, 0.03]
|
||||
integral_multiplier = [0.0, 0.0, 0.0]
|
||||
diferential_multiplier = [0.0, 0.0, 0.0]
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
|
||||
target_rate = 3.141592
|
||||
proportional_multiplier = [0.035, 0.035, 0.035]
|
||||
integral_multiplier = [0.0, 0.0, 0.0]
|
||||
diferential_multiplier = [0.0, 0.0, 0.0]
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
|
||||
target_rate = 3.141592
|
||||
proportional_multiplier = [0.04, 0.04, 0.04]
|
||||
integral_multiplier = [0.0, 0.0, 0.0]
|
||||
diferential_multiplier = [0.0, 0.0, 0.0]
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
|
||||
target_rate = 3.141592
|
||||
proportional_multiplier = [0.045, 0.045, 0.045]
|
||||
integral_multiplier = [0.0, 0.0, 0.0]
|
||||
diferential_multiplier = [0.0, 0.0, 0.0]
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
|
||||
target_rate = 3.141592
|
||||
proportional_multiplier = [0.05, 0.05, 0.05]
|
||||
integral_multiplier = [0.0, 0.0, 0.0]
|
||||
diferential_multiplier = [0.0, 0.0, 0.0]
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
|
||||
layers = [
|
||||
{ type = "Rate", max_rate = 3.14, kp = [
|
||||
0.01,
|
||||
0.1,
|
||||
0.01,
|
||||
], ki = [
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
], kd = [
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
] },
|
||||
]
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
|
||||
layers = [
|
||||
{ type = "Rate", max_rate = 3.14, kp = [
|
||||
0.02,
|
||||
0.2,
|
||||
0.02,
|
||||
], ki = [
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
], kd = [
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
] },
|
||||
]
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
|
||||
layers = [
|
||||
{ type = "Rate", max_rate = 3.14, kp = [
|
||||
0.02,
|
||||
0.2,
|
||||
0.02,
|
||||
], ki = [
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
], kd = [
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
] },
|
||||
]
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
|
||||
|
||||
|
||||
tickrate = 6000.0
|
||||
drone_tick_rate = 600
|
||||
max_thrust = 2.6
|
||||
max_torque = 0.5
|
||||
mass = 0.350
|
||||
|
||||
# The Stack: First layer computes target speed, second layer computes motor torque
|
||||
layers = [
|
||||
# { type = "Angle", max_angle = 0.78, kp = [4.0, 4.0, 4.0], ki = [0.0, 0.0, 0.0], kd = [0.1, 0.1, 0.1] },
|
||||
{ type = "Rate", max_rate = 3.14, kp = [
|
||||
0.0,
|
||||
0.0,
|
||||
0.01,
|
||||
], ki = [
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
], kd = [
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
] },
|
||||
]
|
||||
|
||||
# + (map[0] * setpoint.x) // Roll
|
||||
# + (map[1] * setpoint.y) // Yaw
|
||||
# + (map[2] * setpoint.z); // Pitch
|
||||
|
||||
# /*
|
||||
# * Motor position indices
|
||||
# * ^ - Front
|
||||
# * |
|
||||
# * |
|
||||
# * 1 --- 0
|
||||
# * | |
|
||||
# * | |
|
||||
# * 2 --- 3
|
||||
# */
|
||||
motor_map = [
|
||||
[-1.0, 1.0, 1.0], # Front Right
|
||||
[1.0, -1.0, 1.0], # Front Left
|
||||
[1.0, 1.0, -1.0], # Rear Left
|
||||
[-1.0, -1.0, -1.0], # Rear Right
|
||||
]
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
|
||||
|
||||
|
||||
tickrate = 6000.0
|
||||
drone_tick_rate = 600
|
||||
max_thrust = 2.6
|
||||
max_torque = 0.5
|
||||
mass = 0.350
|
||||
|
||||
# The Stack: First layer computes target speed, second layer computes motor torque
|
||||
layers = [
|
||||
# { type = "Angle", max_angle = 0.78, kp = [4.0, 4.0, 4.0], ki = [0.0, 0.0, 0.0], kd = [0.1, 0.1, 0.1] },
|
||||
{ type = "Rate", max_rate = 3.14, kp = [
|
||||
0.01,
|
||||
0.0,
|
||||
0.0,
|
||||
], ki = [
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
], kd = [
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
] },
|
||||
]
|
||||
|
||||
# + (map[0] * setpoint.x) // Roll
|
||||
# + (map[1] * setpoint.y) // Yaw
|
||||
# + (map[2] * setpoint.z); // Pitch
|
||||
|
||||
# /*
|
||||
# * Motor position indices
|
||||
# * ^ - Front
|
||||
# * |
|
||||
# * |
|
||||
# * 1 --- 0
|
||||
# * | |
|
||||
# * | |
|
||||
# * 2 --- 3
|
||||
# */
|
||||
motor_map = [
|
||||
[-1.0, 1.0, 1.0], # Front Right
|
||||
[1.0, -1.0, 1.0], # Front Left
|
||||
[1.0, 1.0, -1.0], # Rear Left
|
||||
[-1.0, -1.0, -1.0], # Rear Right
|
||||
]
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
|
||||
|
||||
|
||||
tickrate = 6000.0
|
||||
drone_tick_rate = 600
|
||||
max_thrust = 2.6
|
||||
max_torque = 2.0
|
||||
mass = 0.350
|
||||
|
||||
# The Stack: First layer computes target speed, second layer computes motor torque
|
||||
layers = [
|
||||
# { type = "Angle", max_angle = 0.78, kp = [4.0, 4.0, 4.0], ki = [0.0, 0.0, 0.0], kd = [0.1, 0.1, 0.1] },
|
||||
{ type = "Rate", max_rate = 3.14, kp = [
|
||||
0.0,
|
||||
0.01,
|
||||
0.0,
|
||||
], ki = [
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
], kd = [
|
||||
0.0,
|
||||
0.0,
|
||||
0.0,
|
||||
] },
|
||||
]
|
||||
|
||||
# + (map[0] * setpoint.x) // Roll
|
||||
# + (map[1] * setpoint.y) // Yaw
|
||||
# + (map[2] * setpoint.z); // Pitch
|
||||
|
||||
# /*
|
||||
# * Motor position indices
|
||||
# * ^ - Front
|
||||
# * |
|
||||
# * |
|
||||
# * 1 --- 0
|
||||
# * | |
|
||||
# * | |
|
||||
# * 2 --- 3
|
||||
# */
|
||||
motor_map = [
|
||||
[-1.0, 1.0, 1.0], # Front Right
|
||||
[1.0, -1.0, 1.0], # Front Left
|
||||
[1.0, 1.0, -1.0], # Rear Left
|
||||
[-1.0, -1.0, -1.0], # Rear Right
|
||||
]
|
||||
Loading…
Reference in New Issue