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
> **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.
58
+
54
59
Now you can install the lsy_drone_racing package in editable mode from the repository root
55
60
56
61
```bash
@@ -67,7 +72,6 @@ cd pycffirmware
67
72
git submodule update --init --recursive
68
73
sudo apt update
69
74
sudo apt install build-essential
70
-
conda install swig
71
75
./wrapper/build_linux.sh
72
76
```
73
77
@@ -80,22 +84,47 @@ python scripts/sim.py
80
84
81
85
If everything is installed correctly, this opens the simulator and simulates a drone flying through four gates.
82
86
87
+
You can also install the extended dependencies with
88
+
```bash
89
+
conda activate race
90
+
cd~/repos/lsy_drone_racing
91
+
pip install -e .[rl, test]
92
+
```
93
+
and check if all tests complete with
94
+
```bash
95
+
cd~/repos/lsy_drone_racing
96
+
pytest tests
97
+
```
98
+
83
99
### Using Docker
84
-
TODO: Add docker instructions
100
+
You can also run the simulation with Docker, albeit without the GUI at the moment. To test this, install docker with docker compose on your system, and then run
101
+
```bash
102
+
docker compose build
103
+
docker compose up
104
+
```
105
+
After building, running the container should produce the following output:
106
+
107
+
```bash
108
+
sim-1 | INFO:__main__:Flight time (s): 8.466666666666667
109
+
sim-1 | Reason for termination: Task completed
110
+
sim-1 | Gates passed: 4
111
+
sim-1 |
112
+
sim-1 | 8.466666666666667
113
+
```
85
114
86
115
## Difficulty levels
87
116
The complete problem is specified by a TOML file, e.g. [`level0.toml`](config/level0.toml)
88
117
89
118
The config folder contains settings for progressively harder scenarios:
| sim2real |**Yes**| Real-life hardware |**Yes**|*No*| Sim2real transfer |
99
128
100
129
> **Note:** "Rand. Between Episodes" (governed by argument `reseed_on_reset`) states whether randomized properties and positions vary or are kept constant (by re-seeding the random number generator on each `env.reset()`) across episodes
101
130
@@ -112,7 +141,7 @@ During the semester, you will compete with the other teams on who's the fastest
112
141
113
142
### Signing up for the online competition
114
143
115
-
To take part in the competition, you first have to create an account on [Kaggle](https://www.kaggle.com/). Next, use this [invite link](https://www.kaggle.com/t/1a37a7de76c745e29a7d7c61e538d581) to join the competition, go to the [drone racing competition](https://www.kaggle.com/competitions/lsy-drone-racing-ss24/overview), click on "Rules", and accept the competition conditions. This step is necessary to allow submissions from your account.
144
+
To take part in the competition, you first have to create an account on [Kaggle](https://www.kaggle.com/). Next, use this [invite link](https://www.kaggle.com/t/487e7e8777364612ba3f9ea3a6a1ea15) to join the competition, go to the [drone racing competition](https://www.kaggle.com/competitions/lsy-drone-racing-ws24/overview), click on "Rules", and accept the competition conditions. This step is necessary to allow submissions from your account.
116
145
117
146
### Setting up your GitHub repo for the competition
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.
172
201
173
-
## Deployment (**NOT IMPORTANT FOR STUDENTS FOR NOW**)
202
+
## Deployment
174
203
175
204
### Hardware setup
176
205
177
206
To deploy the controllers on real drones you must install ROS Noetic and the crazyswarm package.
178
207
179
-
Create a catkin_ws/src folder if it does not exist already, clone the crazywarm package and build the workspace
208
+
Clone the [crazyswarm repository](https://github.com/USC-ACTLab/crazyswarm) and follow its [build steps](https://crazyswarm.readthedocs.io/en/latest/installation.html).
git clone -b dsl-iros-comp-flight [email protected]:utiasDSL/crazyflie-firmware-import.git # other options are `dsl-sim2real-logging-v1`, etc.
216
-
cd crazyflie-firmware-import
217
-
git submodule update --init --recursive
218
-
sudo apt-get install make gcc-arm-none-eabi
219
-
make cf2_defconfig # Make the default config file.
220
-
make -j 12
221
-
222
-
# USB preparation for crazyradio
223
-
sudo groupadd plugdev
224
-
sudo usermod -a -G plugdev $USER
225
244
```
226
245
227
-
```bash
228
-
# Apply changes
229
-
sudo udevadm control --reload-rules
230
-
sudo udevadm trigger
231
-
232
-
# Flash crazyflie C10 (cf9 in the Vicon objects list)
233
-
# Turn the Crazyflie off, then start the Crazyflie in bootloader mode by pressing the power button for 3 seconds. Both the blue LEDs will blink.
234
-
cd~/GitHub/crazyflie-firmware-import/
235
-
make cload
246
+
To start the Vicon bridge by default, you may want to include it in the crazyswarm launchfile.
236
247
248
+
Optionally, you can also install cfclient to debug issues with the drones and configure IDs etc.
249
+
```bash
237
250
# (optional) Install cfclient
238
251
sudo apt install libxcb-xinerama0
239
252
conda create -n cfclient python=3.7
@@ -243,9 +256,6 @@ pip install cfclient
243
256
conda deactivate
244
257
```
245
258
246
-
### Vicon bridge
247
-
TODO: Expand
248
-
249
259
### Common errors
250
260
251
261
#### libNatNet
@@ -263,31 +273,26 @@ Make sure you are familiar with the configuration files. Not all options are rel
263
273
264
274
The important config files are located in the crazyswarm ROS package:
265
275
266
-
**TODO:** Insert correct link to files
267
-
- Crazyflies types — includes controller properties and marker configurations, etc.
268
-
- In-use Crazyflies — includes ID, radio channel, types, etc.
269
-
- All Crazyflies
270
-
271
-
As well as the launch file and Python script:
276
+
-[Crazyflies types](https://github.com/USC-ACTLab/crazyswarm/blob/master/ros_ws/src/crazyswarm/launch/crazyflieTypes.yaml) — includes controller properties and marker configurations, etc.
277
+
-[In-use Crazyflies](https://github.com/USC-ACTLab/crazyswarm/blob/master/ros_ws/src/crazyswarm/launch/crazyflies.yaml) — includes ID, radio channel, types, etc.
272
278
273
-
- cf_sim2real.launch
274
-
- cmdFullStateCFFirmware.py
279
+
As well as the main launch file [hover_swarm.launch](https://github.com/USC-ACTLab/crazyswarm/blob/master/ros_ws/src/crazyswarm/launch/hover_swarm.launch).
275
280
276
281
#### Launch
277
282
278
283
>**Note:** The following is **NOT** within a conda environment, but has to run directly on the system's Python 3.8 installation. ROS has never heard of these best practices you speak of.
279
284
280
285
In a terminal, launch the ROS node for the crazyflies. Change the settings in _<path/to/crazyswarm/package>/launch/crazyflies.yaml_ as necessary.
file = "trajectory_controller.py"# Put your controller file name here. Specifying a controller as argument to scripts will override this setting. Controllers are located in `lsy_drone_racing/control/`
file = "trajectory_controller.py"# Put your controller file name here. Specifying a controller as argument to scripts will override this setting. Controllers are located in `lsy_drone_racing/control/`
file = "trajectory_controller.py"# Put your controller file name here. Specifying a controller as argument to scripts will override this setting. Controllers are located in `lsy_drone_racing/control/`
file = "trajectory_controller.py"# Put your controller file name here. Specifying a controller as argument to scripts will override this setting. Controllers are located in `lsy_drone_racing/control/`
0 commit comments