From de18a0c21438c50effc57fbd20e8efbe043619c1 Mon Sep 17 00:00:00 2001 From: Samuel Sadok Date: Wed, 18 Dec 2024 10:00:40 +0000 Subject: [PATCH 1/4] add .DS_Store to .gitignore --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index aceb76d..5ab9700 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,6 @@ # Python __pycache__/ + +# OS files +.DS_Store From 321e7716591203d48fd092e73ff2468159dfb438 Mon Sep 17 00:00:00 2001 From: Samuel Sadok Date: Wed, 18 Dec 2024 10:02:22 +0000 Subject: [PATCH 2/4] add vscode "clean" task --- .vscode/tasks.json | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 8e4aa8b..6d2c6a7 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -16,7 +16,16 @@ }, "problemMatcher": [ "$gcc" - ], + ] }, + { + "label": "clean", + "type": "shell", + "command": "rm -rd build install log", + "presentation": { + "clear": true + }, + "problemMatcher": [] + } ] } \ No newline at end of file From dc6f6c218e45ce09e2a65315440a83e363bdbe0b Mon Sep 17 00:00:00 2001 From: Samuel Sadok Date: Wed, 18 Dec 2024 09:59:03 +0000 Subject: [PATCH 3/4] add jazzy devcontainer --- .devcontainer/jazzy/Dockerfile | 26 ++++++++++++++++++++++++++ .devcontainer/jazzy/devcontainer.json | 19 +++++++++++++++++++ .github/workflows/ros-build-test.yaml | 5 +++-- 3 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 .devcontainer/jazzy/Dockerfile create mode 100644 .devcontainer/jazzy/devcontainer.json diff --git a/.devcontainer/jazzy/Dockerfile b/.devcontainer/jazzy/Dockerfile new file mode 100644 index 0000000..5b9963f --- /dev/null +++ b/.devcontainer/jazzy/Dockerfile @@ -0,0 +1,26 @@ +FROM ros:jazzy-ros-base + +# Add vscode user with same UID and GID as your host system +# (copied from https://code.visualstudio.com/remote/advancedcontainers/add-nonroot-user#_creating-a-nonroot-user) +ARG USERNAME=ubuntu +RUN apt-get update \ + && apt-get install -y sudo \ + && echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \ + && chmod 0440 /etc/sudoers.d/$USERNAME +# Switch from root to user +USER $USERNAME + +# Add user to video group to allow access to webcam +RUN sudo usermod --append --groups video $USERNAME + +# Update all packages +RUN sudo apt update && sudo apt upgrade -y + +# Install Git +RUN sudo apt install -y git + +# Rosdep update +RUN rosdep update + +# Source the ROS setup file +RUN echo "source /opt/ros/${ROS_DISTRO}/setup.bash" >> ~/.bashrc diff --git a/.devcontainer/jazzy/devcontainer.json b/.devcontainer/jazzy/devcontainer.json new file mode 100644 index 0000000..f701931 --- /dev/null +++ b/.devcontainer/jazzy/devcontainer.json @@ -0,0 +1,19 @@ +{ + "name": "jazzy", + "dockerFile": "Dockerfile", + "runArgs": [ + "--privileged", + "--network=host" + ], + "workspaceMount": "source=${localWorkspaceFolder},target=/${localWorkspaceFolderBasename},type=bind", + "workspaceFolder": "/${localWorkspaceFolderBasename}", + "mounts": [], + "customizations": { + "vscode": { + "extensions": [ + "ms-vscode.cpptools", + "eamodio.gitlens" + ] + } + } +} \ No newline at end of file diff --git a/.github/workflows/ros-build-test.yaml b/.github/workflows/ros-build-test.yaml index 4321d99..3d4ca12 100644 --- a/.github/workflows/ros-build-test.yaml +++ b/.github/workflows/ros-build-test.yaml @@ -12,7 +12,7 @@ jobs: strategy: fail-fast: false matrix: - ros-version: [humble, iron] + ros-version: [humble, iron, jazzy] steps: - name: Check out code @@ -40,7 +40,8 @@ jobs: - name: Adjust permissions run: | - docker run -v ${{ github.workspace }}:/workspace -w /workspace local:${{ matrix.ros-version }} sudo chown -R vscode:vscode /workspace + docker run -v ${{ github.workspace }}:/workspace -w /workspace local:${{ matrix.ros-version }} \ + sh -c 'username=$(id -un) && sudo chown -R "$username":"$username" /workspace' - name: Run colcon build run: | From 27b15cb05d8092b8319c39d104d53a318eaaf64d Mon Sep 17 00:00:00 2001 From: Samuel Sadok Date: Wed, 18 Dec 2024 11:49:13 +0100 Subject: [PATCH 4/4] fix rosdep install on iron --- .devcontainer/iron-remote/Dockerfile | 2 +- .devcontainer/iron/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.devcontainer/iron-remote/Dockerfile b/.devcontainer/iron-remote/Dockerfile index a9fff90..0600cf5 100644 --- a/.devcontainer/iron-remote/Dockerfile +++ b/.devcontainer/iron-remote/Dockerfile @@ -24,7 +24,7 @@ RUN sudo apt update && sudo apt upgrade -y RUN sudo apt install -y git # Rosdep update -RUN rosdep update +RUN rosdep update --include-eol-distros # Source the ROS setup file RUN echo "source /opt/ros/${ROS_DISTRO}/setup.bash" >> ~/.bashrc diff --git a/.devcontainer/iron/Dockerfile b/.devcontainer/iron/Dockerfile index a9fff90..0600cf5 100644 --- a/.devcontainer/iron/Dockerfile +++ b/.devcontainer/iron/Dockerfile @@ -24,7 +24,7 @@ RUN sudo apt update && sudo apt upgrade -y RUN sudo apt install -y git # Rosdep update -RUN rosdep update +RUN rosdep update --include-eol-distros # Source the ROS setup file RUN echo "source /opt/ros/${ROS_DISTRO}/setup.bash" >> ~/.bashrc