Skip to content

Commit

Permalink
Release Version 5.1.0
Browse files Browse the repository at this point in the history
Version 5.1.0 contains a few improvements to the behaviour and usage of the libraries.

This release also includes substantial improvements to the python bindings, including
class bindings for the robot model and controller library. Additional fixes and improvements
have been made throughout the framework.

Refer to the CHANGELOG for more information.
  • Loading branch information
domire8 authored Apr 1, 2022
2 parents c521407 + b2d22e3 commit 0f945c8
Show file tree
Hide file tree
Showing 81 changed files with 2,752 additions and 672 deletions.
5 changes: 4 additions & 1 deletion .github/actions/build-test-python/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
#!/bin/sh -l

echo ">>> Installing control libraries..."
bash /github/workspace/source/install.sh --auto --no-controllers --no-robot-model || exit 1
bash /github/workspace/source/install.sh --auto || exit 1
bash /github/workspace/protocol/install.sh --auto || exit 1

echo ">>> Building Python bindings..."

export OSQP_INCLUDE_DIR='/usr/local/include/osqp'
export OPENROBOTS_INCLUDE_DIR='/opt/openrobots/include'
pip3 install /github/workspace/python || (echo ">>> [ERROR] Build stage failed!" && exit 2) || exit $?

echo ">>> Running all test stages..."
Expand Down
52 changes: 50 additions & 2 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,47 @@ on:

# Define the build test jobs for each configuration
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-debug:
needs: check-skippable-changes
if: ${{ needs.check-skippable-changes.outputs.skip != 'true' }}
runs-on: ubuntu-latest
name: Debug configuration test
steps:
Expand All @@ -25,6 +65,8 @@ jobs:
configuration: Debug

build-test-release:
needs: check-skippable-changes
if: ${{ needs.check-skippable-changes.outputs.skip != 'true' }}
runs-on: ubuntu-latest
name: Release configuration test
steps:
Expand All @@ -38,7 +80,10 @@ jobs:
configuration: Release

build-test-python:
needs: build-test-release
needs:
- check-skippable-changes
- build-test-release
if: ${{ needs.check-skippable-changes.outputs.skip != 'true' }}
runs-on: ubuntu-latest
name: Python bindings test
steps:
Expand All @@ -50,7 +95,10 @@ jobs:
uses: ./.github/actions/build-test-python

build-test-protocol:
needs: build-test-release
needs:
- check-skippable-changes
- build-test-release
if: ${{ needs.check-skippable-changes.outputs.skip != 'true' }}
runs-on: ubuntu-latest
name: Protocol library test
steps:
Expand Down
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# CHANGELOG

