Skip to content

Commit c218b69

Browse files
committed
Backport changes to humble
2 parents 05aeace + ccb6453 commit c218b69

Some content is hidden

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

46 files changed

+907
-1297
lines changed

.clang-format

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,11 @@ AlignAfterOpenBracket: AlwaysBreak
1212
ConstructorInitializerIndentWidth: 0
1313
ContinuationIndentWidth: 2
1414
DerivePointerAlignment: false
15+
AllowAllParametersOfDeclarationOnNextLine: false
1516
PointerAlignment: Middle
1617
PackConstructorInitializers: Never
18+
BinPackArguments: false
19+
BinPackParameters: false
1720

1821
# Configure brace wrapping cases
1922
BreakBeforeBraces: Custom

.clang-tidy

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ Checks: >
1313
-google-readability-namespace-comments,
1414
-google-runtime-references,
1515
-misc-non-private-member-variables-in-classes,
16-
-modernize-return-braced-init-list,
17-
-modernize-use-trailing-return-type,
1816
-readability-braces-around-statements,
1917
-readability-identifier-length,
2018
-readability-magic-numbers,

.docker/Dockerfile renamed to .devcontainer/Dockerfile

Lines changed: 32 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -15,32 +15,17 @@ RUN apt-get -q update \
1515
git \
1616
sudo \
1717
clang \
18-
clang-format-14 \
19-
clang-tidy \
20-
clang-tools \
2118
python3-pip \
2219
python3-dev \
20+
python3-venv \
2321
apt-utils \
2422
software-properties-common \
2523
&& apt-get autoremove -y \
2624
&& apt-get clean -y \
2725
&& rm -rf /var/lib/apt/lists/*
2826

29-
# Install all ROS dependencies needed for CI
30-
RUN vcs import src < src/$PROJECT_NAME/ros2.repos \
31-
&& apt-get -q update \
32-
&& apt-get -q -y upgrade \
33-
&& rosdep update \
34-
&& rosdep install -y --from-paths src --ignore-src --rosdistro ${ROS_DISTRO} --as-root=apt:false \
35-
&& rm -rf src \
36-
&& apt-get autoremove -y \
37-
&& apt-get clean -y \
38-
&& rm -rf /var/lib/apt/lists/*
39-
40-
FROM ci as desktop
41-
42-
# Configure a new non-root user
43-
ARG USERNAME=ros
27+
# Configure the ubuntu non-root user
28+
ARG USERNAME=ubuntu
4429
ARG USER_UID=1000
4530
ARG USER_GID=$USER_UID
4631

@@ -51,50 +36,57 @@ RUN groupadd --gid $USER_GID $USERNAME \
5136
&& usermod -a -G dialout $USERNAME \
5237
&& echo "source /usr/share/bash-completion/completions/git" >> /home/$USERNAME/.bashrc
5338

54-
# Switch to the non-root user
39+
# Switch to the ubuntu user
5540
USER $USERNAME
5641
ENV USER=$USERNAME
5742

58-
ENV DEBIAN_FRONTEND=noninteractive
5943
ENV USER_WORKSPACE=/home/$USERNAME/ws_ros
6044
WORKDIR $USER_WORKSPACE
6145

6246
COPY --chown=$USER_UID:$USER_GID . src/$PROJECT_NAME
6347

48+
# Create a new virtual environment for Python
49+
ENV VIRTUAL_ENV=$USER_WORKSPACE/.venv/$PROJECT_NAME
50+
RUN python3 -m venv --system-site-packages $VIRTUAL_ENV \
51+
&& echo "source ${VIRTUAL_ENV}/bin/activate" >> /home/$USERNAME/.bashrc \
52+
&& touch .venv/COLCON_IGNORE \
53+
&& echo "\n# Ensure colcon is run in the venv\nalias colcon='python3 -m colcon'" >> /home/$USERNAME/.bashrc
54+
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
55+
6456
# Install all ROS dependencies
57+
RUN vcs import src < src/$PROJECT_NAME/ros2.repos
6558
WORKDIR $USER_WORKSPACE
66-
RUN vcs import src < src/$PROJECT_NAME/ros2.repos \
67-
&& sudo apt-get -q update \
59+
RUN sudo apt-get -q update \
6860
&& sudo apt-get -q -y upgrade \
6961
&& rosdep update \
70-
&& rosdep install -y --from-paths src --ignore-src -r --rosdistro ${ROS_DISTRO} \
62+
&& rosdep install -y --from-paths src --ignore-src --rosdistro ${ROS_DISTRO} \
7163
&& sudo apt-get autoremove -y \
7264
&& sudo apt-get clean -y \
7365
&& sudo rm -rf /var/lib/apt/lists/*
7466

7567
RUN . "/opt/ros/${ROS_DISTRO}/setup.sh" \
76-
&& colcon build \
77-
&& sudo sed -i "s#/opt/ros/\$ROS_DISTRO/setup.bash#$USER_WORKSPACE/setup.sh#g" /ros_entrypoint.sh \
78-
&& echo "source ${USER_WORKSPACE}/install/setup.bash" >> /home/$USERNAME/.bashrc \
68+
# && colcon build \
69+
# && echo "source ${USER_WORKSPACE}/install/setup.bash" >> /home/$USERNAME/.bashrc \
7970
&& echo "if [ -f /opt/ros/${ROS_DISTRO}/setup.bash ]; then source /opt/ros/${ROS_DISTRO}/setup.bash; fi" >> /home/$USERNAME/.bashrc
8071

81-
FROM desktop as desktop-nvidia
72+
WORKDIR $USER_WORKSPACE
73+
74+
# Install debugging/linting Python packages
75+
RUN pip install \
76+
pre-commit \
77+
mypy
8278

83-
# Install NVIDIA software
84-
RUN sudo apt-get update \
79+
# Install debugging/linting C++ packages
80+
RUN sudo apt-get -q update \
8581
&& sudo apt-get -q -y upgrade \
86-
&& sudo apt-get install -y -qq --no-install-recommends \
87-
libglvnd0 \
88-
libgl1 \
89-
libglx0 \
90-
libegl1 \
91-
libxext6 \
92-
libx11-6 \
82+
&& sudo apt-get install -y \
83+
clang-format-14 \
84+
clang-tidy \
85+
clang-tools \
9386
&& sudo apt-get autoremove -y \
9487
&& sudo apt-get clean -y \
9588
&& sudo rm -rf /var/lib/apt/lists/*
9689

97-
# Env vars for the nvidia-container-runtime.
98-
ENV NVIDIA_VISIBLE_DEVICES all
99-
ENV NVIDIA_DRIVER_CAPABILITIES graphics,utility,compute
100-
ENV QT_X11_NO_MITSHM 1
90+
# Disable the setuputils installation warning
91+
# This prevents us from needing to pin the setuputils version (which doesn't always work)
92+
ENV PYTHONWARNINGS="ignore"

.devcontainer/devcontainer.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"name": "ROS 2 Dev Container",
3+
"dockerFile": "Dockerfile",
4+
"context": "../",
5+
"workspaceMount": "source=${localWorkspaceFolder},target=/home/ubuntu/ws_ros/src/auv_controllers,type=bind",
6+
"workspaceFolder": "/home/ubuntu/ws_ros/src/auv_controllers",
7+
"remoteUser": "ubuntu",
8+
"customizations": {
9+
"vscode": {
10+
"extensions": [
11+
"ms-azuretools.vscode-docker",
12+
"ms-python.python",
13+
"njpwerner.autodocstring",
14+
"ms-vscode.cpptools",
15+
"redhat.vscode-xml",
16+
"redhat.vscode-yaml",
17+
"smilerobotics.urdf",
18+
"DavidAnson.vscode-markdownlint",
19+
"esbenp.prettier-vscode",
20+
"xaver.clang-format",
21+
"charliermarsh.ruff",
22+
"ms-vscode.cmake-tools"
23+
]
24+
}
25+
}
26+
}

.devcontainer/nouveau/Dockerfile

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

.devcontainer/nouveau/devcontainer.json

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

.devcontainer/nvidia/Dockerfile

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

.devcontainer/nvidia/devcontainer.json

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

.dockerignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
# ignore everything
2+
23
*
34

45
# Except the following
5-
!requirements-dev.txt
6+
67
!auv_controllers
78
!velocity_controllers
89
!thruster_allocation_matrix_controller
910
!thruster_controllers
1011
!auv_control_msgs
12+
!auv_control_demos
1113
!ros2.repos

.github/mergify.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
pull_request_rules:
2+
- name: backport to iron at reviewers' discretion
3+
conditions:
4+
- base=main
5+
- "label=backport-iron"
6+
actions:
7+
backport:
8+
branches:
9+
- iron
10+
11+
- name: backport to humble at reviewers' discretion
12+
conditions:
13+
- base=main
14+
- "label=backport-humble"
15+
actions:
16+
backport:
17+
branches:
18+
- humble
19+
20+
- name: backport to jazzy at reviewers' discretion
21+
conditions:
22+
- base=main
23+
- "label=backport-jazzy"
24+
actions:
25+
backport:
26+
branches:
27+
- jazzy
28+
29+
- name: ask to resolve conflict
30+
conditions:
31+
- conflict
32+
- author!=mergify[bot]
33+
actions:
34+
comment:
35+
message: This pull request is in conflict. Could you fix it @{{author}}?
36+
37+
- name: development targets main branch
38+
conditions:
39+
- base!=main
40+
- author!=mergify[bot]
41+
actions:
42+
comment:
43+
message: |
44+
Please target the `main` branch for development, we will backport the changes to {{base}} for you if approved and if they don't break API.

0 commit comments

Comments
 (0)