Skip to content

Commit

Permalink
Release Version 3.1.0
Browse files Browse the repository at this point in the history
Version 3.1.0 is a minor update to modulo with a new feature in the components and it marks the first official version that uses iron as its ROS2 distribution.
  • Loading branch information
domire8 authored Sep 27, 2023
2 parents e6e41cd + c4c8309 commit 125b720
Show file tree
Hide file tree
Showing 29 changed files with 253 additions and 214 deletions.
23 changes: 23 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "modulo",
"remoteUser": "ros2",
"build": {
"dockerfile": "../Dockerfile",
"context": "..",
"target": "development",
"args": { "CL_VERSION": "v7.2.0" }
},
"workspaceMount": "source=${localWorkspaceFolder},target=/home/ros2/.devcontainer,type=bind,consistency=cached",
"workspaceFolder": "/home/ros2/.devcontainer",
"mounts": [
"source=${localWorkspaceFolder}/source,target=/home/ros2/ws/src,type=bind,consistency=cached"
],
"customizations": {
"vscode": {
"extensions": [
"ms-vscode.cpptools-extension-pack",
"eamodio.gitlens"
]
}
}
}
6 changes: 0 additions & 6 deletions .github/actions/build-test-humble-devel/action.yml

This file was deleted.

6 changes: 0 additions & 6 deletions .github/actions/build-test-humble/action.yml

This file was deleted.

35 changes: 0 additions & 35 deletions .github/common/build-test.sh

This file was deleted.

3 changes: 0 additions & 3 deletions .github/common/entrypoint.sh

This file was deleted.

1 change: 0 additions & 1 deletion .github/workflows/build-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ jobs:
with:
image_name: aica-technology/modulo
image_tags: ${{ steps.merge-tags.outputs.list }}
dockerfile_path: Dockerfile.ci
token: ${{ secrets.GITHUB_TOKEN }}

multi-arch:
Expand Down
44 changes: 12 additions & 32 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,31 @@
name: Build and Test

# Run workflow on pushes to main and develop branches, on any pull request, or by manual dispatch
on:
push:
branches:
- main
- develop
pull_request:
workflow_dispatch:

# Define the build test jobs
jobs:

check-contribution:
check:
name: Check if changelog and version have been updated
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Check contributions
if: ${{ github.event.pull_request.base.sha }}
- name: Check changelog
run: |
git fetch origin main ${{ github.event.pull_request.base.sha }}
VER_DIFF=$(git diff ${{ github.event.pull_request.base.sha }} ${{ github.sha }} -- ./VERSION)
if ! [ "${VER_DIFF}" ]; then
echo "::warning title=Contribution check failed::VERSION must be updated!"
echo "::warning title=Version check failed::VERSION must be updated!"
exit 1
fi
CL_DIFF=$(git diff ${{ github.event.pull_request.base.sha }} ${{ github.sha }} -- ./CHANGELOG.md)
if ! [ "${CL_DIFF}" ]; then
echo "::warning title=Contribution check failed::CHANGELOG.md must be updated!"
echo "::warning title=CHEANGELOG check failed::CHANGELOG.md must be updated!"
exit 1
fi
shell: bash

# check if jobs can be skipped
check-skippable-changes:
name: Check skippable changes
runs-on: ubuntu-latest
Expand All @@ -49,28 +40,17 @@ jobs:
paths_ignore: '["**.md"]'
skip_after_successful_duplicate: 'true'

build-test-humble:
test:
needs: check-skippable-changes
if: ${{ needs.check-skippable-changes.outputs.skip != 'true' }}
runs-on: ubuntu-latest
name: Humble build and test
name: Run tests
steps:
# First check out the repository
- name: Checkout
- name: Checkout repository
uses: actions/checkout@v3
# Load the repository build-test action
- name: Build and Test
uses: ./.github/actions/build-test-humble

build-test-humble-devel:
needs: check-skippable-changes
if: ${{ needs.check-skippable-changes.outputs.skip != 'true' }}
runs-on: ubuntu-latest
name: Humble development build and test
steps:
# First check out the repository
- name: Checkout
uses: actions/checkout@v2
# Load the repository build-test action
- name: Build and Test
uses: ./.github/actions/build-test-humble-devel
- name: Test
run: |
DOCKER_BUILDKIT=1 docker build --target test .
shell: bash

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
.idea
cmake-build-*
./fileList.txt
build

doxygen/docs/html
20 changes: 20 additions & 0 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"configurations": [
{
"name": "AMD",
"includePath": [
"/opt/ros/humble/include/**",
"/home/ros2/ros2_ws/install/**",
"/home/ros2/ws/install/**",
"/home/ros2/ws/src/modulo_utils/include",
"/home/ros2/ws/src/modulo_core/include",
"/home/ros2/ws/src/modulo_components/include"
],
"compilerPath": "/usr/bin/gcc",
"cStandard": "c17",
"cppStandard": "gnu++17",
"intelliSenseMode": "linux-gcc-x64"
}
],
"version": 4
}
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"C_Cpp.clang_format_style": "file:/home/ros2/.clang-format",
"cmake.sourceDirectory": "/home/ros2/ws/src/modulo_components",
}
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,29 @@

Release Versions:

