Files
sunnypilot/installer/custom/install_osm.sh
T
Jason Wen c726a82eaf mapd: offline/local OpenStreetMap database, Feature Speed Limits (#55)
* mapd: offline/local database

* link overpy before manager

* add path to deps

* down here

* this too

* don't force redownload/reinstall unless db not current

* make things neater in json

* small fix

* Revert "small fix"

This reverts commit dbc70ee6d40b51e4d7c4a4af4523d23737350905.

* Revert "make things neater in json"

This reverts commit 1b244c552c1bf877e8b6bf879ca73ebf72617025.

* neater attempt 2 (no reboot for now)

* neater attempt 2 (no reboot for now)

* "selected" not working

* make it stick

* already QString

* check when menu is up

* check when menu is up

* interactive buttons

* add label to inform users about car off

* update texts

* set all params properly

* clean up ui logic

* test

* revert

* ui logic again

* interactive button

* after confirmation updates

* only check when selected

* stop signs?

* bruh

* missed

* small cleanup

* query for real from local db

* Revert "query for real from local db"

This reverts commit d7eb664da2949b073c7d7eb00e0098aa01c83ad3.

* don't hold in same object

* remote server as fallback if local server fails

* use different waypoint

* use function

* declare missing vars

* skip SSL/TLS verification

* fallback to online query if local query fails

* don't prompt to reboot if none is selected

* update ui on press

* Revert "skip SSL/TLS verification"

This reverts commit 2eb5c0972a08227edbfc4f50c38d22d2ced62423.

* simplier

* handle ConnectionError

* point to sunnypilot-osm S3 bucket

* revert freq of road name

* small cleanup

* small cleanup

* revert

* cleanup

* TEMP: test online/offline switchover

* Revert "TEMP: test online/offline switchover"

This reverts commit 4641b8e6f26f4015559a9aff2271f1850708ab09.

* set user-agent

* more databases!

* new urls

* TEST: remove check here

* parse timestamp from file content instead of HEAD Last Modified

* not correct

* wrong var

* don't need this

* have list in cpp

* don't read from json

* provide expectation

* add var to gate feature speed limits

* remove unused
2023-03-24 14:46:14 -04:00

36 lines
974 B
Bash
Executable File

# OSM Installation instructions:
# https://wiki.openstreetmap.org/wiki/Overpass_API/Installation
# Install expat. All other needed libraries are already installed.
# g++ make expat libexpat1-dev zlib1g-dev
#sudo apt-get update
#sudo apt-get install expat
# Add required path variables to environment
export OSM_ROOT=/data/media/0/osm
export OSM_VERSION=0.7.57
export GZ_FILE=osm-3s_v${OSM_VERSION}.tar.xz
export OSM_DIR=${OSM_ROOT}/v${OSM_VERSION}
# export DB_DIR=/data/osm/db/
# Download and extract overpass library
if [ ! -d ${OSM_ROOT} ]; then
mkdir -p ${OSM_ROOT}
fi
tar -vxf /data/openpilot/selfdrive/mapd/assets/${GZ_FILE} -C ${OSM_ROOT}
# Configure and install overpass
#cd $(ls | grep $SOURCE_FILE_ROOT\.[0-9]*)
#cd osm-3s_v0.7.56
#./configure CXXFLAGS="-O2" --prefix=$EXEC_DIR
#make install
# Remove source files after installation
#cd ..
if [ -d ${OSM_DIR} ]; then
rm -rf ${OSM_DIR}
fi
mv ${OSM_ROOT}/osm-3s_v${OSM_VERSION} ${OSM_ROOT}/v${OSM_VERSION}