Skip to content

Commit

Permalink
feature: Tried adaptive k-weighting matrices approach and I don't see…
Browse files Browse the repository at this point in the history
… an improvement. It is slightly slower than the normal approach and I have a weird feeling how the drone is flying with this. I don't recommend this
  • Loading branch information
hedaniel7 committed Feb 19, 2024
1 parent f337043 commit d5faaec
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions gym_pybullet_drones/control/MPCCasADiControl.py
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,11 @@ def __init__(self,
u_ref = DM([hovering_thrust, tau_phi_ref, tau_theta_ref, tau_psi_ref])

for k in range(Nhoriz - 1):

##Adaptive k-Weighting matrices approach
Q = (1 - (k * 1.0 / Nhoriz)) * Q
R = (1 - (k * 1.0 / Nhoriz)) * R

st_ref = P[Nx:2 * Nx]
st = X[:, k]
cont = U[:, k]
Expand Down

0 comments on commit d5faaec

Please sign in to comment.