-
Notifications
You must be signed in to change notification settings - Fork 19
/
launch_flowpilot.sh
executable file
·39 lines (31 loc) · 1.32 KB
/
launch_flowpilot.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
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 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" "flowinit"
tmux attach -t flowpilot
fi
while true; do sleep 1; done