Skip to content

Commit 63ce44c

Browse files
authored
Merge branch 'ros-navigation:master' into master
2 parents 378dbc4 + da1e5cd commit 63ce44c

61 files changed

Lines changed: 1198 additions & 226 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.devcontainer/devcontainer.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
},
77
"workspaceMount": "source=${localWorkspaceFolder},target=/docs,type=bind",
88
"workspaceFolder": "/docs",
9-
"onCreateCommand": ".devcontainer/on-create-command.sh",
10-
"updateContentCommand": ".devcontainer/update-content-command.sh",
119
"customizations": {
1210
"vscode": {
1311
"settings": {},

.devcontainer/on-create-command.sh

Lines changed: 0 additions & 12 deletions
This file was deleted.

.devcontainer/update-content-command.sh

Lines changed: 0 additions & 11 deletions
This file was deleted.

Dockerfile

Lines changed: 39 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,49 @@
1-
FROM ubuntu:focal
1+
# This dockerfile is for building the Navigation2 documentation.
2+
#
3+
# To build the image (from the root of the repository):
4+
# $ docker build -f Dockerfile --build-arg user=$(id -un) --build-arg uid=$(id -u) -t nav2_docs .
5+
#
6+
# To use the image to build the docs:
7+
# $ docker run --rm -v $(pwd):/docs nav2_docs make html
8+
#
9+
# To run autobuild (watches for changes and rebuilds automatically):
10+
# $ docker run --init --rm -it -v $(pwd):/docs -p 8000:8000 nav2_docs make autobuild
11+
# Then browse to http://127.0.0.1:8000
12+
# Use Ctrl+C to stop (--init flag enables proper signal handling)
13+
#
14+
# The built documentation will be in _build/html/
215

3-
ARG DEBIAN_FRONTEND=noninteractive
4-
RUN apt update && \
5-
apt install -y \
16+
FROM ubuntu:noble
17+
18+
ARG user=nav2doc
19+
ARG uid=1000
20+
21+
ENV DEBIAN_FRONTEND=noninteractive
22+
ENV SHELL=/bin/bash
23+
24+
# Delete user if it exists in container (e.g Ubuntu Noble: ubuntu)
25+
RUN if id -u $uid ; then userdel `id -un $uid` ; fi
26+
27+
RUN apt-get update && \
28+
apt-get install --no-install-recommends -y \
629
doxygen \
730
git \
831
graphviz \
932
make \
1033
openjdk-8-jre \
1134
openssh-server \
1235
python3-pip \
13-
ttf-dejavu
36+
fonts-dejavu && \
37+
rm -rf /var/lib/apt/lists/*
38+
39+
RUN useradd -u $uid -m $user
40+
41+
ENV HOME=/home/$user
42+
ENV PATH="$HOME/.local/bin:$PATH"
43+
44+
USER $user
1445

1546
COPY requirements.txt ./
16-
RUN pip3 install -r requirements.txt
47+
RUN pip3 install --no-warn-script-location --user --break-system-packages -r requirements.txt
48+
49+
WORKDIR /docs

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ html:
3838
# Autobuild the docs on changes
3939

4040
autobuild:
41-
sphinx-autobuild -t $(DOC_TAG) -b html -d $(BUILDDIR)/doctrees $(SOURCEDIR) $(BUILDDIR)/html $(SPHINXOPTS)
41+
sphinx-autobuild --host 0.0.0.0 --port 8000 -t $(DOC_TAG) -b html -d $(BUILDDIR)/doctrees $(SOURCEDIR) $(BUILDDIR)/html $(SPHINXOPTS)
4242

4343
# Remove generated content (Sphinx and doxygen)
4444

README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,43 @@ source venv/bin/activate
3030
pip3 install -r requirements.txt
3131
```
3232

33+
### Using Docker
34+
35+
Build the Docker image (from this directory):
36+
37+
```bash
38+
docker build -f Dockerfile --build-arg user=$(id -un) --build-arg uid=$(id -u) -t nav2_docs .
39+
```
40+
41+
To build the documentation:
42+
43+
```bash
44+
docker run --rm -v $(pwd):/docs nav2_docs make html
45+
```
46+
47+
To run autobuild (watches for changes and rebuilds automatically):
48+
49+
```bash
50+
docker run --init --rm -it -v $(pwd):/docs -p 8000:8000 nav2_docs make autobuild
51+
```
52+
53+
Then browse to http://127.0.0.1:8000. Use Ctrl+C to stop (the `--init` flag enables proper signal handling).
54+
55+
### Using VS Code Dev Container
56+
57+
If you're using Visual Studio Code, you can use the dev container for an easy setup:
58+
59+
1. Install the [Dev Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers)
60+
2. Open this folder in VS Code
61+
3. When prompted, click "Reopen in Container" (or use Command Palette: "Dev Containers: Reopen in Container")
62+
4. Once the container is built and running, use the integrated terminal to build the docs
63+
64+
The dev container automatically sets up all dependencies. You can then use the build tasks or run commands directly:
65+
- Build once: `make html` or use the "Build" task (Ctrl+Shift+B)
66+
- Auto-rebuild: `make autobuild` or use the "Autobuild" task
67+
3368
### Build the Docs
69+
3470
Build the docs locally with `make html` and you'll find the built docs entry point in `_build/html/index.html`.
3571

3672
To automate the build process, you can use a [sphinx-autobuild](https://github.com/sphinx-doc/sphinx-autobuild) package. \

_themes/otc_tcs_sphinx_theme/layout.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,14 @@
2121
<script type="text/javascript" src="{{ pathto('_static/tcs_theme.js', 1) }}"></script>
2222
<script async defer src="https://buttons.github.io/buttons.js"></script>
2323

24+
<script>
25+
(function() {
26+
var banner = document.createElement('div');
27+
banner.innerHTML = '<span style="margin-right: 20px;"><strong>Partner with Nav2:</strong> sponsorship opportunities &amp; professional services available.</span><a href="https://opennav.org" target="_blank" rel="noopener" style="background: #343131; color: white; padding: 6px 17px; border-radius: 4px; text-decoration: none; font-weight: bold; font-size: 14px;">Learn More</a>';
28+
banner.style.cssText = 'background: #5DCCEE; color: #333; padding: 13px 26px; text-align: center; position: fixed; top: 0; left: 0; right: 0; z-index: 9999; font-size: 14px; box-shadow: 0 2px 4px rgba(0,0,0,0.1);';
29+
document.body.insertBefore(banner, document.body.firstChild);
30+
document.body.style.paddingTop = '60px';
31+
})();
32+
</script>
33+
2434
{% endblock %}
-70.8 KB
Loading
137 KB
Loading
72.5 KB
Loading

0 commit comments

Comments
 (0)