Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix multiple CI issues #527

Merged
merged 1 commit into from
Jul 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .ci/before_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

set -ex

if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
. "${TRAVIS_BUILD_DIR}/.ci/before_install_linux.sh";
if [ "${USE_CATKIN}" = "ON" ]; then
. "${TRAVIS_BUILD_DIR}/.ci/before_install_catkin.sh";
fi
File renamed without changes.
10 changes: 8 additions & 2 deletions .ci/docker/env.list
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,16 @@ TRAVIS
TRAVIS_PULL_REQUEST
TRAVIS_OS_NAME
TRAVIS_BUILD_DIR
TRAVIS_REPO_SLUG

CODECOV_TOKEN
DISTRIBUTION
GITHUB_TOKEN
REPOSITORY

BUILD_AIKIDOPY
BUILD_NAME
BUILD_TYPE
CATKIN_CONFIG_OPTIONS
DISTRIBUTION
REPOSITORY
SUDO
USE_CATKIN
21 changes: 21 additions & 0 deletions .ci/docker/ubuntu-disco
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM ubuntu:disco

# Workaround to suppress "Warning: apt-key output should not be parsed (stdout is not a terminal)"
ENV APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1

RUN apt-get update -qq

# To run dpkg without interactive dialogue
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get install -y \
build-essential \
cmake \
curl \
git \
lsb-release \
pkg-config \
python \
software-properties-common \
sudo \
tzdata
13 changes: 13 additions & 0 deletions .ci/docker/ubuntu-trusty
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM ubuntu:trusty

RUN apt-get update -qq
RUN apt-get install -y \
build-essential \
cmake \
curl \
git \
lsb-release \
pkg-config \
python \
software-properties-common \
sudo
6 changes: 5 additions & 1 deletion .ci/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
set -ex

if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
. "${TRAVIS_BUILD_DIR}/.ci/install_linux.sh"
if [ "${USE_CATKIN}" = "ON" ]; then
. "${TRAVIS_BUILD_DIR}/.ci/install_linux_catkin.sh"
else
. "${TRAVIS_BUILD_DIR}/.ci/install_linux_cmake.sh"
fi
elif [ "${TRAVIS_OS_NAME}" = "osx" ]; then
. "${TRAVIS_BUILD_DIR}/.ci/install_macos.sh"
fi
2 changes: 1 addition & 1 deletion .ci/install_linux.sh → .ci/install_linux_catkin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ cp -r "${TRAVIS_BUILD_DIR}" src
./scripts/internal-distro.py --workspace=src distribution.yml --repository "${REPOSITORY}" ${REQUIRED_ONLY}

if [ $BUILD_NAME = TRUSTY_FULL_DEBUG ]; then
sudo apt-get install clang-format-3.8
sudo apt-get install -y clang-format-3.8
fi
87 changes: 87 additions & 0 deletions .ci/install_linux_cmake.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
#!/usr/bin/env bash

set -ex

$SUDO apt-get -qq update
$SUDO apt-get -y install lsb-release software-properties-common
if [ $(lsb_release -sc) = "trusty" ]; then
$SUDO apt-add-repository -y ppa:libccd-debs/ppa
$SUDO apt-add-repository -y ppa:fcl-debs/ppa
fi
$SUDO apt-add-repository -y ppa:dartsim/ppa
$SUDO apt-get -qq update

# Build tools
$SUDO apt-get -y install \
sudo \
build-essential \
cmake \
pkg-config \
curl \
git
if [ $COMPILER = clang ]; then
$SUDO apt-get -qq -y install clang
fi

# Required dependencies
$SUDO apt-get -y install \
libboost-filesystem-dev \
libdart6-all-dev \
libompl-dev

# Optional dependencies
$SUDO apt-get -y install \
libtinyxml2-dev \
libyaml-cpp-dev

if [ "$BUILD_AIKIDOPY" = "ON" ]; then
$SUDO apt-get -y install python3-dev python3-numpy
$SUDO apt-get -y install python3-pip -y
$SUDO pip3 install pytest -U

