diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index baf85a431..683d6c34b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -32,7 +32,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-16.04, ubuntu-18.04, macos-latest, windows-latest] + os: [ubuntu-16.04, ubuntu-18.04, ubuntu-20.04, macos-latest, windows-latest] build-type: [Debug, RelWithDebInfo] compiler: [gcc, clang] exclude: @@ -44,47 +44,38 @@ jobs: runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 with: submodules: recursive - - name: Cleanup windows environment - shell: bash - run: | - set -x - rm -rf /c/hostedtoolcache/windows/Boost/1.72.0/lib/cmake/Boost-1.72.0 - if: matrix.os == 'windows-latest' - name: Install dependencies uses: jrl-umi3218/github-actions/install-dependencies@master with: compiler: ${{ matrix.compiler }} build-type: ${{ matrix.build-type }} ubuntu: | - apt: cython cython3 python-nose python3-nose python-numpy python3-numpy python-coverage python3-coverage python-setuptools python3-setuptools libeigen3-dev doxygen doxygen-latex libboost-all-dev libtinyxml2-dev libyaml-cpp-dev + apt: cython cython3 python-nose python3-nose python-numpy python3-numpy python-coverage python3-coverage python-setuptools python3-setuptools doxygen doxygen-latex libboost-all-dev libeigen-qld-dev libsch-core-dev librbdyn-dev python-eigen-qld python3-eigen-qld python-sch-core python3-sch-core python-rbdyn python3-rbdyn + apt-mirrors: + multi-contact: + mirror: https://dl.bintray.com/gergondet/multi-contact-head + key: 892EA6EE273707C6495A6FB6220D644C64666806 macos: | cask: gfortran - brew: eigen boost tinyxml2 yaml-cpp - pip: Cython coverage nose numpy + vcpkg: + repo: jrl-umi3218/vcpkg + user: ${{ github.actor }} + token: ${{ github.token }} windows: | - pip: Cython coverage nose numpy - github: - - path: eigenteam/eigen-git-mirror - ref: 3.3.7 - - path: leethomason/tinyxml2 - ref: 7.1.0 - - path: jbeder/yaml-cpp - ref: 29dcf92f870ee51cce8d68f8fcfe228942e8dfe1 - github: | - - path: jrl-umi3218/Eigen3ToPython - - path: jrl-umi3218/SpaceVecAlg - - path: jrl-umi3218/sch-core - - path: jrl-umi3218/eigen-qld - - path: jrl-umi3218/sch-core-python - - path: jrl-umi3218/RBDyn + vcpkg: + repo: jrl-umi3218/vcpkg + user: ${{ github.actor }} + token: ${{ github.token }} - name: Build and test uses: jrl-umi3218/github-actions/build-cmake-project@master with: compiler: ${{ matrix.compiler }} build-type: ${{ matrix.build-type }} + windows-options: -DPYTHON_BINDING:BOOL=OFF + macos-options: -DPYTHON_BINDING:BOOL=OFF - name: Upload documentation # Only run on master branch and for one configuration if: matrix.os == 'ubuntu-18.04' && matrix.build-type == 'RelWithDebInfo' && matrix.compiler == 'gcc' && github.ref == 'refs/heads/master' diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index b45693427..241ef9cfc 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -5,6 +5,9 @@ on: types: - package-master - package-release + pull_request: + branches: + - "**" push: paths-ignore: - doc/** diff --git a/.github/workflows/sources/package.yml b/.github/workflows/sources/package.yml index 50fe807d0..a3c20699c 100644 --- a/.github/workflows/sources/package.yml +++ b/.github/workflows/sources/package.yml @@ -20,6 +20,9 @@ name: Package Tasks on: repository_dispatch: types: [package-master, package-release] + pull_request: + branches: + - "**" push: paths-ignore: # Changes to those files don't mandate rebuilding a package diff --git a/CMakeLists.txt b/CMakeLists.txt index eb6083373..23e8d1cc1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,6 +39,11 @@ endif() # of the main library when launching ctest with RUN_TESTS if(MSVC) set(CMAKE_MSVCIDE_RUN_PATH "\$(SolutionDir)/src/\$(Configuration)") + if(_VCPKG_INSTALLED_DIR) + set(VCPKG_INSTALL_PREFIX "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_PREFIX}") + # Only debug actually exists but we make sure it's first in that case + set(CMAKE_MSVCIDE_RUN_PATH "${VCPKG_INSTALL_PREFIX}/\$(Configuration)/bin;${VCPKG_INSTALL_PREFIX}/bin;${CMAKE_MSVCIDE_RUN_PATH}") + endif() endif(MSVC) add_subdirectory(src) diff --git a/src/QPContactConstr.cpp b/src/QPContactConstr.cpp index 46bde327c..020cda232 100644 --- a/src/QPContactConstr.cpp +++ b/src/QPContactConstr.cpp @@ -106,7 +106,7 @@ void ContactConstr::ContactData::update(const std::vector auto X_b1_b2_current = X_0_b2 * X_0_b1.inv(); auto X_b2_cf_current = X_b1_cf * X_b1_b2_current.inv(); // Only apply the motion allowed by the DoF selection - auto error = revDof * sva::transformError(X_b2_cf_current.inv(), X_b2_cf.inv()).vector(); + Eigen::Vector6d error = revDof * sva::transformError(X_b2_cf_current.inv(), X_b2_cf.inv()).vector(); auto offset = sva::PTransformd(sva::RotX(error(0)) * sva::RotY(error(1)) * sva::RotZ(error(2)), Eigen::Vector3d(error(3), error(4), error(5))); X_b2_cf = offset * X_b2_cf; diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index af9609861..efc9031eb 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -5,14 +5,15 @@ enable_testing() find_package(Boost REQUIRED COMPONENTS unit_test_framework timer system) -add_definitions(-DBOOST_TEST_DYN_LINK) set(HEADERS arms.h) macro(addUnitTest name) add_executable(${name} ${name}.cpp ${HEADERS}) target_link_libraries(${name} PRIVATE Tasks Boost::unit_test_framework) - target_compile_definitions(${name} PRIVATE -DBOOST_TEST_DYN_LINK) + if(NOT Boost_USE_STATIC_LIBS) + target_compile_definitions(${name} PRIVATE -DBOOST_ALL_DYN_LINK) + endif() add_test(${name}Unit ${name}) # Adding a project configuration file (for MSVC only) generate_msvc_dot_user_file(${name}) diff --git a/vcpkg.json b/vcpkg.json new file mode 100644 index 000000000..21045263a --- /dev/null +++ b/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "tasks", + "version-string": "1.3.0", + "homepage": "https://github.com/jrl-umi3218/Tasks", + "description": "Real time control of robots using constrained optimization", + "dependencies": [ + "boost-test", + "boost-timer", + "eigen-qld", + "rbdyn", + "sch-core" + ] +}