Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate ros2_control and add user documentation (backport #162) #163

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 0 additions & 27 deletions .clang-format

This file was deleted.

80 changes: 0 additions & 80 deletions .clang-tidy

This file was deleted.

3 changes: 3 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[codespell]
skip = *.json
ignore-words-list = parm,ned,sitl
12 changes: 12 additions & 0 deletions .devcontainer/documentation/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM node:20

RUN apt-get -q update \
&& apt-get -q -y upgrade \
&& apt-get install sudo \
&& apt-get autoremove -y \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*

ARG USERNAME=node
RUN echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
&& chmod 0440 /etc/sudoers.d/$USERNAME
22 changes: 22 additions & 0 deletions .devcontainer/documentation/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "Documentation",
"build": {
"dockerfile": "Dockerfile"
},
"remoteUser": "node",
"customizations": {
"vscode": {
"settings": {
"files.insertFinalNewline": true,
"files.trimTrailingWhitespace": true,
"editor.formatOnSave": true,
"editor.tabSize": 2,
"editor.rulers": [80]
},
"extensions": [
"esbenp.prettier-vscode",
"unifiedjs.vscode-mdx"
]
}
}
}
6 changes: 3 additions & 3 deletions .devcontainer/nouveau/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ RUN sudo apt-get -q update \
&& 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
RUN python3 -m pip install \
pre-commit \
mypy

