Skip to content

Commit

Permalink
Update installation description. Parameterize kaggle script.
Browse files Browse the repository at this point in the history
  • Loading branch information
amacati committed Apr 23, 2024
1 parent 53cfd44 commit a787612
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 11 deletions.
32 changes: 22 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,34 +46,46 @@ First, clone the new fork from your own account and create a new environment wit
```bash
mkdir -p ~/repos && cd repos
git clone https://github.com/<YOUR-USERNAME>/lsy_drone_racing.git
cd lsy_drone_racing
conda conda env create -f environment.yaml
conda env create -n drone python=3.8
conda activate drone
```

> **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.
Next, install the lsy_drone_racing package in editable mode from the repository root

```bash
pip install -e .
```

Download the `safe-control-gym` and `pycffirmware` repositories and install them. Make sure you have your conda/mamba environment active!
Next, download the `safe-control-gym` and `pycffirmware` repositories and install them. Make sure you have your conda/mamba environment active!

```bash
cd ~/repos
git clone -b beta-iros-competition https://github.com/utiasDSL/safe-control-gym.git
cd safe-control-gym
pip install . --no-deps
pip install .
```

> **Note:** If you receive an error installing safe-control-gym related to gym==0.21.0, run
> ```bash
> pip install setuptools==65.5.0 pip==21 wheel==0.38.4
> ```
> first
```bash
cd ~/repos
git clone https://github.com/utiasDSL/pycffirmware.git
cd pycffirmware
git submodule update --init --recursive
sudo apt update
sudo apt install build-essential
conda install swig
./wrapper/build_linux.sh
```
Now you can install the lsy_drone_racing package in editable mode from the repository root

```bash
cd ~/repos/lsy_drone_racing
pip install --upgrade pip
pip install -e .
```

Finally, you can test if the installation was successful by running

```bash
Expand Down
10 changes: 10 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@ classifiers = [
"Intended Audience :: Science/Research",
]

dependencies = [
"fire >= 0.6.0",
"munch >= 2.5.0",
"numpy >= 1.24.1",
"pandas >= 1.5.3",
"pybullet >= 3.2.6",
"PyYAML >= 6.0.1",
"rospkg >= 1.5.1",
"scipy >= 1.10.1",
]

[tool.setuptools]
packages = ["lsy_drone_racing"]
Expand Down
3 changes: 2 additions & 1 deletion scripts/kaggle.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
def main():
"""Run the simulation N times and save the results as 'submission.csv'."""
n_runs = 10
ep_times = simulate(config="config/level3.yaml", n_runs=n_runs, gui=False)
controller = "examples/controller.py"
ep_times = simulate(config="config/level3.yaml", controller=controller,n_runs=n_runs, gui=False)
# Log the number of failed runs if any

if failed := [x for x in ep_times if x is None]:
Expand Down

0 comments on commit a787612

Please sign in to comment.