Skip to content

Commit

Permalink
Merge branch 'odriverobotics:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
marj3220 authored Dec 18, 2024
2 parents 36c3101 + 17acfda commit 33c3db9
Show file tree
Hide file tree
Showing 7 changed files with 63 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/iron-remote/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion .devcontainer/iron/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
26 changes: 26 additions & 0 deletions .devcontainer/jazzy/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
19 changes: 19 additions & 0 deletions .devcontainer/jazzy/devcontainer.json
Original file line number Diff line number Diff line change
@@ -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"
]
}
}
}
5 changes: 3 additions & 2 deletions .github/workflows/ros-build-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ros-version: [humble, iron]
ros-version: [humble, iron, jazzy]

steps:
- name: Check out code
Expand Down Expand Up @@ -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: |
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@

# Python
__pycache__/

# OS files
.DS_Store
11 changes: 10 additions & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,16 @@
},
"problemMatcher": [
"$gcc"
],
]
},
{
"label": "clean",
"type": "shell",
"command": "rm -rd build install log",
"presentation": {
"clear": true
},
"problemMatcher": []
}
]
}

0 comments on commit 33c3db9

Please sign in to comment.