Skip to content

Commit

Permalink
created ros2 jazzy branch
Browse files Browse the repository at this point in the history
  • Loading branch information
rakeshv24 committed Oct 25, 2024
1 parent 2dd3bfa commit cf5280c
Show file tree
Hide file tree
Showing 85 changed files with 389 additions and 6,508 deletions.
2 changes: 1 addition & 1 deletion .clang-format
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
Language: Cpp
BasedOnStyle: Google
ColumnLimit: 100
ColumnLimit: 120
MaxEmptyLinesToKeep: 1

IndentWidth: 2
Expand Down
73 changes: 30 additions & 43 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -25,56 +25,43 @@ Checks: >
-bugprone-easily-swappable-parameters,
-bugprone-implicit-widening-of-multiplication-result,
-clang-diagnostic-error,
-bugprone-exception-escape
-bugprone-exception-escape,
-misc-include-cleaner,
-bugprone-reserved-identifier
WarningsAsErrors: "*"
CheckOptions:
- key: readability-braces-around-statements.ShortStatementLines
value: "2"
- key: readability-identifier-naming.NamespaceCase
value: lower_case
- key: readability-identifier-naming.ClassCase
# type names
- key: readability-identifier-naming.ClassCase
value: CamelCase
- key: readability-identifier-naming.StructCase
- key: readability-identifier-naming.StructCase
value: CamelCase
- key: readability-identifier-naming.TemplateParameterCase,
value: CamelCase,
- key: readability-identifier-naming.FunctionCase
value: camelBack
- key: readability-identifier-naming.MethodCase
value: camelBack
- key: readability-identifier-naming.VariableCase
value: lower_case
- key: readability-identifier-naming.ClassMemberCase
value: lower_case
- key: readability-identifier-naming.ClassMemberSuffix
value: _
- key: readability-identifier-naming.PrivateMemberSuffix
value: _
- key: readability-identifier-naming.ProtectedMemberSuffix
value: _
- key: readability-identifier-naming.EnumConstantCase
value: CamelCase
- key: readability-identifier-naming.EnumConstantPrefix
value: k
- key: readability-identifier-naming.ConstexprVariableCase
value: CamelCase
- key: readability-identifier-naming.ConstexprVariablePrefix
value: k
- key: readability-identifier-naming.GlobalConstantCase
- key: readability-identifier-naming.EnumCase
value: CamelCase
- key: readability-identifier-naming.GlobalConstantPrefix
value: k
- key: readability-identifier-naming.MemberConstantCase
- key: readability-identifier-naming.UnionCase
value: CamelCase
- key: readability-identifier-naming.MemberConstantPrefix
value: k
- key: readability-identifier-naming.StaticConstantCase
value: CamelCase
- key: readability-identifier-naming.StaticConstantPrefix
value: k
- key: readability-implicit-bool-conversion.AllowIntegerConditions
value: 1
- key: readability-implicit-bool-conversion.AllowPointerConditions
value: 1
- key: readability-function-cognitive-complexity.IgnoreMacros
value: 1
# function names
- key: readability-identifier-naming.FunctionCase
value: lower_case
# method names
- key: readability-identifier-naming.MethodCase
value: lower_case
# variable names
- key: readability-identifier-naming.VariableCase
value: lower_case
- key: readability-identifier-naming.PrivateMemberSuffix
value: "_"
- key: readability-identifier-naming.ProtectedMemberSuffix
value: "_"
# const, static, or global variables
- key: readability-identifier-naming.EnumConstantCase
value: UPPER_CASE
- key: readability-identifier-naming.StaticConstantCase
value: UPPER_CASE
- key: readability-identifier-naming.GlobalConstantCase
value: UPPER_CASE
- key: readability-identifier-naming.ClassConstantCase
value: UPPER_CASE
4 changes: 4 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[codespell]
# Uncomment and populate the following so that codespell ignores the specified words/files
# skip =
# ignore-words-list =
13 changes: 3 additions & 10 deletions .devcontainer/nouveau/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,29 +1,22 @@
FROM ghcr.io/robotic-decision-making-lab/underwater_docking:noetic-desktop
FROM ghcr.io/robotic-decision-making-lab/underwater_docking:jazzy-desktop

