This folder holds the source and configuration files used to generate the Navigation2 documentation web site.
Dependencies for Build:
sudo apt install python3-pip
pip3 install -r requirements.txtInstall pip and venv if not already installed:
sudo apt install python3-pip python3-venvCreate a virtual environment and install the dependencies:
python3 -m venv venv
source venv/bin/activate
pip3 install -r requirements.txtBuild the Docker image (from this directory):
docker build -f Dockerfile --build-arg user=$(id -un) --build-arg uid=$(id -u) -t nav2_docs .To build the documentation:
docker run --rm -v $(pwd):/docs nav2_docs make htmlTo run autobuild (watches for changes and rebuilds automatically):
docker run --init --rm -it -v $(pwd):/docs -p 8000:8000 nav2_docs make autobuildThen browse to http://127.0.0.1:8000. Use Ctrl+C to stop (the --init flag enables proper signal handling).
If you're using Visual Studio Code, you can use the dev container for an easy setup:
- Install the Dev Containers extension
- Open this folder in VS Code
- When prompted, click "Reopen in Container" (or use Command Palette: "Dev Containers: Reopen in Container")
- Once the container is built and running, use the integrated terminal to build the docs
The dev container automatically sets up all dependencies. You can then use the build tasks or run commands directly:
- Build once:
make htmlor use the "Build" task (Ctrl+Shift+B) - Auto-rebuild:
make autobuildor use the "Autobuild" task
Build the docs locally with make html and you'll find the built docs entry point in _build/html/index.html.
To automate the build process, you can use a sphinx-autobuild package.
Run this command from the virtual environment to build the documentation and start a server:
sphinx-autobuild . ./_build/htmlFor more options for the command, see the documentation linked above.
Now you can access the page using the local address: http://127.0.0.1:8000.
After saving any changes, the documentation will be automatically rebuilt and displayed.
Any images, diagrams, or videos are subject to their own copyrights, trademarks, and licenses.
Want a local PDF version? Follow the instructions here.