-
Notifications
You must be signed in to change notification settings - Fork 56
/
setup_py.bash
executable file
·73 lines (53 loc) · 2.36 KB
/
setup_py.bash
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
#!/bin/bash
if [[ ! -f "$(pwd)/setup_py.bash" ]]
then
echo "please launch from the agile_flight folder!"
exit
fi
project_path=$PWD
echo $project_path
echo "Making sure submodules are initialized and up-to-date"
git submodule update --init --recursive
echo "Using apt to install dependencies..."
echo "Will ask for sudo permissions:"
sudo apt update
sudo apt install -y --no-install-recommends build-essential cmake libzmqpp-dev libopencv-dev
echo "Ignoring unused Flightmare folders!"
touch flightmare/flightros/CATKIN_IGNORE
# echo "Downloading Trajectories..."
wget "https://download.ifi.uzh.ch/rpg/Flightmare/trajectories.zip" --directory-prefix=$project_path/flightmare/flightpy/configs/vision
echo "Unziping Trajectories... (this might take a while)"
unzip -o $project_path/flightmare/flightpy/configs/vision/trajectories.zip -d $project_path/flightmare/flightpy/configs/vision/ | awk 'BEGIN {ORS=" "} {if(NR%50==0)print "."}'
echo "Removing Trajectories zip file"
rm $project_path/flightmare/flightpy/configs/vision/trajectories.zip
echo "Downloading Flightmare Unity standalone..."
wget "https://download.ifi.uzh.ch/rpg/Flightmare/RPG_Flightmare.zip" --directory-prefix=$project_path/flightmare/flightrender
echo "Unziping Flightmare Unity Standalone... (this might take a while)"
unzip -o $project_path/flightmare/flightrender/RPG_Flightmare.zip -d $project_path/flightmare/flightrender | awk 'BEGIN {ORS=" "} {if(NR%10==0)print "."}'
echo "Removing Flightmare Unity Standalone zip file"
rm $project_path/flightmare/flightrender/RPG_Flightmare.zip
#
echo "export FLIGHTMARE_PATH=$project_path/flightmare" >> ~/.bashrc
source ~/.bashrc
#
echo "Createing an conda environment from the environment.yaml file. Make sure you have anaconda installed"
conda env create -f environment.yaml
#
echo "Source the anaconda environment. If errors, change to the right anaconda path."
source ~/anaconda3/etc/profile.d/conda.sh
#
echo "Actiavte the environment"
conda activate agileflight
echo "Compiling the agile flight environment and install the environment as python package"
cd $project_path/flightmare/flightlib/build
cmake ..
make -j10
pip install .
echo "Install RPG baseline"
cd $project_path/flightmare/flightpy/flightrl
pip install .
echo "Run the first vision demo."
cd $project_path/envtest
python3 -m python.run_vision_demo --render 1
echo "Done!"
echo "Have a save flight!"