# Install ROS dependencies
# This is done in a previous stage, but we include it again here in case anyone wants to
# add new dependencies during development
ENV USERNAME=ros
ENV USERNAME=ubuntu
ENV USER_WORKSPACE=/home/$USERNAME/ws_dock
WORKDIR $USER_WORKSPACE

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

RUN ls src/$PROJECT_NAME

RUN sudo apt-get -q update \
&& sudo apt-get -q -y upgrade \
&& rosdep update \
&& rosdep install -y --from-paths . --ignore-src -r --rosdistro ${ROS_DISTRO} \
&& rosdep install -y --from-paths src --ignore-src --rosdistro ${ROS_DISTRO} --skip-keys="gz-transport12 gz-sim7 gz-math7 gz-msgs9 gz-plugin2" \
&& sudo apt-get autoremove -y \
&& sudo apt-get clean -y \
&& sudo rm -rf /var/lib/apt/lists/*

# Install debugging/linting Python packages
COPY --chown=$USER_UID:$USER_GID requirements-dev.txt .
RUN python3 -m pip install -r requirements-dev.txt \
&& rm -rf requirements-dev.txt

# Disable the setuputils installation warning
# This prevents us from needing to pin the setuputils version (which doesn't always work)
ENV PYTHONWARNINGS="ignore"
17 changes: 10 additions & 7 deletions .devcontainer/nouveau/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"name": "nouveau",
"dockerFile": "Dockerfile",
"context": "../..",
"workspaceMount": "source=${localWorkspaceFolder},target=/home/ros/ws_dock/src/underwater_docking,type=bind",
"workspaceFolder": "/home/ros/ws_dock/src/underwater_docking",
"remoteUser": "ros",
"workspaceMount": "source=${localWorkspaceFolder},target=/home/ubuntu/ws_dock/src/underwater_docking,type=bind",
"workspaceFolder": "/home/ubuntu/ws_dock/src/underwater_docking",
"remoteUser": "ubuntu",
"runArgs": [
"--network=host",
"--cap-add=SYS_PTRACE",
Expand All @@ -22,19 +22,22 @@
},
"customizations": {
"vscode": {
"settings": {
"python.defaultInterpreterPath": "/home/ubuntu/.venv/underwater_docking/bin/python",
"python.autoComplete.extraPaths": ["${workspaceFolder}/install/"],
"python.analysis.extraPaths": ["${workspaceFolder}/install/"]
},
"extensions": [
"ms-azuretools.vscode-docker",
"ms-python.python",
"njpwerner.autodocstring",
"ms-vscode.cpptools",
"redhat.vscode-xml",
"redhat.vscode-yaml",
"smilerobotics.urdf",
"DavidAnson.vscode-markdownlint",
"esbenp.prettier-vscode",
"xaver.clang-format",
"charliermarsh.ruff",
"ms-python.black-formatter"
"josetr.cmake-language-support-vscode",
"unifiedjs.vscode-mdx"
]
}
}
Expand Down
11 changes: 2 additions & 9 deletions .devcontainer/nvidia/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,14 @@ WORKDIR $USER_WORKSPACE

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

RUN ls src/$PROJECT_NAME

RUN sudo apt-get -q update \
&& sudo apt-get -q -y upgrade \
&& rosdep update \
&& rosdep install -y --from-paths . --ignore-src -r --rosdistro ${ROS_DISTRO} \
&& rosdep install -y --from-paths src --ignore-src --rosdistro ${ROS_DISTRO} --skip-keys="gz-transport12 gz-sim7 gz-math7 gz-msgs9 gz-plugin2" \
&& sudo apt-get autoremove -y \
&& sudo apt-get clean -y \
&& sudo rm -rf /var/lib/apt/lists/*

# Install debugging/linting Python packages
COPY --chown=$USER_UID:$USER_GID requirements-dev.txt .
RUN python3 -m pip install -r requirements-dev.txt \
&& rm -rf requirements-dev.txt


# Disable the setuputils installation warning
# This prevents us from needing to pin the setuputils version (which doesn't always work)
ENV PYTHONWARNINGS="ignore"
17 changes: 10 additions & 7 deletions .devcontainer/nvidia/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"name": "nvidia",
"dockerFile": "Dockerfile",
"context": "../..",
"workspaceMount": "source=${localWorkspaceFolder},target=/home/ros/ws_dock/src/underwater_docking,type=bind",
"workspaceFolder": "/home/ros/ws_dock/src/underwater_docking",
"remoteUser": "ros",
"workspaceMount": "source=${localWorkspaceFolder},target=/home/ubuntu/ws_dock/src/underwater_docking,type=bind",
"workspaceFolder": "/home/ubuntu/ws_dock/src/underwater_docking",
"remoteUser": "ubuntu",
"runArgs": [
"--network=host",
"--cap-add=SYS_PTRACE",
Expand All @@ -26,19 +26,22 @@
},
"customizations": {
"vscode": {
"settings": {
"python.defaultInterpreterPath": "/home/ubuntu/.venv/underwater_docking/bin/python",
"python.autoComplete.extraPaths": ["${workspaceFolder}/install/"],
"python.analysis.extraPaths": ["${workspaceFolder}/install/"]
},
"extensions": [
"ms-azuretools.vscode-docker",
"ms-python.python",
"njpwerner.autodocstring",
"ms-vscode.cpptools",
"redhat.vscode-xml",
"redhat.vscode-yaml",
"smilerobotics.urdf",
"DavidAnson.vscode-markdownlint",
"esbenp.prettier-vscode",
"xaver.clang-format",
"charliermarsh.ruff",
"ms-python.black-formatter"
"josetr.cmake-language-support-vscode",
"unifiedjs.vscode-mdx"
]
}
}
Expand Down
26 changes: 26 additions & 0 deletions .devcontainer/robot/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#
# Dockerfile for *-robot development container
#
ARG UNDERWATER_DOCKING_GITHUB_REPO=Robotic-Decision-Making-Lab/underwater_docking
ARG ROS_DISTRO=rolling
FROM ${UNDERWATER_DOCKING_GITHUB_REPO}:${ROS_DISTRO}-robot

# Install ROS dependencies
# This is done in a previous stage, but we include it again here in case anyone wants to
# add new dependencies during development
ENV USERNAME=ubuntu
ENV USER_WORKSPACE=/home/$USERNAME/ws_dock
WORKDIR $USER_WORKSPACE

COPY --chown=$USER_UID:$USER_GID . src/underwater_docking
RUN sudo apt-get -q update \
&& sudo apt-get -q -y upgrade \
&& rosdep update \
&& rosdep install -y --from-paths src --ignore-src --rosdistro ${ROS_DISTRO} --skip-keys="gz-transport12 gz-sim7 gz-math7 gz-msgs9 gz-plugin2" \
&& sudo apt-get autoremove -y \
&& sudo apt-get clean -y \
&& sudo rm -rf /var/lib/apt/lists/*

# Disable the setuputils installation warning
# This prevents us from needing to pin the setuputils version (which doesn't always work)
ENV PYTHONWARNINGS="ignore"
45 changes: 45 additions & 0 deletions .devcontainer/robot/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"name": "Robot Dev Container",
"build": {
"dockerfile": "Dockerfile",
"context": "../..",
"args": {
"UNDERWATER_DOCKING_GITHUB_REPO": "ghcr.io/robotic-decision-making-lab/underwater_docking",
"ROS_DISTRO": "rolling"
}
},
"workspaceMount": "source=${localWorkspaceFolder},target=/home/ubuntu/ws_dock/src/underwater_docking,type=bind",
"workspaceFolder": "/home/ubuntu/ws_dock/src/underwater_docking",
"remoteUser": "ubuntu",
"runArgs": [
"--network=host",
"--cap-add=SYS_PTRACE",
"--security-opt=seccomp:unconfined",
"--security-opt=apparmor:unconfined",
"--volume=/dev:/dev",
"--privileged",
"--volume=/run/user/1000:/run/user/1000"
],
"containerEnv": {},
"customizations": {
"vscode": {
"settings": {
"python.defaultInterpreterPath": "/home/ubuntu/.venv/underwater_docking/bin/python",
"python.autoComplete.extraPaths": ["${workspaceFolder}/install/"],
"python.analysis.extraPaths": ["${workspaceFolder}/install/"]
},
"extensions": [
"ms-azuretools.vscode-docker",
"ms-python.python",
"njpwerner.autodocstring",
"redhat.vscode-xml",
"redhat.vscode-yaml",
"smilerobotics.urdf",
"esbenp.prettier-vscode",
"charliermarsh.ruff",
"josetr.cmake-language-support-vscode",
"unifiedjs.vscode-mdx"
]
}
}
}
Loading

0 comments on commit cf5280c

Please sign in to comment.