Skip to content

Commit

Permalink
Release 2.0.0
Browse files Browse the repository at this point in the history
Version 2.0.0 constitutes a major refactor of the Modulo project. It now provides stand-alone classes and helpers
for handling and translating messages and parameters in modulo_core, with new and improved component classes
for dynamic application composition in modulo_components.

The old concepts of Cell and Component have been fully redeveloped into modulo_components::Component and
modulo_components::LifecycleComponent, which provide a simple framework for creating stateless (unmanaged) or
state-based (managed) custom components.

For more information, see the new description of each package in the respective README.md files and view
the full generated documentation on [epfl-lasa.github.io/modulo](epfl-lasa.github.io/modulo).
  • Loading branch information
eeberhard authored Aug 5, 2022
2 parents 396bbff + 117121b commit 22e0e66
Show file tree
Hide file tree
Showing 150 changed files with 12,516 additions and 4,502 deletions.
7 changes: 7 additions & 0 deletions .github/actions/build-test-galactic/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# https://docs.github.com/en/actions/creating-actions/dockerfile-support-for-github-actions
FROM ghcr.io/aica-technology/ros2-control-libraries:galactic-devel

# Copy and set the entrypoint commands to execute when the container starts,
# explicilty invoking as ros2 user and with bash interpreter.
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["sudo", "su", "-", "ros2", "-c", "/bin/bash", "-c", "/entrypoint.sh"]
5 changes: 5 additions & 0 deletions .github/actions/build-test-galactic/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
name: 'Build and Test (Galactic)'
description: 'Build the source packages and run all unit tests'
runs:
using: 'docker'
image: 'Dockerfile'
34 changes: 34 additions & 0 deletions .github/actions/build-test-galactic/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash

STEP=1
build_and_test() {
PACKAGE=$1

echo ">>> ${STEP}: Building ${PACKAGE}..."
cp -r /github/workspace/source/"${PACKAGE}" ./src/"${PACKAGE}"
if ! colcon build --packages-select "${PACKAGE}"; then
echo ">>> [ERROR] Build stage ${STEP} failed!"
exit "${STEP}"
fi
echo ">>> Build stage ${STEP} completed successfully!"
STEP=$((STEP+1))

echo ">>> ${STEP}: Testing ${PACKAGE}..."
if ! colcon test --packages-select "${PACKAGE}" --return-code-on-test-failure; then
colcon test-result --verbose
echo ">>> [ERROR] Test stage ${STEP} failed!"
exit "${STEP}"
fi
echo ">>> Test stage ${STEP} completed successfully!"
STEP=$((STEP+1))
}

source /opt/ros/"${ROS_DISTRO}"/setup.bash
cd /home/ros2/ros2_ws

build_and_test modulo_component_interfaces
build_and_test modulo_core
build_and_test modulo_components

echo ">>> All build and test stages completed successfully!"
exit 0
1 change: 0 additions & 1 deletion .github/workflows/build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
push:
branches:
- main
- develop
release:
types: [published]
workflow_dispatch:
Expand Down
63 changes: 63 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
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:
name: Check if changelog and version have been updated
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Check contributions
if: ${{ github.event.pull_request.base.sha }}
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!"
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!"
exit 1
fi
shell: bash

# check if jobs can be skipped
check-skippable-changes:
name: Check skippable changes
runs-on: ubuntu-latest
outputs:
skip: ${{ steps.check_if_skippable.outputs.should_skip }}
steps:
- id: check_if_skippable
uses: fkirc/skip-duplicate-actions@master
with:
cancel_others: 'true'
do_not_skip: '["workflow_dispatch"]'
paths_ignore: '["**.md"]'
skip_after_successful_duplicate: 'true'

build-test-galactic:
needs: check-skippable-changes
if: ${{ needs.check-skippable-changes.outputs.skip != 'true' }}
runs-on: ubuntu-latest
name: Galactic 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-galactic
48 changes: 48 additions & 0 deletions .github/workflows/generate-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Generate and Deploy Documentation
on:
push:
branches:
- main
- develop
release:
types: [published]
workflow_dispatch:

jobs:
deploy:
name: Generate and Deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master

- name: Generate docs
uses: mattnotmitt/doxygen-action@v1
with:
working-directory: 'doxygen'
doxyfile-path: 'doxygen.conf'

- name: Tag release version
if: ${{ github.event_name == 'release' }}
shell: bash
run: |
TAG="${GITHUB_REF#refs/tags/}"
TAG="${TAG/\//-}"
mkdir -p doxygen/docs/versions
sudo mv doxygen/docs/html doxygen/docs/versions/${TAG}
- name: Tag branch version
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
shell: bash
run: |
BRANCH="${GITHUB_REF#refs/heads/}"
BRANCH="${BRANCH/\//-}"
mkdir -p doxygen/docs/versions
sudo mv doxygen/docs/html doxygen/docs/versions/${BRANCH}
- name: Deploy to documentation branch
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: docs
publish_dir: ./doxygen/docs
keep_files: true
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@

.idea
cmake-build-*

doxygen/docs/html
104 changes: 102 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,99 @@
## 1.1.0 (February 18, 2022)
# CHANGELOG

