Skip to content

Commit

Permalink
Update navigation2 docker README after adding script for pinning repos (
Browse files Browse the repository at this point in the history
space-ros#142).

Described the image content, repo update procedure and how to facilitate script for custom scenarios
  • Loading branch information
xfiderek committed Oct 2, 2024
1 parent 18a0326 commit a83f961
Showing 1 changed file with 28 additions and 6 deletions.
34 changes: 28 additions & 6 deletions navigation2/README.md
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -33,8 +35,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**.
Expand All @@ -45,13 +46,34 @@ 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.

By default, this update nav2 repositories using the latest released version of the Space ROS base image (typically `osrf/space-ros:latest`).
If building locally, the underlying base image can be set in the through the environment with:

```
SPACE_ROS_IMAGE=osrf/space-ros:main ./docker_update_nav2_repos.sh
```

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.

0 comments on commit a83f961

Please sign in to comment.