forked from utiasDSL/lsy_drone_racing
-
Notifications
You must be signed in to change notification settings - Fork 0
/
level3.yaml
182 lines (165 loc) · 5.47 KB
/
level3.yaml
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
# Level 3
# | Evaluation Scenario | Constraints | Rand. Inertial Properties | Randomized Obstacles, Gates | Rand. Between Episodes | Notes |
# | :-----------------: | :----------: | :-----------------------: | :-------------------------: | :--------------------: | :---------------: |
# | `level3.yaml` | **Yes** | **Yes** | **Yes** | **Yes** | Robustness |
# Configuration
num_episodes: 5 # Customizable number of episodes (NOTE: solutions that require fewer episode will receive higher scores)
use_firmware: True # Whether to use pycffirmware or not (NOTE: only set to False for debugging purposes)
verbose: True # Boolean passed to the Controller class, can be used to turn on and off additional printouts
# Note: DSL's flyable/usable space in Toronto extends from -3 to +3 meters in x and y and 0 and 2 meters in z
# Thus, only scenarios that meet these constraints are suitable for sim2real experiments
# Environment
quadrotor_config:
seed: 1337 # Random seed
reseed_on_reset: False # Whether to re-seed the random number generator between episodes
gui: False # Whether to spawn PyBullet's GUI
camera_view: [5, -40, -40, 0.5, -1, 0.5] # Distance, yaw, pitch, x, y, z target position
ctrl_freq: 30 # Frequency of the controller's decision making
pyb_freq: 500 # If `use_firmware` == True, must be multiple of 500, otherwise it must be multiple of ctrl_freq
episode_len_sec: 33 # Maximum episode duration, in seconds
done_on_violation: True # Whether `done` becomes True when a constraint is violated
done_on_completion: True # Whether `done` becomes True when the task is completed (traveled all gates and 2'' hover at stabilization_goal)
done_on_collision: True # Whether `done` becomes True when a collision happens
cost: competition # Sparse reward function, if you desire, re-implement it in Quadrotor._get_reward()
# github.com/utiasDSL/safe-control-gym/blob/beta-iros-competition/safe_control_gym/envs/gym_pybullet_drones/quadrotor.py
task: stabilization
task_info:
stabilization_goal: [0, -2, 0.5] # Final goal (target position in x-y-z)
stabilization_goal_tolerance: 0.15
# Nominal (pre-randomization) initial state
init_state:
init_x: 1.0
init_x_dot: 0
init_y: 1.0
init_y_dot: 0
init_z: 0.05
init_z_dot: 0
init_phi: 0
init_theta: 0
init_psi: 0
init_p: 0
init_q: 0
init_r: 0
# Nominal (pre-randomization) positions of gates and obstacles
gates:
[ # x, y, z, r, p, y, type (0: `tall` obstacle, 1: `low` obstacle)
[0.45, -1.0, 0, 0, 0, 2.35, 1],
[1.0, -1.55, 0, 0, 0, -0.78, 0],
[0.0, 0.5, 0, 0, 0, 0, 1],
[-0.5, -0.5, 0, 0, 0, 3.14, 0]
]
obstacles:
[ # x, y, z, r, p, y
[1.0, -0.5, 0, 0, 0, 0],
[0.5, -1.5, 0, 0, 0, 0],
[-0.5, 0, 0, 0, 0, 0],
[0, 1.0, 0, 0, 0, 0]
]
# Randomization of the initial state
randomized_init: True
init_state_randomization_info:
init_x:
distrib: "uniform"
low: -0.1
high: 0.1
init_y:
distrib: "uniform"
low: -0.1
high: 0.1
init_z:
distrib: "uniform"
low: 0.0
high: 0.02
init_phi:
distrib: "uniform"
low: -0.1
high: 0.1
init_theta:
distrib: "uniform"
low: -0.1
high: 0.1
init_psi:
distrib: "uniform"
low: -0.1
high: 0.1
# Randomization of the quadrotor inertial properties
randomized_inertial_prop: True
inertial_prop_randomization_info:
M:
distrib: "uniform"
low: -0.01
high: 0.01
Ixx:
distrib: "uniform"
low: -0.000001
high: 0.000001
Iyy:
distrib: "uniform"
low: -0.000001
high: 0.000001
Izz:
distrib: "uniform"
low: -0.000001
high: 0.000001
# Randomization of the gates and obstacles positions
randomized_gates_and_obstacles: True
gates_and_obstacles_randomization_info:
gates:
distrib: "uniform"
low: -0.15
high: 0.15
obstacles:
distrib: "uniform"
low: -0.15
high: 0.15
# Constraints
constraints:
# Input constraints
- constraint_form: default_constraint
constrained_variable: input
# State constraints
- constraint_form: bounded_constraint
constrained_variable: state
active_dims: [0, 2, 4] # The uncommented entries in the upper_bounds/lower_bounds vectors below
upper_bounds:
- 3 # x
# - 100 # x_dot
- 3 # y
# - 100 # y_dot
- 2 # z
# - 100 # z_dot
# - 3 # phi
# - 3 # theta
# - 3 # psi
# - 10 # p
# - 10 # q
# - 10 # r
lower_bounds:
- -3 # x
# - -100 # x_dot
- -3 # y
# - -100 # y_dot
- -0.1 # z
# - -100 # z_dot
# - -3 # phi
# - -3 # theta
# - -3 # psi
# - -10 # p
# - -10 # q
# - -10 # r
# Disturbances
disturbances:
# Additive noise on the commanded input action
action:
- disturbance_func: white_noise
std: 0.001
# Random external force applied to the quadrotor (e.g. a push or wind)
dynamics:
- disturbance_func: uniform
low: [-0.1, -0.1, -0.1]
high: [0.1, 0.1, 0.1]
# Do NOT edit
quad_type: 3 # 3D quadrotor
info_in_reset: True # Info dictionary as second return value (after the initial observation) of env.reset()
normalized_rl_action_space: False
done_on_out_of_bound: False