Release Versions:
- [2.0.0](#200)
- [1.1.0](#110)
- [1.0.0](#100)
- [Pre-release versions](#pre-release-versions)

## 2.0.0
### August 05, 2022

Version 2.0.0 constitutes a major refactor of the Modulo project. It now provides stand-alone classes and helpers
for handling and translating messages and parameters in modulo_core, with new and improved component classes
for dynamic application composition in modulo_components.

The old concepts of Cell and Component have been fully redeveloped into modulo_components::Component and
modulo_components::LifecycleComponent, which provide a simple framework for creating stateless (unmanaged) or
state-based (managed) custom components.

For more information, see the new description of each package in the respective README.md files and view
the full generated documentation on [epfl-lasa.github.io/modulo](epfl-lasa.github.io/modulo).

### Changes

- Fix develop after control libraries StateType refactor (#55)
- Fix examples after DS factory refactor (#56)
- Create modulo_components package (#42)
- Modulo translators (#41)
- Add MessagePairInterface and MessagePair including tests (#43)
- Use translators in MessagePair (#44)
- Add EncodedState support (#45)
- Add basic methods and attributes to component interface (#46)
- Add tests for the predicate interface (#48)
- Add publisher interface and handler (#47)
- Fix modulo_core after StateType refactor (#49)
- Add the base ComponentInterface class in python (#51)
- Specialize all available MessagePairs and add read capability (#52)
- Implementation of publisher interface (#53)
- Add parameter translators (#54)
- Use galactic-devel base tag (#59)
- Parameter translation improvements (#57)
- Support write/read for MessagePair<EncodedState, State> (#60)
- Component Parameters (#58)
- Component parameter description and improvements (#61)
- Update predicate logic in ComponentInterface (#50)
- Add methods to add output/publishers (#62)
- Add docstrings and QoS getter/setter (#63)
- Parameter translators in python (#65)
- Subscription handler/interface and add_input (#64)
- Implement execution thread for component (#68)
- Improve test coverage in modulo new core (#66)
- Add option to add deamon and update step function (#67)
- Clean up python message translators (#69)
- Add python component with execution thread (#70)
- Minor improvements (#72)
- Improve components tests (#71)
- Parameters in python ComponentInterface (#73)
- Handle logging and exceptions consistently (#74)
- Build and test packages in CI (#76)
- TF improvements (#77)
- Lifecycle transitions for LifecycleComponent (#75)
- Refactor 'msg' to 'message' for readability (#79)
- Extend documentation and consistent formatting (#80)
- Fix MessagePair to enable creating from any SR type (#82)
- Add QoS and periodic callbacks to Python ComponentInterface (#81)
- Make sure predicate is a bool (#85)
- Inherit from NodeT with public keyword (#84)
- Add inputs and outputs to python component interface (#83)
- Translation of empty parameters (#86)
- Add fallback name to constructors (#87)
- Add lifecycle component in Python (#89)
- Rename transition handlers and callbacks (#90)
- Remove old modulo_core and rename modulo_new_core (#91)
- Improve exception handling in modulo_core (#94)
- Don't run image build on push on develop (#95)
- Improve parameter translators for NOT_SET cases (#96)
- Don't start execute thread on construction (#98)
- Execute user transition callback first (#100)
- Handle empty parameters in ComponentInterface (#97)
- Minor improvements (#101)
- Improved exception handling (#99)
- Add trigger and send predicate on set (#102)
- Component services (#103)
- Create service under local namespace (#104)
- Add service improvements (#105)
- Generate documentation (#106)
- Rename test directories (#107)
- Modulo Core documentation (#109)
- Improve State message reading (#108)
- Catch core and component exceptions (#111)
- Modulo components documentation (#112)
- Better versioning and changelog (#113)
- Fix const reading of State parameters (#114)

## 1.1.0
### February 18, 2022

This version contains some general improvements and fixes, including support
for the breaking changes introduced by control libraries 5.0
Expand All @@ -12,11 +107,16 @@ for the breaking changes introduced by control libraries 5.0
- Fix the examples due to breaking changes in DS (#36)
- Correct the include due to changes in control-libraries (#38)

## 1.0.0 (September 22, 2021)
## 1.0.0
### September 22, 2021

Modulo core library to provide ROS2 Cell and Component classes built
around state_representation and clproto libraries.

---

# Pre-release versions

## 0.3.0 (November 18, 2020)

Latest version that fixes different bugs and add the possibility to isolate the containers to run them on dedicated network. Complete list of commits is:
Expand Down
30 changes: 19 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
ARG ROS_VERSION=galactic
FROM ghcr.io/aica-technology/ros2-control-libraries:${ROS_VERSION} as development

ARG BASE_TAG=galactic
FROM ghcr.io/aica-technology/ros2-control-libraries:${BASE_TAG} as dependencies
WORKDIR ${HOME}/ros2_ws
# copy sources and build ROS workspace with user permissions
WORKDIR ${HOME}/ros2_ws/
COPY --chown=${USER} ./source/ ./src/

# clean image
RUN sudo apt-get clean && sudo rm -rf /var/lib/apt/lists/*


FROM development as production
FROM dependencies as modulo-component-interfaces

# build modulo
COPY --chown=${USER} ./source/modulo_component_interfaces ./src/modulo_component_interfaces
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/*
Loading

0 comments on commit 22e0e66

Please sign in to comment.