From 8d95faf97a0717be33ec12f9039efd22fad36857 Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Wed, 14 Dec 2022 17:17:25 -0800 Subject: [PATCH] nav: add README (#26802) * start docs * Update README.md --- selfdrive/navd/README.md | 24 +++++++++++++++++++ .../{ui/qt/maps => navd}/set_destination.py | 0 2 files changed, 24 insertions(+) create mode 100644 selfdrive/navd/README.md rename selfdrive/{ui/qt/maps => navd}/set_destination.py (100%) diff --git a/selfdrive/navd/README.md b/selfdrive/navd/README.md new file mode 100644 index 0000000000..6c7f7eabe3 --- /dev/null +++ b/selfdrive/navd/README.md @@ -0,0 +1,24 @@ +# navigation + +This directory contains two daemons, `navd` and `map_renderer`, which support navigation in the openpilot stack. + +### navd + +`navd` takes in a route through the `NavDestination` param and sends out two packets: `navRoute` and `navInstruction`. These packets contain the coordinates of the planned route and turn-by-turn instructions. + +### map renderer + +The map renderer listens for the `navRoute` and publishes a rendered map view over VisionIPC for the navigation model, which lives in `selfdrive/modeld/`. The rendered maps look like this: + +![](https://i.imgur.com/oZLfmwq.png) + +## development + +Currently, [mapbox](https://www.mapbox.com/) is used for navigation. + +* get an API token: https://docs.mapbox.com/help/glossary/access-token/ +* set an API token using the `MAPBOX_TOKEN` environment variable +* routes/destinations are set through the `NavDestination` param + * use `set_destination.py` for debugging +* edit the map: https://www.mapbox.com/contribute +* mapbox API playground: https://docs.mapbox.com/playground/ diff --git a/selfdrive/ui/qt/maps/set_destination.py b/selfdrive/navd/set_destination.py similarity index 100% rename from selfdrive/ui/qt/maps/set_destination.py rename to selfdrive/navd/set_destination.py