# Disable the setuputils installation warning
# This prevents us from needing to pin the setuputils version (which doesn't always work)
Expand Down
16 changes: 7 additions & 9 deletions .devcontainer/nouveau/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "Blue Nouveau Dev Container",
"name": "Nouveau Dev Container",
"dockerFile": "Dockerfile",
"context": "../..",
"workspaceMount": "source=${localWorkspaceFolder},target=/home/blue/ws_blue/src/blue,type=bind",
Expand All @@ -22,6 +22,7 @@
},
"customizations": {
"vscode": {
<<<<<<< HEAD
"settings": {
"files.associations": {
"*.repos": "yaml",
Expand Down Expand Up @@ -92,22 +93,19 @@
"**/log": true
}
},
=======
>>>>>>> 3709432 (Integrate ros2_control and add user documentation (#162))
"extensions": [
"ms-azuretools.vscode-docker",
"ms-python.python",
"njpwerner.autodocstring",
"cschlosser.doxdocgen",
"ms-vscode.cpptools",
"redhat.vscode-xml",
"redhat.vscode-yaml",
"josetr.cmake-language-support-vscode",
"smilerobotics.urdf",
"DavidAnson.vscode-markdownlint",
"esbenp.prettier-vscode",
"xaver.clang-format",
"ms-python.isort",
"ms-python.flake8",
"ms-python.black-formatter"
"charliermarsh.ruff",
"josetr.cmake-language-support-vscode",
"unifiedjs.vscode-mdx"
]
}
}
Expand Down
6 changes: 3 additions & 3 deletions .devcontainer/nvidia/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ RUN sudo apt-get -q update \
&& 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
RUN python3 -m pip install \
pre-commit \
mypy

# Disable the setuputils installation warning
# This prevents us from needing to pin the setuputils version (which doesn't always work)
Expand Down
16 changes: 7 additions & 9 deletions .devcontainer/nvidia/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "Blue NVIDIA Dev Container",
"name": "NVIDIA Dev Container",
"dockerFile": "Dockerfile",
"context": "../..",
"workspaceMount": "source=${localWorkspaceFolder},target=/home/blue/ws_blue/src/blue,type=bind",
Expand All @@ -26,6 +26,7 @@
},
"customizations": {
"vscode": {
<<<<<<< HEAD
"settings": {
"files.associations": {
"*.repos": "yaml",
Expand Down Expand Up @@ -98,22 +99,19 @@
"**/log": true
}
},
=======
>>>>>>> 3709432 (Integrate ros2_control and add user documentation (#162))
"extensions": [
"ms-azuretools.vscode-docker",
"ms-python.python",
"njpwerner.autodocstring",
"cschlosser.doxdocgen",
"ms-vscode.cpptools",
"redhat.vscode-xml",
"redhat.vscode-yaml",
"josetr.cmake-language-support-vscode",
"smilerobotics.urdf",
"DavidAnson.vscode-markdownlint",
"esbenp.prettier-vscode",
"xaver.clang-format",
"ms-python.isort",
"ms-python.flake8",
"ms-python.black-formatter"
"charliermarsh.ruff",
"josetr.cmake-language-support-vscode",
"unifiedjs.vscode-mdx"
]
}
}
Expand Down
28 changes: 8 additions & 20 deletions .docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ RUN apt-get -q update \
clang-tools \
python3-pip \
python3-dev \
lsb-release \
wget \
gnupg \
software-properties-common \
&& apt-get autoremove -y \
&& apt-get clean -y \
Expand Down Expand Up @@ -49,29 +52,16 @@ RUN groupadd --gid $USER_GID $USERNAME \

ENV DEBIAN_FRONTEND=noninteractive

# Switch to the non-root user for the rest of the installation.
# We do this to avoid any conflicts with user permissions
# Switch to the non-root user for the rest of the installation
USER $USERNAME
ENV USER=$USERNAME

# Install some core apt packages
RUN sudo apt-get -q update \
&& sudo apt-get -q -y upgrade \
&& sudo apt-get -q install --no-install-recommends -y \
lsb-release \
wget \
gnupg \
&& sudo apt-get autoremove -y \
&& sudo apt-get clean -y \
&& sudo rm -rf /var/lib/apt/lists/*

# Install MAVROS dependencies
WORKDIR /home/$USERNAME
RUN wget https://raw.githubusercontent.com/mavlink/mavros/ros2/mavros/scripts/install_geographiclib_datasets.sh \
&& chmod +x install_geographiclib_datasets.sh \
&& sudo ./install_geographiclib_datasets.sh

# Copy the project over to the image
ENV USER_WORKSPACE=/home/$USERNAME/ws_blue
WORKDIR $USER_WORKSPACE
COPY --chown=$USER_UID:$USER_GID . src/blue
Expand All @@ -95,7 +85,6 @@ RUN sudo apt-get -q update \
&& sudo apt-get clean -y \
&& sudo rm -rf /var/lib/apt/lists/*

# Install all ROS dependencies
RUN sudo apt-get -q update \
&& sudo apt-get -q -y upgrade \
&& rosdep update \
Expand All @@ -104,9 +93,8 @@ RUN sudo apt-get -q update \
&& sudo apt-get clean -y \
&& sudo rm -rf /var/lib/apt/lists/*

# Setup the environment variables
RUN echo "source ${USER_WORKSPACE}/install/setup.bash" >> /home/$USERNAME/.bashrc \
&& echo "source /opt/ros/${ROS_DISTRO}/setup.bash" >> /home/$USERNAME/.bashr
&& echo "source /opt/ros/${ROS_DISTRO}/setup.bash" >> /home/$USERNAME/.bashrc

FROM robot as desktop

Expand All @@ -116,7 +104,7 @@ ENV GZ_VERSION=garden
# Install Gazebo Garden: https://gazebosim.org/docs/garden/install_ubuntu
RUN sudo wget https://packages.osrfoundation.org/gazebo.gpg -O /usr/share/keyrings/pkgs-osrf-archive-keyring.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/pkgs-osrf-archive-keyring.gpg] http://packages.osrfoundation.org/gazebo/ubuntu-stable $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/gazebo-stable.list > /dev/null \
&& sudo apt-get update \
&& sudo apt-get -q update \
&& sudo apt-get -y --quiet --no-install-recommends install \
gz-garden \
&& sudo apt-get autoremove -y \
Expand Down Expand Up @@ -163,13 +151,13 @@ RUN [ "/bin/bash" , "-c" , " \
&& cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo \
&& make -j4" ]

# Install Gazebo
# Install ros_gz and other project dependencies
WORKDIR $USER_WORKSPACE
RUN sudo apt-get -q update \
&& sudo apt-get -q -y upgrade \
&& vcs import src < src/blue/blue.repos \
&& 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" \
&& rosdep install -y --from-paths src --ignore-src --rosdistro ${ROS_DISTRO} \
&& sudo apt-get autoremove -y \
&& sudo apt-get clean -y \
&& sudo rm -rf /var/lib/apt/lists/*
Expand Down
7 changes: 1 addition & 6 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,10 @@
*

# Except the following
!blue_dynamics
!blue_manager
!blue_control
!blue_bringup
!blue_localization
!blue_utils
!blue_joy
!blue_description
!blue_demos
!blue.repos
!.docker/entrypoints
!requirements-build.txt
!requirements-dev.txt
9 changes: 0 additions & 9 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
# Checklist

- [ ] I have performed a thorough review of my code
- [ ] I have sufficiently commented my code
- [ ] The implementation follows the project style conventions
- [ ] All project unit tests are passing
- [ ] If relevant, documentation has been provided or updated to discuss the changes made
- [ ] System integration tests were performed successfully

## Changes Made

Please provide a description of all changes made in this PR and why the changes
Expand Down
Loading
Loading