Release Versions:
- [5.1.0](#510)
- [5.0.0](#500)
- [4.1.0](#410)
- [4.0.0](#400)
Expand All @@ -9,6 +10,33 @@ Release Versions:
- [2.0.0](#200)
- [1.0.0](#100)

## 5.1.0

Version 5.1.0 contains a few new features and improvements to the behaviour and usage of the libraries.

### Features

**python**
- Add python bindings for robot model (#263)
- Controllers bindings (#266, #269, #271)

### Fixes and improvements

**protocol**
- Add Docker resources for testing and serving for protocol (#267)

**python**
- Bind ParameterMap (#265, #268)

**state_representation**
- ParameterInterface accessors to underlying parameters (#256)

**general**
- Incremental versioning (#260)
- Refactor cmake to export package (#259, #261)
- Improve CI checks for pull requests (#262)
- Remove previous eigen3 installation (#252, 264)

## 5.0.0

Version 5.0.0 refactors the dynamical systems and controllers libraries with a
Expand Down
17 changes: 8 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,10 @@ take several minutes.
3. Document the header files and public functions with doxygen comments, and update any relevant README.md
or documentation files with details of changes to the interface.
4. Update the [changelog](CHANGELOG.md) with your feature / fix / improvement in the "Upcoming changes" section.
5. Open a pull request into the `develop` branch. Write a meaningful title and description for the PR to make it
5. Update the version number using the [update_version.sh](./update_version.sh) script.
6. Open a pull request into the `develop` branch. Write a meaningful title and description for the PR to make it
clear what changes you have made, why you have made them, and how you have tested the changes.
6. You may merge the pull request into `develop` once you have the sign-off of one other developer and all CI tests pass.
7. You may merge the pull request into `develop` once you have the sign-off of one other developer and all CI tests pass.
Always use the "Squash and Merge" option to ensure your changes are contained within a single commit, maintaining
a linear git history. If unsure, you may request another reviewer to merge it for you.

Expand All @@ -94,19 +95,17 @@ The `develop` branch is always considered to be a "release candidate" that conta
code. If, at release time, there are features on `develop` that are considered unfinished or broken,
they can be marked as `EXPERIMENTAL` to exclude them from compilation.

At the time of release, a release branch should be made from development. In the release branch,
the project version number should be updated in the following locations:
- The [top-level CMakeLists](./source/CMakeLists.txt)
- The [python bindings setup.py](./python/setup.py)
- The [clproto bindings CMakeLists](./protocol/clproto_cpp/CMakeLists.txt)
- The PROJECT_NUMBER in the [doxygen config](./doxygen/doxygen.conf)
At the time of release, usually when there is minor or major version update,
a release branch should be made from development.

In addition, the release branch should be used to finalize the [changelog](CHANGELOG.md), which includes
The release branch should be used to finalize the [changelog](CHANGELOG.md), which includes
moving all content from the "Upcoming changes (in development)" header under a new header with the corresponding
release version.

Once the changes specific to the release have been approved, a linear GitFlow strategy is used to
merge this release branch into `main`, and then additionally squash and rebase the release branch back into `develop`.

The release on `main` should be tagged with the corresponding version as `vX.Y.Z`.

View and join the full discussion surrounding release workflow and strategy here: \
https://github.com/epfl-lasa/control-libraries/discussions/77
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5.1.0
53 changes: 14 additions & 39 deletions demos/control_loop_examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,61 +3,36 @@ project(control_loop_examples)

# Default to C99
if(NOT CMAKE_C_STANDARD)
set(CMAKE_C_STANDARD 99)
set(CMAKE_C_STANDARD 99)
endif()

# Default to C++17
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD 17)
endif()

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
add_compile_options(-Wall -Wextra -Wpedantic)
endif()

list(APPEND CMAKE_PREFIX_PATH /opt/openrobots)
find_package(Eigen3 REQUIRED)
find_package(pinocchio REQUIRED)
find_package(OsqpEigen REQUIRED)
find_package(osqp REQUIRED)

find_library(state_representation REQUIRED)
find_library(dynamical_systems REQUIRED)
find_library(controllers REQUIRED)
find_library(robot_model REQUIRED)

include_directories(
${Eigen3_INCLUDE_DIRS}
${STATE_REPRESENTATION_INCLUDE_DIR}
${DYNAMICAL_SYSTEMS_INCLUDE_DIR}
${ROBOT_MODEL_INCLUDE_DIR}
${CONTROLLERS_INCLUDE_DIR}
${PINOCCHIO_INCLUDE_DIR}
${OsqpEigen_INCLUDE_DIR}
/opt/openrobots/include
)
include_directories(/opt/openrobots/include)

find_package(control_libraries 5.0.0 CONFIG REQUIRED)

set(DEMOS_SCRIPTS
task_space_control_loop
robot_kinematics_control_loop
task_space_control_loop
robot_kinematics_control_loop
)

set(FIXTURE_INSTALL_PATH /etc/fixtures/)
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/scripts/fixtures/ DESTINATION ${FIXTURE_INSTALL_PATH})

foreach(SCRIPT ${DEMOS_SCRIPTS})
add_executable(${SCRIPT} scripts/${SCRIPT}.cpp)
target_link_libraries(${SCRIPT}
${PINOCCHIO_LIBRARIES}
OsqpEigen::OsqpEigen
osqp::osqp
state_representation
dynamical_systems
robot_model
controllers
)
target_compile_definitions(${SCRIPT} PRIVATE SCRIPT_FIXTURES="${FIXTURE_INSTALL_PATH}")
install(TARGETS ${SCRIPT}
RUNTIME DESTINATION bin
)
add_executable(${SCRIPT} scripts/${SCRIPT}.cpp)
target_link_libraries(${SCRIPT} ${control_libraries_LIBRARIES})
target_compile_definitions(${SCRIPT} PRIVATE SCRIPT_FIXTURES="${FIXTURE_INSTALL_PATH}")
install(TARGETS ${SCRIPT}
RUNTIME DESTINATION bin
)
endforeach()
28 changes: 3 additions & 25 deletions demos/ros2_examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,13 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
endif()

list(APPEND CMAKE_PREFIX_PATH /opt/openrobots)
find_package(Eigen3 REQUIRED)
find_package(pinocchio REQUIRED)
find_package(OsqpEigen REQUIRED)
find_package(osqp REQUIRED)
include_directories(/opt/openrobots/include)

find_library(state_representation REQUIRED)
find_library(dynamical_systems REQUIRED)
find_library(controllers REQUIRED)
find_library(robot_model REQUIRED)
find_package(control_libraries 5.0.0 CONFIG REQUIRED)

find_package(ament_cmake_auto REQUIRED)
ament_auto_find_build_dependencies()

include_directories(
${Eigen3_INCLUDE_DIRS}
${STATE_REPRESENTATION_INCLUDE_DIR}
${DYNAMICAL_SYSTEMS_INCLUDE_DIR}
${ROBOT_MODEL_INCLUDE_DIR}
${CONTROLLERS_INCLUDE_DIR}
${PINOCCHIO_INCLUDE_DIR}
${OsqpEigen_INCLUDE_DIR}
/opt/openrobots/include
)

set(DEMOS_SCRIPTS
task_space_control_loop
Expand All @@ -50,13 +34,7 @@ install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/scripts/fixtures/ DESTINATION ${FI
foreach(SCRIPT ${DEMOS_SCRIPTS})
ament_auto_add_executable(${SCRIPT} scripts/${SCRIPT}.cpp)
target_link_libraries(${SCRIPT}
${PINOCCHIO_LIBRARIES}
OsqpEigen::OsqpEigen
osqp::osqp
state_representation
dynamical_systems
robot_model
controllers
${control_libraries_LIBRARIES}
)
target_compile_definitions(${SCRIPT} PRIVATE SCRIPT_FIXTURES="${FIXTURE_INSTALL_PATH}")
endforeach()
Expand Down
24 changes: 2 additions & 22 deletions demos/ros_examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,8 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
endif()

list(APPEND CMAKE_PREFIX_PATH /opt/openrobots)
find_package(Eigen3 REQUIRED)
find_package(pinocchio REQUIRED)
find_package(OsqpEigen REQUIRED)
find_package(osqp REQUIRED)

find_library(state_representation REQUIRED)
find_library(dynamical_systems REQUIRED)
find_library(controllers REQUIRED)
find_library(robot_model REQUIRED)
find_package(control_libraries 5.0.0 CONFIG REQUIRED)

find_package(catkin REQUIRED COMPONENTS
roscpp
Expand All @@ -43,13 +36,6 @@ catkin_package(

include_directories(
${catkin_INCLUDE_DIRS}
${Eigen3_INCLUDE_DIRS}
${STATE_REPRESENTATION_INCLUDE_DIR}
${DYNAMICAL_SYSTEMS_INCLUDE_DIR}
${ROBOT_MODEL_INCLUDE_DIR}
${CONTROLLERS_INCLUDE_DIR}
${PINOCCHIO_INCLUDE_DIR}
${OsqpEigen_INCLUDE_DIR}
/opt/openrobots/include
)

Expand All @@ -63,14 +49,8 @@ install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/scripts/fixtures/ DESTINATION ${FI
foreach(SCRIPT ${DEMOS_SCRIPTS})
add_executable(${SCRIPT} scripts/${SCRIPT}.cpp)
target_link_libraries(${SCRIPT}
${control_libraries_LIBRARIES}
${catkin_LIBRARIES}
${PINOCCHIO_LIBRARIES}
OsqpEigen::OsqpEigen
osqp::osqp
state_representation
dynamical_systems
robot_model
controllers
)
target_compile_definitions(${SCRIPT} PRIVATE SCRIPT_FIXTURES="${FIXTURE_INSTALL_PATH}")
install(TARGETS ${SCRIPT}
Expand Down
3 changes: 1 addition & 2 deletions doxygen/doxygen.conf
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ PROJECT_NAME = "Control Libraries"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = 5.0.0
PROJECT_NUMBER = 4.1.0
PROJECT_NUMBER = 5.1.0

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
32 changes: 32 additions & 0 deletions protocol/Dockerfile.protocol
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
FROM ghcr.io/epfl-lasa/control-libraries/development-dependencies:latest as dependencies
ARG BRANCH=develop

WORKDIR /source
RUN git clone --depth 1 --branch "${BRANCH}" https://github.com/epfl-lasa/control-libraries
RUN bash control-libraries/source/install.sh --auto --no-controllers --no-dynamical-systems --no-robot-model

WORKDIR /tmp/protocol
COPY ./ ./

WORKDIR /tmp/protocol/protobuf
RUN make all


FROM dependencies as build
ARG BUILD_TESTING=ON

WORKDIR /tmp/protocol/clproto_cpp/build
RUN cmake -DBUILD_TESTING="${BUILD_TESTING}" .. \
&& make -j all


FROM build as testing

RUN CTEST_OUTPUT_ON_FAILURE=1 make test
RUN rm -rf /tmp/protocol/


FROM build as install

RUN make install
RUN rm -rf /tmp/protocol/
Loading

0 comments on commit 0f945c8

Please sign in to comment.