-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/uwrobotics/uwrt_mars_rover …
…into user/meshvad/cartesian-arm-controller
- Loading branch information
Showing
38 changed files
with
1,202 additions
and
692 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the | ||
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-dockerfile | ||
{ | ||
"name": "Existing Dockerfile", | ||
"build": { | ||
// Sets the run context to one level up instead of the .devcontainer folder. | ||
"context": "..", | ||
// Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename. | ||
"dockerfile": "../Dockerfile.dev" | ||
}, | ||
"containerEnv": { "DISPLAY": "host.docker.internal:0.0" } | ||
|
||
// Features to add to the dev container. More info: https://containers.dev/features. | ||
// "features": {}, | ||
|
||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
// "forwardPorts": [], | ||
|
||
// Uncomment the next line to run commands after the container is created. | ||
// "postCreateCommand": "cat /etc/os-release", | ||
|
||
// Configure tool-specific properties. | ||
// "customizations": {}, | ||
|
||
// Uncomment to connect as an existing user other than the container default. More info: https://aka.ms/dev-containers-non-root. | ||
// "remoteUser": "devcontainer" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[flake8] | ||
max-line-length = 120 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<!-- | ||
Please be sure to link the relevant issues in your Pull Request | ||
--> | ||
|
||
# Pull Request | ||
|
||
<!-- Provide more details below this comment. Include details on new launch files, nodes, etc --> | ||
|
||
<!-- Also include details on your testing procedure --> | ||
|
||
## Contribution Checklist | ||
|
||
<!-- Put an 'x' in the boxes that apply. --> | ||
|
||
- [ ] I have linked all the relevant issues | ||
|
||
## Change Checklist | ||
|
||
<!-- Put an 'x' in the boxes that apply. --> | ||
|
||
- [ ] I have tested my changes. | ||
- [ ] I have added new packages to the `PACKAGES_TO_TEST` variable in `ci.yaml`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
# the "if" flag with event.json is for running the workflow locally with `act`. | ||
name: CI | ||
|
||
on: | ||
|
@@ -10,14 +11,20 @@ on: | |
- cron: '0 0 * * *' | ||
|
||
env: | ||
PACKAGES_TO_TEST: # This limits the packages that are checked in CI. This is to avoid testing upstream packages passed in via .repos files. | ||
uwrt_mars_rover | ||
uwrt_mars_rover_drivetrain | ||
uwrt_mars_rover_drivetrain_description | ||
uwrt_mars_rover_drivetrain_hw | ||
uwrt_mars_rover_arm_urdf | ||
uwrt_mars_rover_arm_urdf_moveit | ||
ROS_DISTRO: galactic | ||
PACKAGES_TO_TEST: "uwrt_mars_rover uwrt_mars_rover_arm_urdf uwrt_mars_rover_arm_urdf_moveit" | ||
|
||
|
||
IMAGE: "rostooling/setup-ros-docker:ubuntu-focal-ros-galactic-desktop-latest" | ||
|
||
jobs: | ||
prepare-actions-environment: | ||
if: ${{ !github.event.act }} | ||
|
||
# workaround to use variable for IMAGE. Based off of: https://github.community/t/how-to-use-env-with-container-image/17252/25 | ||
runs-on: ubuntu-latest | ||
outputs: | ||
|
@@ -27,6 +34,7 @@ jobs: | |
run: echo "::set-output name=image::${{ env.IMAGE }}" | ||
|
||
linters: | ||
if: ${{ !github.event.act }} | ||
name: ament-${{ matrix.linter }} | ||
needs: prepare-actions-environment | ||
runs-on: ubuntu-latest | ||
|
@@ -40,24 +48,66 @@ jobs: | |
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
|
||
uses: actions/checkout@v3 | ||
- name: ROS2 Linter - [ament-${{ matrix.linter }}] | ||
uses: ros-tooling/action-ros-lint@master | ||
with: | ||
distribution: rolling | ||
distribution: ${{ env.ROS_DISTRO }} | ||
linter: ${{ matrix.linter }} | ||
package-name: ${{ env.PACKAGES_TO_TEST }} | ||
|
||
linters-clang-format: | ||
if: ${{ !github.event.act }} | ||
name: ament-clang-format | ||
needs: prepare-actions-environment | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ${{ needs.prepare-actions-environment.outputs.image }} | ||
options: -u root | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
|
||
linux-amd64-build-and-test: | ||
- name: ROS2 Linter - [ament-clang-format] | ||
uses: ros-tooling/action-ros-lint@master | ||
with: | ||
distribution: ${{ env.ROS_DISTRO }} | ||
linter: clang-format | ||
arguments: "--config .clang-format" | ||
package-name: ${{ env.PACKAGES_TO_TEST }} | ||
|
||
linters-flake8: | ||
if: ${{ !github.event.act }} | ||
name: ament-flake8 | ||
needs: prepare-actions-environment | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ${{ needs.prepare-actions-environment.outputs.image }} | ||
options: -u root | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: ROS2 Linter - [ament-flake8] | ||
uses: ros-tooling/action-ros-lint@master | ||
with: | ||
distribution: ${{ env.ROS_DISTRO }} | ||
linter: flake8 | ||
arguments: "--config .flake8" | ||
package-name: ${{ env.PACKAGES_TO_TEST }} | ||
|
||
linux-amd64-build-and-test: | ||
needs: prepare-actions-environment | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ${{ needs.prepare-actions-environment.outputs.image }} | ||
|
||
|
||
steps: | ||
|
||
- name: Build ROS2 Packages and Run Tests | ||
uses: ros-tooling/[email protected] | ||
with: | ||
|
@@ -69,7 +119,8 @@ jobs: | |
} | ||
colcon-mixin-repository: https://raw.githubusercontent.com/colcon/colcon-mixin-repository/3e627e0fa30db85aea05a50e2c61a9832664d236/index.yaml | ||
target-ros2-distro: ${{ env.ROS_DISTRO }} | ||
vcs-repo-file-url: https://raw.githubusercontent.com/${{ github.repository }}/${{ github.sha }}/common_upstream_dependencies.repos | ||
vcs-repo-file-url: | | ||
https://raw.githubusercontent.com/${{ github.repository }}/${{ github.sha }}/common_upstream_dependencies.repos | ||
package-name: ${{ env.PACKAGES_TO_TEST }} | ||
|
||
linux-arm64-build-and-test: | ||
|
@@ -81,11 +132,11 @@ jobs: | |
# Possibly resolveable with https://github.com/actions/runner/issues/320 | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Docker/QEMU dependencies | ||
id: qemu | ||
uses: docker/setup-qemu-action@v1 | ||
uses: docker/setup-qemu-action@v2 | ||
with: | ||
image: tonistiigi/binfmt:latest | ||
platforms: arm64 | ||
|
@@ -98,9 +149,11 @@ jobs: | |
run: | | ||
docker run --name arm64-ros --mount type=bind,source=$(pwd),target=/rosws/src/$(basename $(pwd)) --workdir /rosws --detach -i --rm arm64v8/ros:${{ env.ROS_DISTRO }} | ||
- name: Install ROS Source Dependencies | ||
- name: Download ROS Source Dependencies | ||
run: | | ||
docker exec --workdir /rosws/src arm64-ros vcs import --input uwrt_mars_rover/common_upstream_dependencies.repos | ||
# TODO: add linux_arm64_upstream_dependencies.repos | ||
|
||
- name: Install ROS Binary Package Dependencies | ||
run: | | ||
docker exec arm64-ros sudo apt update | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"act": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Start with the desktop ROS Galactic 20.04 image | ||
FROM osrf/ros:galactic-desktop | ||
|
||
# This dockerfile assumes you'll share your development folder from your computer over to the container, | ||
# so we don't do `rosdep install` for you, or clone the repository. | ||
|
||
# update everything | ||
RUN sudo apt update -y --no-install-recommends && sudo apt dist-upgrade -y | ||
# Ensure rosinstall and rosdep are installed and up to date | ||
RUN sudo apt install -y python3-rosdep | ||
|
||
# build via docker build -f .\Dockerfile.dev -t uwrt_dev_image . | ||
# run via docker run --name uwrt_dev_container -e DISPLAY=host.docker.internal:0.0 -it -v uwrt_dev_image | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Start with the basic ROS Galactic 20.04 image | ||
FROM ros:galactic | ||
|
||
# Copy over the current repository to our image | ||
COPY . $HOME/dev_ws/src/uwrt_mars_rover | ||
WORKDIR $HOME/dev_ws/src/ | ||
|
||
# update everything | ||
RUN sudo apt update -y --no-install-recommends && sudo apt dist-upgrade -y | ||
# Ensure rosinstall and rosdep are installed and up to date | ||
RUN sudo apt install -y python3-rosdep | ||
|
||
# Install upstream source dependencies | ||
RUN vcs import --input uwrt_mars_rover/common_upstream_dependencies.repos | ||
|
||
# Download metapackage dependencies (unused; used in earlier years for HW bridge) | ||
# RUN vcs import --input uwrt_mars_rover/metapackage_dependencies.repos | ||
|
||
# Change directories to run rosdep | ||
WORKDIR $HOME/dev_ws/ | ||
# Get all ROS dependencies for the ROS packages we use via rosdep | ||
RUN rosdep install --from-paths src -y --ignore-src | ||
|
Oops, something went wrong.