-
Notifications
You must be signed in to change notification settings - Fork 20
/
launch_flowpilot_full.sh
executable file
·48 lines (39 loc) · 1.63 KB
/
launch_flowpilot_full.sh
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
set -e
source ./.env
export LD_LIBRARY_PATH=/system/vendor/lib64:$LD_LIBRARY_PATH
export WIDE_ROAD_CAMERA_SOURCE="selfdrive/assets/tmp" # no affect on android
export ROAD_CAMERA_SOURCE="selfdrive/assets/tmp" # no affect on android
export USE_GPU="0" # no affect on android, gpu always used on android
export PASSIVE="0"
export NOSENSOR="1"
#export MSGQ="1"
#export USE_PARAMS_NATIVE="1"
export ZMQ_MESSAGING_PROTOCOL="TCP" # TCP, INTER_PROCESS, SHARED_MEMORY
#export DISCOVERABLE_PUBLISHERS="1" # if enabled, other devices on same network can access sup/pub data.
#export DEVICE_ADDR="127.0.0.1" # connect to external device running flowpilot over same network. useful for livestreaming.
export SIMULATION="0"
#export FINGERPRINT="HYUNDAI KONA ELECTRIC 2019"
## android specific ##
export USE_SNPE="1" # only works for snapdragon devices.
## get all cars
mkdir -p /sdcard/flowpilot
cat selfdrive/car/*/values.py|grep '= "'|grep -v ':'|awk -F'"' '{print $(NF-1)}' | sort > /sdcard/flowpilot/allcars.txt
sed -i '1s/^/--Select Cars--\n/' /sdcard/flowpilot/allcars.txt
if ! command -v tmux &> /dev/null
then
echo "tmux could not be found, installing.."
sudo apt-get update
sudo apt-get install tmux
echo "set -g mouse on" >> ~/.tmux.conf # enable mouse scrolling in tmux
echo "set -g remain-on-exit on" >> ~/.tmux.conf # retain tmux session on ctrl + c
fi
if pgrep -x "flowinit" > /dev/null
then
echo "another instance of flowinit is already running"
exit
else
# start a tmux pane
tmux new-session -d -s "flowpilot" "scons && flowinit"
tmux attach -t flowpilot
fi
while true; do sleep 1; done