-
Notifications
You must be signed in to change notification settings - Fork 6
/
datt_wind_adaptive.py
57 lines (48 loc) · 1.57 KB
/
datt_wind_adaptive.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import numpy as np
from DATT.configuration.configuration import *
drone_config = DroneConfiguration(
mass = ConfigValue[float](1.0, randomize=False, min=0.7, max=1.3),
I = ConfigValue[float](1.0, randomize=False, min=0.9, max=1.1),
# g = ConfigValue[float](9.8, False)
)
wind_config = WindConfiguration(
is_wind = True,
dir = ConfigValue[np.ndarray](
default=np.zeros(3),
randomize=True,
min=np.array([-1, -1, -1]),
max=np.array([1, 1, 1])
),
)
init_config = InitializationConfiguration(
pos = ConfigValue[np.ndarray](
default=np.array([0.0, 0.0, 0.0]),
randomize=False,
min=np.array([-0, -0, -0]),
max=np.array([0, 0, 0])
),
vel = ConfigValue[np.ndarray](
default=np.array([0.0, 0.0, 0.0]),
randomize=False
),
# Represented as Euler ZYX in degrees
rot = ConfigValue[np.ndarray](
default=np.array([0.0, 0.0, 0.0]),
randomize=False
),
ang = ConfigValue[np.ndarray](
default=np.array([0.0, 0.0, 0.0]),
randomize=False
)
)
sim_config = SimConfiguration(
linear_var=ConfigValue[float](default=0.0, randomize=False),
angular_var=ConfigValue[float](default=0.0, randomize=False),
obs_noise=ConfigValue[float](default=0.005, randomize=False),
latency=ConfigValue[int](default=0.0, randomize=False),
k=ConfigValue[float](default=0.4, randomize=False)
)
adapt_config = AdaptationConfiguration(
include = [EnvCondition.WIND]
)
config = AllConfig(drone_config, wind_config, init_config, sim_config, adapt_config)