Build and Install¶
Nav2 and its dependencies are released as binaries. You may install it via the following to get the latest stable released version:
sudo apt install ros-<distro>-navigation2 ros-<distro>-nav2-bringup ros-<distro>-turtlebot3*
(For Ubuntu 20.04 use this command as the parsing of wildcards have been changed:
sudo apt install ros-<distro>-navigation2 ros-<distro>-nav2-bringup '~ros-<distro>-turtlebot3-.*'
There are 3 ways to build Nav2.
Building for a specific released distribution (e.g.
galactic), build Nav2 on main branch using a quickstart setup script, or building main branch manually.
For Released Distributions¶
For Main Branch Development¶
The official Dockerhub entries are primarily for use in the Nav2 CI, but they may also be used for development. It is useful to have a docker image that tracks Nav2
main branch. The
Dockerfile in the root of the repository is recommended for production use, set to your distribution of choice.
It is though generally recomended to install Nav2 releases from the apt repository inside a container if you’d like to use our released binaries.
Building Docker Container¶
To build an image from the Dockerfile in the Nav2 folder: First, clone the repo to your local system (or see Building the source above)
sudo docker build -t nav2/latest .
If proxies are needed:
sudo docker build -t nav2/latest --build-arg http_proxy=http://proxy.my.com:### --build-arg https_proxy=http://proxy.my.com:### .
Note: You may also need to configure your docker for DNS to work. See article here for details: https://development.robinwinslow.uk/2016/06/23/fix-docker-networking-dns/
If you would like to build from dockerhub cache to speed up the build
sudo docker pull rosplanning/navigation2:main sudo docker build -t nav2/latest --cache-from rosplanning/navigation2:main .
Using DockerHub Container¶
We allow for you to pull the latest docker image from the main branch at any time. As new releases and tags are made, docker containers on docker hub will be versioned as well to chose from. This docker image will not contain a built overlay, and you must build the overlay Nav2 workspace yourself (see Build Nav2 Main up above).
sudo docker pull rosplanning/navigation2:main
doxygen in the root of the Nav2 repository.
It will generate a
/doc/* directory containing the documentation.
The documentation entrypoint in a browser is index.html.