- [3.1.0](#300)
- [3.0.0](#300)
- [2.3.0](#230)
- [2.2.0](#220)
- [2.1.1](#211)
- [2.1.0](#210)
## 3.1.0

### September 27, 2023

Version 3.1.0 is a minor update to modulo with a new feature in the components and it marks the first official version
that uses `iron` as its ROS2 distribution.

### Features

- Add the on_step_callback for components (#51)

### Behind the scenes

- Revise test stage to fail on test errors (#48)
- Unify dockerfiles and add vs code configuration (#50)
- Use iron as ros2 distro (#53)
- Change test workflow to docker build (#55)

## 3.0.0

Expand Down
21 changes: 20 additions & 1 deletion source/modulo_components/CONTRIBUTING.md → CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,23 @@ Similar to the exceptions, the logging of debug, info, and error messages should
- Methods that catch an exception and are not allow to rethrow, log an error with the exception message
- `add_xxx` methods use non-throttled logging
- Setters and getters as well as all other methods that are expected to be called at a high frequency use throttled
logging
logging


## Development Environment

Our development and testing workflow uses a Docker container to host the project build dependencies.

The following section describes the configuration steps to use this workflow. Of course, contributors may use whatever
development environment they prefer, as long as they adhere to the overall contribution guidelines.

### Configuring the development environment

Prerequisites: Install Docker and Visual Studio Code.

Step 1: Open VS Code and install the [Dev Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension.

Step 2: Use **Dev Containers: Open Folder in Container...** from the command palette and select this directory.

Step 3: The CMake profile should be automatically selected, now you can run and debug library and test targets entirely
with the devcontainer toolchain.
81 changes: 56 additions & 25 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,25 +1,56 @@
ARG BASE_TAG=humble
FROM ghcr.io/aica-technology/ros2-control-libraries:${BASE_TAG} as dependencies
WORKDIR ${HOME}/ros2_ws


FROM dependencies as modulo-component-interfaces

COPY --chown=${USER} ./source/modulo_component_interfaces ./src/modulo_component_interfaces
COPY --chown=${USER} ./source/modulo_utils ./src/modulo_utils
RUN /bin/bash -c "source /opt/ros/$ROS_DISTRO/setup.bash; colcon build"


FROM modulo-component-interfaces as modulo-core

COPY --chown=${USER} ./source/modulo_core ./src/modulo_core
RUN /bin/bash -c "source /opt/ros/$ROS_DISTRO/setup.bash; colcon build --packages-select modulo_core"


FROM modulo-core as modulo-components

COPY --chown=${USER} ./source/modulo_components ./src/modulo_components
RUN /bin/bash -c "source /opt/ros/$ROS_DISTRO/setup.bash; colcon build --packages-select modulo_components"

# clean image
RUN sudo apt-get clean && sudo rm -rf /var/lib/apt/lists/*
#syntax=docker/dockerfile:1.4.0
ARG CL_VERSION=v7.2.0
ARG ROS2_VERSION=iron
FROM ghcr.io/aica-technology/control-libraries:${CL_VERSION} as cl
FROM ghcr.io/aica-technology/ros2-ws:${ROS2_VERSION} as base
# setup the environment
USER ${USER}
ENV WORKSPACE ${HOME}/ws
WORKDIR ${WORKSPACE}
SHELL ["/bin/bash", "-l", "-c"]

# create a workspace
RUN source ${HOME}/ros2_ws/install/setup.bash && colcon build
# source the new workspace on login
RUN echo "source ${WORKSPACE}/install/setup.bash" | cat - ${HOME}/.bashrc > tmp && mv tmp ${HOME}/.bashrc
# install deps
COPY --from=cl / /
# install sources
COPY --chown=${USER}:${USER} ./source ${WORKSPACE}/src

FROM base as utils-development
ARG TARGETPLATFORM
ARG CACHEID
RUN --mount=type=cache,target=./build,id=${TARGETPLATFORM}-${CACHEID},uid=1000 \
colcon build --packages-select modulo_component_interfaces

FROM utils-development as core-development
ARG TARGETPLATFORM
ARG CACHEID
RUN --mount=type=cache,target=./build,id=${TARGETPLATFORM}-${CACHEID},uid=1000 \
colcon build --packages-select modulo_utils

FROM core-development as development
ARG TARGETPLATFORM
ARG CACHEID
RUN --mount=type=cache,target=./build,id=${TARGETPLATFORM}-${CACHEID},uid=1000 \
colcon build --packages-select modulo_core

FROM base as build
ARG TARGETPLATFORM
ARG CACHEID
RUN --mount=type=cache,target=./build,id=${TARGETPLATFORM}-${CACHEID},uid=1000 \
sudo apt-get update && rosdep update \
&& rosdep install --from-paths src --ignore-src -r -y \
--skip-keys "ros2_control ros2_controllers controller_interface hardware_interface controller_manager" \
&& sudo rm -rf /var/lib/apt/lists/* \
&& colcon build

FROM build as test
ARG TARGETPLATFORM
ARG CACHEID
RUN --mount=type=cache,target=./build,id=${TARGETPLATFORM}-${CACHEID},uid=1000 \
colcon test && colcon test-result --verbose

FROM scratch as production
COPY --from=build /home/ros2/ws/install /colcon
37 changes: 0 additions & 37 deletions Dockerfile.ci

This file was deleted.

2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.0
3.1.0
Loading

0 comments on commit 125b720

Please sign in to comment.