diff --git a/.devcontainer/nouveau/Dockerfile b/.devcontainer/nouveau/Dockerfile index 0a97311..c6d4dfa 100644 --- a/.devcontainer/nouveau/Dockerfile +++ b/.devcontainer/nouveau/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/robotic-decision-making-lab/ros2-template:jazzy-desktop +FROM ghcr.io/robotic-decision-making-lab/ros2-template:rolling-desktop # Install ROS dependencies # This is done in a previous stage, but we include it again here in case anyone wants to diff --git a/.devcontainer/nouveau/devcontainer.json b/.devcontainer/nouveau/devcontainer.json index aa27d10..7dd4f9f 100644 --- a/.devcontainer/nouveau/devcontainer.json +++ b/.devcontainer/nouveau/devcontainer.json @@ -34,7 +34,7 @@ "esbenp.prettier-vscode", "xaver.clang-format", "charliermarsh.ruff", - "jeff-hykin.better-cpp-syntax" + "ms-vscode.cmake-tools" ] } } diff --git a/.devcontainer/nvidia/Dockerfile b/.devcontainer/nvidia/Dockerfile index 594696e..022aac7 100644 --- a/.devcontainer/nvidia/Dockerfile +++ b/.devcontainer/nvidia/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/robotic-decision-making-lab/ros2-template:jazzy-desktop-nvidia +FROM ghcr.io/robotic-decision-making-lab/ros2-template:rolling-desktop-nvidia # Install ROS dependencies # This is done in a previous stage, but we include it again here in case anyone wants to diff --git a/.devcontainer/nvidia/devcontainer.json b/.devcontainer/nvidia/devcontainer.json index 067f409..8d8f111 100644 --- a/.devcontainer/nvidia/devcontainer.json +++ b/.devcontainer/nvidia/devcontainer.json @@ -38,8 +38,7 @@ "esbenp.prettier-vscode", "xaver.clang-format", "charliermarsh.ruff", - "ms-python.black-formatter", - "jeff-hykin.better-cpp-syntax" + "ms-vscode.cmake-tools" ] } } diff --git a/.docker/Dockerfile b/.docker/Dockerfile index 5b44cfb..a53a9b6 100644 --- a/.docker/Dockerfile +++ b/.docker/Dockerfile @@ -1,4 +1,4 @@ -ARG ROS_DISTRO=jazzy +ARG ROS_DISTRO=rolling FROM ros:$ROS_DISTRO-ros-base as ci ENV DEBIAN_FRONTEND=noninteractive @@ -62,7 +62,8 @@ COPY --chown=$USER_UID:$USER_GID . src/$PROJECT_NAME ENV VIRTUAL_ENV=$USER_WORKSPACE/.venv/$PROJECT_NAME RUN python3 -m venv --system-site-packages $VIRTUAL_ENV \ && echo "source ${VIRTUAL_ENV}/bin/activate" >> /home/$USERNAME/.bashrc \ - && touch .venv/COLCON_IGNORE + && touch .venv/COLCON_IGNORE \ + && echo "\n# Ensure colcon is run in the venv\nalias colcon='python3 -m colcon'" >> /home/$USERNAME/.bashrc ENV PATH="$VIRTUAL_ENV/bin:$PATH" # Uncomment to download and install external repos used by the project @@ -115,6 +116,6 @@ RUN sudo apt-get update \ && sudo rm -rf /var/lib/apt/lists/* # Env vars for the nvidia-container-runtime. -ENV NVIDIA_VISIBLE_DEVICES all -ENV NVIDIA_DRIVER_CAPABILITIES graphics,utility,compute -ENV QT_X11_NO_MITSHM 1 +ENV NVIDIA_VISIBLE_DEVICES=all +ENV NVIDIA_DRIVER_CAPABILITIES=graphics,utility,compute +ENV QT_X11_NO_MITSHM=1 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6b93bac..df467d5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,8 +19,8 @@ jobs: fail-fast: false matrix: env: - - IMAGE: jazzy-ci - ROS_DISTRO: jazzy + - IMAGE: rolling-ci + ROS_DISTRO: rolling steps: - name: Checkout repository uses: actions/checkout@v4 diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 3b0fe29..75bdef2 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -18,7 +18,7 @@ jobs: strategy: fail-fast: false matrix: - ROS_DISTRO: [jazzy] + ROS_DISTRO: [rolling] runs-on: ubuntu-latest permissions: packages: write @@ -59,7 +59,7 @@ jobs: strategy: fail-fast: false matrix: - ROS_DISTRO: [jazzy] + ROS_DISTRO: [rolling] runs-on: ubuntu-latest permissions: packages: write @@ -107,7 +107,7 @@ jobs: strategy: fail-fast: false matrix: - ROS_DISTRO: [jazzy] + ROS_DISTRO: [rolling] runs-on: ubuntu-latest permissions: packages: write @@ -148,7 +148,7 @@ jobs: strategy: fail-fast: false matrix: - ROS_DISTRO: [jazzy] + ROS_DISTRO: [rolling] runs-on: ubuntu-latest permissions: packages: write diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9d35030..78b2ef4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -10,15 +10,16 @@ repos: hooks: - id: codespell - - repo: local + - repo: https://github.com/pre-commit/mirrors-clang-format + rev: v18.1.8 hooks: - - id: clang-format - name: clang-format - description: Format files with ClangFormat. - entry: clang-format-18 - language: system - files: \.(c|cc|cxx|cpp|frag|glsl|h|hpp|hxx|ih|ispc|ipp|java|js|m|proto|vert)$ - args: ['-fallback-style=Google', '-i'] + - id: clang-format + types_or: [c++, c] + + - repo: https://github.com/BlankSpruce/gersemi + rev: 0.13.5 + hooks: + - id: gersemi - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.4.0 diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json index a3e78c7..c218c43 100644 --- a/.vscode/c_cpp_properties.json +++ b/.vscode/c_cpp_properties.json @@ -4,7 +4,7 @@ "name": "Linux", "includePath": [ "${workspaceFolder}/**", - "/opt/ros/jazzy/include/**", + "/opt/ros/rolling/include/**", "/usr/include/gz/**" ], "defines": [], diff --git a/.vscode/settings.json b/.vscode/settings.json index a96abea..544998b 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -23,13 +23,13 @@ "autoDocstring.startOnNewLine": false, "autoDocstring.docstringFormat": "google-notypes", "python.autoComplete.extraPaths": [ - "/opt/ros/jazzy/lib/python3.12/site-packages/", - "/opt/ros/jazzy/local/lib/python3.12/dist-packages/", + "/opt/ros/rolling/lib/python3.12/site-packages/", + "/opt/ros/rolling/local/lib/python3.12/dist-packages/", "${workspaceFolder}/install/" ], "python.analysis.extraPaths": [ - "/opt/ros/jazzy/lib/python3.12/site-packages/", - "/opt/ros/jazzy/local/lib/python3.12/dist-packages/", + "/opt/ros/rolling/lib/python3.12/site-packages/", + "/opt/ros/rolling/local/lib/python3.12/dist-packages/", "${workspaceFolder}/install/" ], "C_Cpp.default.intelliSenseMode": "linux-gcc-x86", @@ -37,6 +37,8 @@ "C_Cpp.codeAnalysis.clangTidy.enabled": true, "C_Cpp.codeAnalysis.clangTidy.codeAction.formatFixes": true, "clang-format.executable": "/usr/bin/clang-format-18", + "xml.format.maxLineWidth": 120, + "xml.format.splitAttributes": "alignWithFirstAttr", "[cpp]": { "editor.rulers": [120], "editor.tabSize": 2, @@ -73,5 +75,6 @@ "**/build": true, "**/install": true, "**/log": true - } + }, + "cmake.ignoreCMakeListsMissing": true } diff --git a/example_pkg/CMakeLists.txt b/example_pkg/CMakeLists.txt index e0393a8..46ab994 100644 --- a/example_pkg/CMakeLists.txt +++ b/example_pkg/CMakeLists.txt @@ -1,12 +1,10 @@ cmake_minimum_required(VERSION 3.8) project(example_pkg) -set(THIS_PACKAGE_INCLUDE_DEPENDS - ament_cmake -) +set(THIS_PACKAGE_INCLUDE_DEPENDS ament_cmake) foreach(Dependency IN ITEMS ${THIS_PACKAGE_INCLUDE_DEPENDS}) - find_package(${Dependency} REQUIRED) + find_package(${Dependency} REQUIRED) endforeach() ament_package()