if [ $(lsb_release -sc) = "trusty" ]; then
git clone https://github.com/pybind/pybind11 -b 'v2.2.4' --single-branch --depth 1
cd pybind11
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DPYBIND11_TEST=OFF
make -j4
$SUDO make install
cd ../..
elif [ $(lsb_release -sc) = "xenial" ]; then
git clone https://github.com/pybind/pybind11 -b 'v2.2.4' --single-branch --depth 1
cd pybind11
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DPYBIND11_TEST=OFF
make -j4
$SUDO make install
cd ../..
elif [ $(lsb_release -sc) = "bionic" ]; then
git clone https://github.com/pybind/pybind11 -b 'v2.2.4' --single-branch --depth 1
cd pybind11
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DPYBIND11_TEST=OFF
make -j4
$SUDO make install
cd ../..
elif [ $(lsb_release -sc) = "cosmic" ]; then
$SUDO apt-get -y install pybind11-dev python3 libpython3-dev python3-pytest \
python3-distutils
elif [ $(lsb_release -sc) = "disco" ]; then
$SUDO apt-get -y install pybind11-dev python3 libpython3-dev python3-pytest \
python3-distutils
else
echo -e "$(lsb_release -sc) is not supported."
exit 1
fi
fi

if [ $BUILD_DOCS = "ON" ]; then
$SUDO apt-get -qq -y install doxygen
fi

if [ $BUILD_NAME = TRUSTY_FULL_DEBUG ]; then
sudo apt-get install -y clang-format-3.8
fi
8 changes: 4 additions & 4 deletions .ci/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

set -ex

if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
. "${TRAVIS_BUILD_DIR}/.ci/script_linux.sh"
elif [ "${TRAVIS_OS_NAME}" = "osx" ]; then
. "${TRAVIS_BUILD_DIR}/.ci/script_macos.sh"
if [ "${USE_CATKIN}" = "ON" ]; then
. "${TRAVIS_BUILD_DIR}/.ci/script_catkin.sh"
else
. "${TRAVIS_BUILD_DIR}/.ci/script_cmake.sh"
fi
File renamed without changes.
2 changes: 1 addition & 1 deletion .ci/script_macos.sh → .ci/script_cmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -ex

unset -f cd; # Disable rvm ovveride of cd (see https://github.com/travis-ci/travis-ci/issues/8703)
unset -f cd; # Disable rvm override of cd (see https://github.com/travis-ci/travis-ci/issues/8703)

mkdir build
cd build
Expand Down
94 changes: 80 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,68 +21,134 @@ matrix:
- os: linux
compiler: gcc
env:
- BUILD_NAME=TRUSTY_RELEASE
- BUILD_NAME=TRUSTY_CATKIN_RELEASE
- DOCKER_FILE="ubuntu-trusty"
- REQUIRED_ONLY=--required-only
- BUILD_TYPE=Release
- CATKIN_CONFIG_OPTIONS="-DCMAKE_BUILD_TYPE=Release -DTREAT_WARNINGS_AS_ERRORS=ON"
- USE_CATKIN=ON
services: docker

- os: linux
compiler: gcc
env:
- BUILD_NAME=TRUSTY_FULL_DEBUG
- BUILD_NAME=TRUSTY_CATKIN_FULL_DEBUG
- DOCKER_FILE="ubuntu-trusty"
- BUILD_TYPE=Debug
- CATKIN_CONFIG_OPTIONS="-DCMAKE_BUILD_TYPE=Debug -DTREAT_WARNINGS_AS_ERRORS=ON"
- USE_CATKIN=ON
services: docker

- os: linux
compiler: gcc
env:
- BUILD_NAME=TRUSTY_FULL_RELEASE
- BUILD_NAME=TRUSTY_CATKIN_FULL_RELEASE
- DOCKER_FILE="ubuntu-trusty"
- BUILD_TYPE=Release
- CATKIN_CONFIG_OPTIONS="-DCMAKE_BUILD_TYPE=Release -DTREAT_WARNINGS_AS_ERRORS=ON"
- USE_CATKIN=ON
services: docker

- os: linux
env:
- BUILD_NAME=XENIAL_FULL_RELEASE
- BUILD_NAME=XENIAL_CATKIN_FULL_RELEASE
- DOCKER_FILE="ubuntu-xenial"
- BUILD_TYPE=Release
- CATKIN_CONFIG_OPTIONS="-DCMAKE_BUILD_TYPE=Release -DTREAT_WARNINGS_AS_ERRORS=ON"
- USE_CATKIN=ON
services: docker

- os: linux
env:
- BUILD_NAME=BIONIC_FULL_RELEASE
- BUILD_NAME=BIONIC_CATKIN_FULL_RELEASE
- DOCKER_FILE="ubuntu-bionic"
- BUILD_TYPE=Release
- CATKIN_CONFIG_OPTIONS="-DCMAKE_BUILD_TYPE=Release -DTREAT_WARNINGS_AS_ERRORS=ON"
- USE_CATKIN=ON
services: docker

