You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+37-23
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,7 @@
15
15
-[Setting up your GitHub repo for the competition](#setting-up-your-github-repo-for-the-competition)
16
16
-[Submitting your latest iteration](#submitting-your-latest-iteration)
17
17
-[Creating your own controller](#creating-your-own-controller)
18
+
-[Common errors](#common-errors)
18
19
-[Deployment (**NOT IMPORTANT FOR STUDENTS FOR NOW**)](#deployment-not-important-for-students-for-now)
19
20
-[Hardware setup](#hardware-setup)
20
21
-[Common errors](#common-errors)
@@ -26,10 +27,9 @@
26
27
27
28
## Installation
28
29
29
-
To run the LSY Autonomous Drone Racing project, you will need 3 main repositories:
30
-
-[safe-control-gym](https://github.com/utiasDSL/safe-control-gym/tree/beta-iros-competition) - `beta-iros-competition` branch: The drone simulator and gym environments
30
+
To run the LSY Autonomous Drone Racing project, you will need 2 repositories:
31
31
-[pycffirmware](https://github.com/utiasDSL/pycffirmware) - `main` branch: A simulator for the on-board controller response of the drones we are using to accurately model their behavior
32
-
-[lsy_drone_racing](https://github.com/utiasDSL/lsy_drone_racing) - `main` branch: This repository contains the scripts to simulate and deploy the drones in the racing challenge
32
+
-[lsy_drone_racing](https://github.com/utiasDSL/lsy_drone_racing) - `main` branch: This repository contains the drone simulation, environments, and scripts to simulate and deploy the drones in the racing challenge
33
33
34
34
### Fork lsy_drone_racing
35
35
@@ -51,21 +51,14 @@ conda activate drone
51
51
```
52
52
53
53
> **Note:** It is important you stick with **Python 3.8**. Yes, it is outdated. Yes, we'd also like to upgrade. However, there are serious issues beyond our control when deploying the code on the real drones with any other version.
54
-
55
-
Next, download the `safe-control-gym` and `pycffirmware` repositories and install them. Make sure you have your conda/mamba environment active!
54
+
Now you can install the lsy_drone_racing package in editable mode from the repository root
In addition, you also need to install the pycffirmware package from source with
69
62
70
63
```bash
71
64
cd~/repos
@@ -78,14 +71,6 @@ conda install swig
78
71
./wrapper/build_linux.sh
79
72
```
80
73
81
-
Now you can install the lsy_drone_racing package in editable mode from the repository root
82
-
83
-
```bash
84
-
cd~/repos/lsy_drone_racing
85
-
pip install --upgrade pip
86
-
pip install -e .
87
-
```
88
-
89
74
Finally, you can test if the installation was successful by running
90
75
91
76
```bash
@@ -153,6 +138,35 @@ Once you have pushed your latest iteration, a GitHub action runner will start te
153
138
154
139
To implement your own controller, have a look at the [example implementation](./examples/controller.py). We recommend altering the existing example controller instead of creating your own file to not break the testing pipeline. Please also read through the documentation of the controller. You **must not** alter its function signatures. If you encounter problems implementing something with the given interface, contact one of the lecturers.
155
140
141
+
## Common errors
142
+
143
+
### GLIBCXX
144
+
If you were able to install everything without any issues, but the simulation crashes when running the sim script, you should check the error messages for any errors related to `LIBGL` and `GLIBCXX_3.4.30`. If you don't find any conclusive evidence about what has happened, you might also want to run the simulation in verbose mode for `LIBGL` with
145
+
146
+
```bash
147
+
LIBGL_DEBUG=verbose python scripts/sim.py
148
+
```
149
+
150
+
Next, you should check if your system has the required library installed
If neither of those yield any results, you are missing this library and can install it with
163
+
164
+
```bash
165
+
conda install -c conda-forge gcc=12.1.0
166
+
```
167
+
168
+
If the program still crashes and complains about not finding `GLIBCXX_3.4.30`, please update your `LD_LIBRARY_PATH` variable to point to your conda environment's lib folder.
169
+
156
170
## Deployment (**NOT IMPORTANT FOR STUDENTS FOR NOW**)
These benchmarks are intended to test the performance of the implementation, i.e. speed and memory consumption. They are not meant to benchmark different approaches, algorithms or agents in the race task!
4
+
5
+
## Profiling
6
+
To profile the simulation, use [pyinstrument](https://github.com/joerick/pyinstrument) and run
physics = "pyb"# pyb: PyBullet, dyn: Mathematical dynamics model, TODO: Complete the list
3
+
camera_view = [5.0, -40.0, -40.0, 0.5, -1.0, 0.5]
4
+
sim_freq = 500# Simulation frequency, in Hz
5
+
ctrl_freq = 500# Controller frequency, in Hz. This frequency is used to simulate the onboard controller, NOT for the environment's step function
6
+
gui = false# Enable/disable PyBullet's GUI
7
+
8
+
[sim.disturbances.action]
9
+
type = "GaussianNoise"
10
+
std = 0.001
11
+
12
+
[sim.disturbances.dynamics]
13
+
type = "UniformNoise"
14
+
low = [-0.1, -0.1, -0.1]
15
+
high = [0.1, 0.1, 0.1]
16
+
17
+
[env]
18
+
reseed = false# Whether to re-seed the random number generator between episodes
19
+
seed = 1337# Random seed
20
+
freq = 30# Frequency of the environment's step function, in Hz
21
+
symbolic = false# Whether to include symbolic expressions in the info dict. Note: This can interfere with multiprocessing! If you want to parallelize your training, set this to false.
22
+
23
+
[env.track]
24
+
# Tall gates: 1.0m height. Short gates: 0.525m height. Height is measured from the ground to the
25
+
# center of the gate.
26
+
[[env.track.gates]]
27
+
pos = [0.45, -1.0, 0.525]
28
+
rpy = [0.0, 0.0, 2.35]
29
+
[[env.track.gates]]
30
+
pos = [1.0, -1.55, 1.0]
31
+
rpy = [0.0, 0.0, -0.78]
32
+
[[env.track.gates]]
33
+
pos = [0.0, 0.5, 0.525]
34
+
rpy = [0.0, 0.0, 0.0]
35
+
[[env.track.gates]]
36
+
pos = [-0.5, -0.5, 1.0]
37
+
rpy = [0.0, 0.0, 3.14]
38
+
39
+
# Obstacle height: 1.05m. Height is measured from the ground to the top of the obstacle.
40
+
[[env.track.obstacles]]
41
+
pos = [1.0, -0.5, 1.05]
42
+
[[env.track.obstacles]]
43
+
pos = [0.5, -1.5, 1.05]
44
+
[[env.track.obstacles]]
45
+
pos = [-0.5, 0.0, 1.05]
46
+
[[env.track.obstacles]]
47
+
pos = [0.0, 1.0, 1.05]
48
+
49
+
[env.track.drone]
50
+
pos = [1.0, 1.0, 0.05]
51
+
rpy = [0, 0, 0]
52
+
vel = [0, 0, 0]
53
+
ang_vel = [0, 0, 0]
54
+
55
+
[env.randomization.drone_pos]
56
+
type = "uniform"# Everything that can be used as a distribution in numpy.random
57
+
# Kwargs that are permissable in the np random function
0 commit comments