Skip to content

Commit

Permalink
test: Care (or only 42.5%) about and velocities and reference input o…
Browse files Browse the repository at this point in the history
…f the drone

Q = diagcat(1, 1, 1, 0.255, 0.255, 0.425, 0, 0, 0, 0, 0, 0)
        R = diagcat(0.1275, 0.1275, 0.1275, 0.34)

        # N DISCR LEVEL: 10 -> performs a bit slower than 50%
  • Loading branch information
hedaniel7 committed Feb 16, 2024
1 parent 44a758c commit cbe0397
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
24 changes: 20 additions & 4 deletions gym_pybullet_drones/control/MPCCasADiControl.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ def __init__(self,
R = diagcat(0, 0, 0, 0)
# -> Test result: Drone completely goes off the rails and crazyflie flies crazily and fails'''

'''# Care 2x less about and velocities and reference input of the drone
'''# Care 2x less (or only 50%) about and velocities and reference input of the drone
# Reference Weighting matrices from the paper
# Q = diagcat(1, 1, 1, 0.6, 0.6, 1, 0, 0, 0, 0, 0, 0)
# R = diagcat(0.3, 0.3, 0.3, 0.8)
Expand All @@ -403,17 +403,33 @@ def __init__(self,
# AVERAGE DEVIATION: 0.09995147199727226
# MAXIMUM DEVIATION: 0.2386860064898518'''

# Care (or only 42.5%) about and velocities and reference input of the drone
# Reference Weighting matrices from the paper
# Q = diagcat(1, 1, 1, 0.6, 0.6, 1, 0, 0, 0, 0, 0, 0)
# R = diagcat(0.3, 0.3, 0.3, 0.8)

'''# Care 3x less about and velocities and reference input of the drone
Q = diagcat(1, 1, 1, 0.255, 0.255, 0.425, 0, 0, 0, 0, 0, 0)
R = diagcat(0.1275, 0.1275, 0.1275, 0.34)

### if distance < 0.2:
# if current_step == len(TARGET_TRAJECTORY) - 1:

# N DISCR LEVEL: 10 -> performs a bit slower than 50%



'''# Care 3x less about (or only 33%) and velocities and reference input of the drone
Q = diagcat(1, 1, 1, 0.2, 0.2, 0.1666, 0, 0, 0, 0, 0, 0)
R = diagcat(0.1, 0.1, 0.1, 0.2666)
# DEFAULT_DISCR_LEVEL = 10 -> causes it to fail on at least two tracks midways'''

# Don't care about the velocity of the drone


'''# 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
# -> 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
DEFAULT_SIMULATION_FREQ_HZ = 240
DEFAULT_CONTROL_FREQ_HZ = 48
# DEFAULT_DURATION_SEC = 50
DEFAULT_DURATION_SEC = 30
DEFAULT_DURATION_SEC = 10
DEFAULT_OUTPUT_FOLDER = 'results'
DEFAULT_COLAB = False
DEFAULT_DISCR_LEVEL = 10
Expand Down

0 comments on commit cbe0397

Please sign in to comment.