- os: linux
env:
- BUILD_NAME=BIONIC_CMAKE_RELEASE
- DOCKER_FILE="ubuntu-bionic"
- BUILD_TYPE=Release
- USE_CATKIN=OFF
services: docker

- os: linux
env:
- BUILD_NAME=DISCO_CMAKE_RELEASE
- DOCKER_FILE="ubuntu-disco"
- BUILD_TYPE=Release
- USE_CATKIN=OFF
services: docker

- os: osx
osx_image: xcode9.3
compiler: clang
env:
- BUILD_NAME=XCODE93_RELEASE
- BUILD_NAME=XCODE93_CMAKE_RELEASE
- BUILD_TYPE=Release
- USE_CATKIN=OFF

- os: linux
compiler: gcc
env:
- BUILD_NAME=DOCS
- DOCKER_FILE="ubuntu-bionic"
- BUILD_TYPE=Release
- USE_CATKIN=ON
services: docker

allow_failures:
- os: linux
compiler: gcc
env:
- BUILD_NAME=XENIAL_FULL_RELEASE
- DOCKER_FILE="ubuntu-xenial"
- BUILD_NAME=TRUSTY_CATKIN_RELEASE
- DOCKER_FILE="ubuntu-trusty"
- REQUIRED_ONLY=--required-only
- BUILD_TYPE=Release
- CATKIN_CONFIG_OPTIONS="-DCMAKE_BUILD_TYPE=Release -DTREAT_WARNINGS_AS_ERRORS=ON"
- USE_CATKIN=ON
services: docker

- os: linux
compiler: gcc
env:
- BUILD_NAME=BIONIC_FULL_RELEASE
- DOCKER_FILE="ubuntu-bionic"
- BUILD_NAME=TRUSTY_CATKIN_FULL_DEBUG
- DOCKER_FILE="ubuntu-trusty"
- BUILD_TYPE=Debug
- CATKIN_CONFIG_OPTIONS="-DCMAKE_BUILD_TYPE=Debug -DTREAT_WARNINGS_AS_ERRORS=ON"
- USE_CATKIN=ON
services: docker

- os: linux
compiler: gcc
env:
- BUILD_NAME=TRUSTY_CATKIN_FULL_RELEASE
- DOCKER_FILE="ubuntu-trusty"
- BUILD_TYPE=Release
- CATKIN_CONFIG_OPTIONS="-DCMAKE_BUILD_TYPE=Release -DTREAT_WARNINGS_AS_ERRORS=ON"
- USE_CATKIN=ON
services: docker
- os: osx
osx_image: xcode9.3
compiler: clang

- os: linux
env:
- BUILD_NAME=XENIAL_CATKIN_FULL_RELEASE
- DOCKER_FILE="ubuntu-xenial"
- BUILD_TYPE=Release
- CATKIN_CONFIG_OPTIONS="-DCMAKE_BUILD_TYPE=Release -DTREAT_WARNINGS_AS_ERRORS=ON"
- USE_CATKIN=ON
services: docker

- os: linux
env:
- BUILD_NAME=XCODE93_RELEASE
- BUILD_NAME=BIONIC_CATKIN_FULL_RELEASE
- DOCKER_FILE="ubuntu-bionic"
- BUILD_TYPE=Release
- CATKIN_CONFIG_OPTIONS="-DCMAKE_BUILD_TYPE=Release -DTREAT_WARNINGS_AS_ERRORS=ON"
- USE_CATKIN=ON
services: docker

before_install:
- if [ -n "$DOCKER_FILE" ]; then
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ include(ClangFormat)

find_package(Boost REQUIRED COMPONENTS filesystem)

find_package(DART 6.8.2 REQUIRED
find_package(DART 6.6.2 REQUIRED
COMPONENTS optimizer-nlopt utils
OPTIONAL_COMPONENTS utils-urdf # for 'perception' target
CONFIG
Expand Down
6 changes: 5 additions & 1 deletion src/constraint/dart/InverseKinematicsSampleable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,12 @@ bool IkSampleGenerator::sample(statespace::StateSpace::State* _state)

mInverseKinematics->getTarget()->setTransform(poseState.getIsometry());

// Run the IK solver. If an exact solution is computed, apply it to the skeleton.
// Run the IK solver. If an exact solution is computed, apply it to the skeleton.
#if DART_VERSION_AT_LEAST(6, 8, 0)
if (mInverseKinematics->solveAndApply(true))
#else
if (mInverseKinematics->solve(true))
#endif
{
mMetaSkeletonStateSpace->getState(mMetaSkeleton.get(), outputState);
return true;
Expand Down