Skip to content

Commit

Permalink
test: Tested the MPC controller
Browse files Browse the repository at this point in the history
with the following if statemets:
if distance < 0.2:
   if current_step == len(TARGET_TRAJECTORY) - 1:

and with the following weighting matrices
# Don't care about the velocity of the drone
        Q = diagcat(1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0)
        R = diagcat(0.3, 0.3, 0.3, 0.8)
        # -> Test result: Drone completely goes off the rails and crazyflie flies crazily and fails
  • Loading branch information
hedaniel7 committed Feb 16, 2024
1 parent e285d49 commit 44a758c
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 @@ -410,6 +410,11 @@ def __init__(self,
# DEFAULT_DISCR_LEVEL = 10 -> causes it to fail on at least two tracks midways'''

# Don't care about the velocity of the drone
Q = diagcat(1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0)
R = diagcat(0.3, 0.3, 0.3, 0.8)
# -> Test result: Drone completely goes off the rails and crazyflie flies crazily and fails

x_init = P[0:Nx]
g = X[:, 0] - P[0:Nx] # initial condition constraints
h = 0.15
Expand Down

0 comments on commit 44a758c

Please sign in to comment.