Skip to content

Commit

Permalink
Remove CMake error preventing build on 22.04 and minor improvements (e…
Browse files Browse the repository at this point in the history
…pfl-lasa#299)

* Remove unnecessary line from CMakeLists

* Make Dockerfiles more consistent to benefit from cache

* Fix demos version and update it automatically

* Install python3 instead of python in base Dockerfile

* 6.0.1 -> 6.0.2

* Fix update_version script

* Update CHANGELOG

* 6.0.2 -> 6.0.3
  • Loading branch information
domire8 authored Jun 26, 2022
1 parent 3c6a242 commit 35d4a41
Show file tree
Hide file tree
Showing 15 changed files with 29 additions and 24 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Release Versions:

- Extend clproto tests (#297)
- Set default values of empty Parameters correctly (#298)
- Remove CMake error preventing build on 22.04 and minor improvements (#299)

## 6.0.0

Expand Down
8 changes: 5 additions & 3 deletions Dockerfile.base
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ RUN apt-get update && apt-get install -y \


FROM core-build-dependencies as project-dependencies
ARG OSQP_TAG=v0.6.2
ARG OSQP_EIGEN_TAG=v0.6.4

# add pinocchio to package list
RUN echo "deb [arch=amd64] http://robotpkg.openrobots.org/packages/debian/pub $(lsb_release -cs) robotpkg" \
Expand All @@ -40,10 +42,10 @@ RUN apt-get update && apt-get install -y \

# install osqp and eigen wrapper
WORKDIR /tmp/osqp_build
RUN git clone --recursive https://github.com/oxfordcontrol/osqp \
RUN git clone --depth 1 -b ${OSQP_TAG} --recursive https://github.com/oxfordcontrol/osqp \
&& cd osqp && mkdir build && cd build && cmake -G "Unix Makefiles" .. && cmake --build . --target install

RUN git clone https://github.com/robotology/osqp-eigen.git \
RUN git clone --depth 1 -b ${OSQP_EIGEN_TAG} https://github.com/robotology/osqp-eigen.git \
&& cd osqp-eigen && mkdir build && cd build && cmake .. && make -j && make install

ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib:/opt/openrobots/lib/
Expand Down Expand Up @@ -116,7 +118,7 @@ FROM ssh-configuration as development-dependencies
RUN apt-get update && apt-get install -y \
clang \
gdb \
python \
python3 \
python3-dev \
python3-pip \
tar \
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.0.2
6.0.3
2 changes: 1 addition & 1 deletion demos/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ endif()
list(APPEND CMAKE_PREFIX_PATH /opt/openrobots)
include_directories(/opt/openrobots/include)

find_package(control_libraries 5.0.0 CONFIG REQUIRED)
find_package(control_libraries 6.0.3 CONFIG REQUIRED)

set(DEMOS_SCRIPTS
task_space_control_loop
Expand Down
14 changes: 7 additions & 7 deletions demos/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
FROM ghcr.io/epfl-lasa/control-libraries/development-dependencies
FROM ghcr.io/epfl-lasa/control-libraries/development-dependencies:latest
ARG BRANCH=develop

WORKDIR /tmp
ARG CONTROL_LIBRARIES_BRANCH=develop
RUN git clone -b ${CONTROL_LIBRARIES_BRANCH} --depth 1 https://github.com/epfl-lasa/control-libraries.git
RUN cd control-libraries/source && ./install.sh --auto
RUN cd control-libraries/protocol && ./install.sh --auto
WORKDIR /source
RUN git clone --depth 1 --branch ${BRANCH} https://github.com/epfl-lasa/control-libraries
RUN bash control-libraries/source/install.sh --auto
RUN bash control-libraries/protocol/install.sh --auto
RUN pip3 install control-libraries/python

RUN rm -rf /tmp/*
RUN rm -rf /source

USER developer
WORKDIR ${HOME}/control_loop_examples
Expand Down
2 changes: 1 addition & 1 deletion demos/run-demo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ while [[ $# -gt 0 ]]; do
done

echo "Using control libraries branch ${BRANCH}"
BUILD_FLAGS+=(--build-arg CONTROL_LIBRARIES_BRANCH="${BRANCH}")
BUILD_FLAGS+=(--build-arg BRANCH="${BRANCH}")

docker pull ghcr.io/epfl-lasa/control-libraries/development-dependencies
DOCKER_BUILDKIT=1 docker build "${BUILD_FLAGS[@]}" . -t "${IMAGE_NAME}:${IMAGE_TAG}" || exit 1
Expand Down
2 changes: 1 addition & 1 deletion doxygen/doxygen.conf
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = "Control Libraries"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = 6.0.2
PROJECT_NUMBER = 6.0.3

# 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
4 changes: 2 additions & 2 deletions protocol/Dockerfile.protocol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM ghcr.io/epfl-lasa/control-libraries/development-dependencies:latest as depe
ARG BRANCH=develop

WORKDIR /source
RUN git clone --depth 1 --branch "${BRANCH}" https://github.com/epfl-lasa/control-libraries
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
Expand All @@ -16,7 +16,7 @@ FROM dependencies as build
ARG BUILD_TESTING=ON

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


FROM build as testing
Expand Down
2 changes: 1 addition & 1 deletion protocol/clproto_cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.15)

project(clproto VERSION 6.0.2)
project(clproto VERSION 6.0.3)

# Default to C99
if(NOT CMAKE_C_STANDARD)
Expand Down
2 changes: 1 addition & 1 deletion python/Dockerfile.python
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM ghcr.io/epfl-lasa/control-libraries/development-dependencies:latest as pyth
ARG BRANCH=develop

WORKDIR /source
RUN git clone --depth 1 --branch $BRANCH https://github.com/epfl-lasa/control-libraries
RUN git clone --depth 1 --branch ${BRANCH} https://github.com/epfl-lasa/control-libraries
RUN bash control-libraries/source/install.sh --auto
RUN bash control-libraries/protocol/install.sh --auto

Expand Down
2 changes: 1 addition & 1 deletion python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
osqp_path_var = 'OSQP_INCLUDE_DIR'
openrobots_path_var = 'OPENROBOTS_INCLUDE_DIR'

__version__ = "6.0.2"
__version__ = "6.0.3"
__libraries__ = ['state_representation', 'clproto', 'controllers', 'dynamical_systems', 'robot_model']
__include_dirs__ = ['include']

Expand Down
2 changes: 1 addition & 1 deletion source/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.15)

project(control_libraries VERSION 6.0.2)
project(control_libraries VERSION 6.0.3)

# Build options
option(BUILD_TESTING "Build all tests." OFF)
Expand Down
2 changes: 1 addition & 1 deletion source/Dockerfile.source
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/epfl-lasa/control-libraries/development-dependencies as build
FROM ghcr.io/epfl-lasa/control-libraries/development-dependencies:latest as build
ARG BUILD_TESTING=ON
ARG BUILD_CONTROLLERS=ON
ARG BUILD_DYNAMICAL_SYSTEMS=ON
Expand Down
2 changes: 0 additions & 2 deletions source/dynamical_systems/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
set(LIBRARY_NAME dynamical_systems)

find_library(state_representation REQUIRED)

set(CORE_SOURCES
src/IDynamicalSystem.cpp
src/DynamicalSystemFactory.cpp
Expand Down
6 changes: 5 additions & 1 deletion update_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -109,23 +109,27 @@ SED_STR_SOURCE="s/project(control_libraries VERSION ${VERSION})/project(control_
SED_STR_PYTHON="s/__version__ = \"${VERSION}\"/__version__ = \"${NEW_VERSION}\"/g"
SED_STR_CLPROTO="s/project(clproto VERSION ${VERSION})/project(clproto VERSION ${NEW_VERSION})/g"
SED_STR_DOXYGEN="s/PROJECT_NUMBER = ${VERSION}/PROJECT_NUMBER = ${NEW_VERSION}/g"
SED_STR_DEMOS="s/control_libraries ${VERSION}/control_libraries ${NEW_VERSION}/g"

if [[ "$OSTYPE" == "darwin"* ]]; then
sed -i '' "${SED_STR_VERSION}" ./VERSION
sed -i '' "${SED_STR_SOURCE}" ./source/CMakeLists.txt
sed -i '' "${SED_STR_PYTHON}" ./python/setup.py
sed -i '' "${SED_STR_CLPROTO}" ./protocol/clproto_cpp/CMakeLists.txt
sed -i '' "${SED_STR_DOXYGEN}" ./doxygen/doxygen.conf
sed -i '' "${SED_STR_DEMOS}" ./demos/CMakeLists.txt
else
sed -i "${SED_STR_VERSION}" ./VERSION
sed -i "${SED_STR_SOURCE}" ./source/CMakeLists.txt
sed -i "${SED_STR_PYTHON}" ./python/setup.py
sed -i "${SED_STR_CLPROTO}" ./protocol/clproto_cpp/CMakeLists.txt
sed -i "${SED_STR_DOXYGEN}" ./doxygen/doxygen.conf
sed -i "${SED_STR_DEMOS}" ./demos/CMakeLists.txt
fi

if [ "${COMMIT}" == true ]; then
echo "Committing changes to source control"
git add VERSION ./source/CMakeLists.txt ./python/setup.py ./protocol/clproto_cpp/CMakeLists.txt ./doxygen/doxygen.conf
git add VERSION ./source/CMakeLists.txt ./python/setup.py \
./protocol/clproto_cpp/CMakeLists.txt ./doxygen/doxygen.conf ./demos/CMakeLists.txt
git commit -m "${VERSION} -> ${NEW_VERSION}"
fi

0 comments on commit 35d4a41

Please sign in to comment.