From 30493d7556213a45be36fb1a30a28d5a8f90bf43 Mon Sep 17 00:00:00 2001 From: xfiderek Date: Thu, 15 Aug 2024 21:31:27 +0200 Subject: [PATCH] Update navigation2 docker README after adding script for pinning repos (#142). Describe the image content, repo update procedure and how to facilitate script for custom scenarios --- navigation2/README.md | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/navigation2/README.md b/navigation2/README.md index cc5527f..2842632 100644 --- a/navigation2/README.md +++ b/navigation2/README.md @@ -1,7 +1,9 @@ # Navigation2 Docker Image The Navigation2 Docker image uses the Space ROS docker image (*osrf/space-ros:latest*) as its base image. -The Navigation2 Dockerfile installs all of the prerequisite system dependencies to build Navigation2 +The Navigation2 Dockerfile installs all of the prerequisite system dependencies to build Navigation2. +All the required nav2 packages are cloned and built from sources using the `navigation2.repos` file. The `nav2_rviz_plugins` and `nav2_bringup` packages together with their dependencies (Rviz, Gazebo, etc) are excluded to reduce package dependencies. The image also contains a custom `space_nav2_bringup` package that can be used as a starting point for creating mission-specific nav2 launch files. + ## Building the Navigation2 Image To build the docker image, run: @@ -25,8 +27,7 @@ The output will look something like this: ``` REPOSITORY TAG IMAGE ID CREATED SIZE osrf/space_nav2 latest 6edb2edc9643 10 hours ago 15.5GB -openrobotics/spaceros latest 629b13cf7b74 12 hours ago 7.8GB -nvidia/cudagl 11.4.1-devel-ubuntu20.04 336416dfcbba 1 week ago 5.35GB +osrf/space-ros latest 629b13cf7b74 12 hours ago 7.8GB ``` The new image is named **osrf/space_nav2:latest**. @@ -37,13 +38,28 @@ There is a run.sh script provided for convenience that will run the spaceros ima ./run.sh ``` -Upon startup, the container automatically runs the entrypoint.sh script, which sources the MoveIt2 and Space ROS environment files. +Upon startup, the container automatically runs the entrypoint.sh script, which sources the Nav2 and Space ROS environment files. You'll now be running inside the container and should see a prompt similar to this: ``` -root@ip-your-ip-address:/home/spaceros-user/nav2_ws# +spaceros-user@ip-your-ip-address:/home/spaceros-user/nav2_ws# ``` ## Running Navigation2 Demo -To run the latest demo, see the README in the nav2_demos folder +To run the latest demo, see the README in the [nav2_demo](../nav2_demo/README.md) folder. + + +## Updating navigation2 packages +The `navigation2.repos` file available in this repository provides a list of repos that are required to build the nav2 stack. ROS packages already included in the SpaceROS base image are omited from this file. + +To update navigation2 packages used to build the space nav2 image, run the `docker_update_nav2_repos.sh` script: + +``` +./docker_update_nav2_repos.sh +``` + +This will update the `navigation2.repos` file with the newest versions of nav2 packages. The script resolves missing packages in base spaceros image and creates a list with their latest versions. The `navigation2.repos` file is then copied during build to the docker image with space nav2, and packages specified in the file are cloned and installed. + +To generate a list of required packages for any other ROS workspace (e.g. your custom workspace built on top of SpaceROS that already has some nav2 dependencies installed), consider using the `update_nav2_repos.sh` as your starting point. You may also need to clone `generate-repos.sh` script from the main spaceros repository. +