diff --git a/.ci/install_debian.sh b/.ci/install_debian.sh index 5daa55e66..438070a79 100644 --- a/.ci/install_debian.sh +++ b/.ci/install_debian.sh @@ -16,7 +16,7 @@ apt-get install -y bash-completion build-essential cmake cmake-curses-gui coinor apt-get install -y libmatio-dev libirrlicht-dev # Python -apt-get install -y python3-dev python3-numpy +apt-get install -y python3-dev python3-numpy python3-pybind11 pybind11-dev # Octave apt-get install -y liboctave-dev diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 05212c178..f1b46c512 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -83,7 +83,7 @@ jobs: # Actual dependencies mamba install ace asio boost eigen gazebo glew glfw gsl ipopt irrlicht libjpeg-turbo libmatio libode libxml2 nlohmann_json opencv pkg-config portaudio qt sdl sdl2 sqlite tinyxml spdlog # Python - mamba install numpy swig + mamba install numpy swig pybind11 # Additional dependencies useful only on Linux - name: Dependencies [Conda/Linux] diff --git a/.github/workflows/generate-conda-packages.yaml b/.github/workflows/generate-conda-packages.yaml index 2ae4823c7..fa8dcbe4d 100644 --- a/.github/workflows/generate-conda-packages.yaml +++ b/.github/workflows/generate-conda-packages.yaml @@ -116,7 +116,10 @@ jobs: conda mambabuild -m ${CONDA_PREFIX}/conda_build_config.yaml -m ${GITHUB_WORKSPACE}/conda/conda_build_config.yml yarp-matlab-bindings conda mambabuild -m ${CONDA_PREFIX}/conda_build_config.yaml -m ${GITHUB_WORKSPACE}/conda/conda_build_config.yml wb-toolbox conda mambabuild -m ${CONDA_PREFIX}/conda_build_config.yaml -m ${GITHUB_WORKSPACE}/conda/conda_build_config.yml unicycle-footstep-planner - conda mambabuild -m ${CONDA_PREFIX}/conda_build_config.yaml -m ${GITHUB_WORKSPACE}/conda/conda_build_config.yml bipedal-locomotion-framework + # blf is currently disabled, see https://github.com/robotology/robotology-superbuild/issues/806 + # When re-enabled, remember to use conda build and not conda mambabuild for https://github.com/robotology/robotology-superbuild/pull/800#issuecomment-866679447 + # conda build -m ${CONDA_PREFIX}/conda_build_config.yaml -m ${GITHUB_WORKSPACE}/conda/conda_build_config.yml bipedal-locomotion-framework + rm -rf bipedal-locomotion-framework conda mambabuild -m ${CONDA_PREFIX}/conda_build_config.yaml -m ${GITHUB_WORKSPACE}/conda/conda_build_config.yml wearables conda mambabuild -m ${CONDA_PREFIX}/conda_build_config.yaml -m ${GITHUB_WORKSPACE}/conda/conda_build_config.yml icub-models conda mambabuild -m ${CONDA_PREFIX}/conda_build_config.yaml -m ${GITHUB_WORKSPACE}/conda/conda_build_config.yml blocktest diff --git a/CHANGELOG.md b/CHANGELOG.md index f2ae55584..08df71ea4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,8 +6,9 @@ The format of this document is based on [Keep a Changelog](https://keepachangelo ## [Unreleased] ### Added -- Add `nlohmann-json` dependency to the superbuild (https://github.com/robotology/robotology-superbuild/pull/776) +- Add `nlohmann-json` dependency to the superbuild (https://github.com/robotology/robotology-superbuild/pull/776). - In `YARP`, all the `fake***` YARP devices are now enabled (https://github.com/robotology/robotology-superbuild/pull/797). +- `pybind11` has been added as dependency for the `ROBOTOLOGY_USES_PYTHON` option (https://github.com/robotology/robotology-superbuild/pull/800), to enable compilation of Python bindings of `manif` and `bipedal-locomotion-framework`. ## [2021.05] - 2021-05-31 diff --git a/cmake/Buildbipedal-locomotion-framework.cmake b/cmake/Buildbipedal-locomotion-framework.cmake index 9feaa7d8c..ff24b5646 100644 --- a/cmake/Buildbipedal-locomotion-framework.cmake +++ b/cmake/Buildbipedal-locomotion-framework.cmake @@ -40,6 +40,13 @@ if(ROBOTOLOGY_USES_PYTHON AND ROBOTOLOGY_GENERATE_CONDA_RECIPES) list(APPEND bipedal-locomotion-framework_OPTIONAL_CMAKE_ARGS "-DFRAMEWORK_DETECT_ACTIVE_PYTHON_SITEPACKAGES:BOOL=ON") endif() +# Workaround for https://github.com/robotology/robotology-superbuild/issues/802 +if(ROBOTOLOGY_USES_PYTHON AND NOT WIN32) + set(BUILD_PYTHON_BINDINGS ON) +else() + set(BUILD_PYTHON_BINDINGS OFF) +endif() + ycm_ep_helper(bipedal-locomotion-framework TYPE GIT STYLE GITHUB REPOSITORY dic-iit/bipedal-locomotion-framework.git @@ -54,11 +61,13 @@ ycm_ep_helper(bipedal-locomotion-framework TYPE GIT -DFRAMEWORK_USE_cppad:BOOL=${ROBOTOLOGY_ENABLE_DYNAMICS_FULL_DEPS} -DFRAMEWORK_USE_casadi:BOOL=${ROBOTOLOGY_ENABLE_DYNAMICS_FULL_DEPS} -DFRAMEWORK_USE_LieGroupControllers:BOOL=${ROBOTOLOGY_ENABLE_DYNAMICS_FULL_DEPS} + -DFRAMEWORK_COMPILE_PYTHON_BINDINGS:BOOL=${BUILD_PYTHON_BINDINGS} ${bipedal-locomotion-framework_OPTIONAL_CMAKE_ARGS} DEPENDS ${bipedal-locomotion-framework_DEPENDS}) set(bipedal-locomotion-framework_CONDA_DEPENDENCIES eigen) list(APPEND bipedal-locomotion-framework_CONDA_DEPENDENCIES nlohmann_json) +list(APPEND bipedal-locomotion-framework_CONDA_DEPENDENCIES spdlog) if(ROBOTOLOGY_USES_PYTHON) list(APPEND bipedal-locomotion-framework_CONDA_DEPENDENCIES pybind11) @@ -66,4 +75,8 @@ if(ROBOTOLOGY_USES_PYTHON) list(APPEND bipedal-locomotion-framework_CONDA_DEPENDENCIES pybind11-abi) list(APPEND bipedal-locomotion-framework_CONDA_DEPENDENCIES python) list(APPEND bipedal-locomotion-framework_CONDA_DEPENDENCIES numpy) + # manifpy is not available on Windows on conda-forge, see https://github.com/conda-forge/manif-feedstock/issues/7 + if(NOT WIN32) + list(APPEND bipedal-locomotion-framework_CONDA_DEPENDENCIES manifpy) + endif() endif() diff --git a/cmake/Buildmanif.cmake b/cmake/Buildmanif.cmake index 1c85a2073..515900a2e 100644 --- a/cmake/Buildmanif.cmake +++ b/cmake/Buildmanif.cmake @@ -4,13 +4,20 @@ include(YCMEPHelper) +# Workaround for https://github.com/robotology/robotology-superbuild/issues/802 +if(ROBOTOLOGY_USES_PYTHON AND NOT WIN32) + set(BUILD_PYTHON_BINDINGS ON) +else() + set(BUILD_PYTHON_BINDINGS OFF) +endif() + ycm_ep_helper(manif TYPE GIT STYLE GITHUB REPOSITORY artivis/manif.git TAG master COMPONENT external FOLDER src - CMAKE_ARGS -DBUILD_TESTING:BOOL=OFF -DBUILD_EXAMPLES:BOOL=OFF) + CMAKE_ARGS -DBUILD_TESTING:BOOL=OFF -DBUILD_EXAMPLES:BOOL=OFF -DBUILD_PYTHON_BINDINGS:BOOL=${BUILD_PYTHON_BINDINGS}) set(manif_CONDA_PKG_NAME manif) set(manif_CONDA_PKG_CONDA_FORGE_OVERRIDE ON) diff --git a/cmake/ProjectsTagsStable.cmake b/cmake/ProjectsTagsStable.cmake index 619406bff..f07ac8c0a 100644 --- a/cmake/ProjectsTagsStable.cmake +++ b/cmake/ProjectsTagsStable.cmake @@ -6,7 +6,8 @@ endmacro() # External projects set_tag(osqp_TAG v0.6.2) -set_tag(manif_TAG 0.0.4) +set_tag(manif_REPOSITORY robotology-dependencies/manif.git) +set_tag(manif_TAG 0.0.4.1) set_tag(qhull_TAG v8.0.2) set_tag(CppAD_TAG 20210000.4) set_tag(casadi 3.5.5.3) diff --git a/cmake/ProjectsTagsUnstable.cmake b/cmake/ProjectsTagsUnstable.cmake index e9156a7e8..d5d81d885 100644 --- a/cmake/ProjectsTagsUnstable.cmake +++ b/cmake/ProjectsTagsUnstable.cmake @@ -6,7 +6,8 @@ endmacro() # External projects set_tag(osqp_TAG v0.6.2) -set_tag(manif_TAG 0.0.4) +set_tag(manif_REPOSITORY robotology-dependencies/manif.git) +set_tag(manif_TAG 0.0.4.1) set_tag(qhull_TAG v8.0.2) set_tag(CppAD_TAG 20210000.4) set_tag(casadi 3.5.5.3) diff --git a/doc/cmake-options.md b/doc/cmake-options.md index 1c57a8147..096137c6f 100644 --- a/doc/cmake-options.md +++ b/doc/cmake-options.md @@ -379,13 +379,13 @@ Support for this dependency is enabled by the `ROBOTOLOGY_USES_PYTHON` CMake opt #### Ubuntu using apt Install Python and the necessary development files using the following command: ~~~ -sudo apt-get install python3-dev python3-numpy +sudo apt-get install python3-dev python3-numpy python3-pybind11 pybind11-dev ~~~ #### Conda To install python and the other required dependencies when using `conda-forge` provided dependencies, use: ~~~ -conda install -c conda-forge python numpy swig +conda install -c conda-forge python numpy swig pybind11 ~~~ ### Check the installation diff --git a/releases/latest.releases.yaml b/releases/latest.releases.yaml index 5090b75a3..c3136f945 100644 --- a/releases/latest.releases.yaml +++ b/releases/latest.releases.yaml @@ -9,8 +9,8 @@ repositories: version: v0.6.2 manif: type: git - url: https://github.com/artivis/manif.git - version: 0.0.4 + url: https://github.com/robotology-dependencies/manif.git + version: 0.0.4.1 qhull: type: git url: https://github.com/qhull/qhull.git