From 330fe31990782ba8b79e01be027443df94dcb1a1 Mon Sep 17 00:00:00 2001 From: Diego Ferigo Date: Mon, 12 Apr 2021 12:55:29 +0200 Subject: [PATCH 1/5] Add gym-ignition to core profile --- cmake/Buildgym-ignition.cmake | 21 +++++++++++++++++++++ cmake/ProjectsTagsUnstable.cmake | 1 + cmake/RobotologySuperbuildLogic.cmake | 3 +++ 3 files changed, 25 insertions(+) create mode 100644 cmake/Buildgym-ignition.cmake diff --git a/cmake/Buildgym-ignition.cmake b/cmake/Buildgym-ignition.cmake new file mode 100644 index 000000000..86786ed36 --- /dev/null +++ b/cmake/Buildgym-ignition.cmake @@ -0,0 +1,21 @@ +# Copyright (C) 2021 iCub Facility, Istituto Italiano di Tecnologia +# Authors: Diego Ferigo +# CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT + +include(YCMEPHelper) +include(FindOrBuildPackage) + +find_or_build_package(iDynTree QUIET) + +ycm_ep_helper(gym-ignition TYPE GIT + STYLE GITHUB + REPOSITORY robotology/gym-ignition.git + TAG master + COMPONENT core + FOLDER src + CMAKE_ARGS -DSCENARIO_USE_IGNITION:BOOL=${ROBOTOLOGY_USES_IGNITION} + -DSCENARIO_ENABLE_BINDINGS:BOOL=${ROBOTOLOGY_USES_PYTHON} + -DBINDINGS_INSTALL_PREFIX:PATH=${ROBOTOLOGY_SUPERBUILD_PYTHON_INSTALL_DIR} + DEPENDS iDynTree) + +# TODO: gym-ignition_CONDA_DEPENDENCIES diff --git a/cmake/ProjectsTagsUnstable.cmake b/cmake/ProjectsTagsUnstable.cmake index 0457bdc67..174b84b29 100644 --- a/cmake/ProjectsTagsUnstable.cmake +++ b/cmake/ProjectsTagsUnstable.cmake @@ -30,3 +30,4 @@ set_tag(icub-gazebo-wholebody_TAG devel) set_tag(whole-body-controllers_TAG master) set_tag(OsqpEigen_TAG master) set_tag(YARP_telemetry_TAG master) +set_tag(gym-ignition_TAG devel) diff --git a/cmake/RobotologySuperbuildLogic.cmake b/cmake/RobotologySuperbuildLogic.cmake index 9acb0c2c4..40115eb6e 100644 --- a/cmake/RobotologySuperbuildLogic.cmake +++ b/cmake/RobotologySuperbuildLogic.cmake @@ -18,6 +18,9 @@ if(ROBOTOLOGY_ENABLE_CORE) if(ROBOTOLOGY_USES_GAZEBO) find_or_build_package(GazeboYARPPlugins) endif() + if(ROBOTOLOGY_USES_IGNITION) + find_or_build_package(gym-ignition) + endif() if(ROBOTOLOGY_USES_MATLAB OR ROBOTOLOGY_USES_OCTAVE) find_or_build_package(yarp-matlab-bindings) endif() From 6b2a066ba7c1069eb3aea464d2e706a485c1815b Mon Sep 17 00:00:00 2001 From: Diego Ferigo Date: Sun, 11 Apr 2021 18:53:39 +0200 Subject: [PATCH 2/5] Build projects depending on Ignition --- cmake/RobotologySuperbuildOptions.cmake | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cmake/RobotologySuperbuildOptions.cmake b/cmake/RobotologySuperbuildOptions.cmake index 950123509..91295f15b 100644 --- a/cmake/RobotologySuperbuildOptions.cmake +++ b/cmake/RobotologySuperbuildOptions.cmake @@ -17,13 +17,17 @@ option(ROBOTOLOGY_USES_LUA "Enable compilation of software that depend on Lua" F mark_as_advanced(ROBOTOLOGY_USES_LUA) option(ROBOTOLOGY_USES_PYTHON "Enable compilation of software that depend on Python" FALSE) -## Enable packages that depend on the Gazebo simulator +## Enable packages that depend on the Gazebo Classic simulator if(WIN32) set(ROBOTOLOGY_USES_GAZEBO_DEFAULT FALSE) else() set(ROBOTOLOGY_USES_GAZEBO_DEFAULT TRUE) endif() -option(ROBOTOLOGY_USES_GAZEBO "Enable compilation of software that depends on Gazebo" ${ROBOTOLOGY_USES_GAZEBO_DEFAULT}) +option(ROBOTOLOGY_USES_GAZEBO "Enable compilation of software that depends on Gazebo Classic" ${ROBOTOLOGY_USES_GAZEBO_DEFAULT}) + +## Enable packages that depend on the Ignition Gazebo simulator +set(ROBOTOLOGY_USES_IGNITION_DEFAULT FALSE) +option(ROBOTOLOGY_USES_IGNITION "Enable compilation of software that depends on Ignition Gazebo" ${ROBOTOLOGY_USES_IGNITION_DEFAULT}) ## Enable Oculus SDK and Cyberith treadmill options option(ROBOTOLOGY_USES_OCULUS_SDK "Enable compilation of software that depend on Oculus SDK" FALSE) From 9adcc9243d0ec5fa37c0ee181abb84fce5b3c981 Mon Sep 17 00:00:00 2001 From: Diego Ferigo Date: Mon, 12 Apr 2021 19:28:11 +0200 Subject: [PATCH 3/5] Enable Ignition Gazebo in conda CI --- .github/workflows/ci.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4c4c37964..0854c74f6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -90,6 +90,8 @@ jobs: # Additional dependencies only useful on Linux # See https://github.com/robotology/robotology-superbuild/issues/477 mamba install expat-cos6-x86_64 freeglut libdc1394 libselinux-cos6-x86_64 libxau-cos6-x86_64 libxcb-cos6-x86_64 libxdamage-cos6-x86_64 libxext-cos6-x86_64 libxfixes-cos6-x86_64 libxxf86vm-cos6-x86_64 mesalib mesa-libgl-cos6-x86_64 + # Ignition Gazebo + mamba install libignition-gazebo4 - name: Print used environment [Conda] shell: bash -l {0} @@ -103,12 +105,17 @@ jobs: run: | mkdir -p build cd build - cmake -GNinja -C ${GITHUB_WORKSPACE}/.ci/initial-cache.gh.cmake -DYCM_EP_ADDITIONAL_CMAKE_ARGS:STRING="-DMatlab_ROOT_DIR:PATH=${GHA_Matlab_ROOT_DIR} -DMatlab_MEX_EXTENSION:STRING=${GHA_Matlab_MEX_EXTENSION}" -DROBOTOLOGY_USES_MATLAB:BOOL=ON -DNON_INTERACTIVE_BUILD:BOOL=TRUE -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ${{ matrix.project_tags_cmake_options }} .. + cmake -GNinja -C ${GITHUB_WORKSPACE}/.ci/initial-cache.gh.cmake -DYCM_EP_ADDITIONAL_CMAKE_ARGS:STRING="-DMatlab_ROOT_DIR:PATH=${GHA_Matlab_ROOT_DIR} -DMatlab_MEX_EXTENSION:STRING=${GHA_Matlab_MEX_EXTENSION}" -DROBOTOLOGY_USES_MATLAB:BOOL=ON -DNON_INTERACTIVE_BUILD:BOOL=TRUE -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ${{ matrix.project_tags_cmake_options }} .. # Disable options not tested on Conda for now # Reference issue: https://github.com/robotology/robotology-superbuild/issues/563 cmake -DROBOTOLOGY_USES_OCTAVE:BOOL=OFF . cat ./install/share/robotology-superbuild/setup.sh + - name: Configure Extra [Conda/Linux] + if: contains(matrix.os, 'ubuntu') + shell: bash -l {0} + run: cmake -S . -B build/ -DROBOTOLOGY_USES_IGNITION:BOOL=ON + - name: Configure [Conda/Windows] if: contains(matrix.os, 'windows') # ROBOTOLOGY_ENABLE_ICUB_HEAD is disabled due to https://github.com/robotology/icub-main/issues/685 From d8a997f111d7df3d6ba9f73788fb7ec4227c8bb0 Mon Sep 17 00:00:00 2001 From: Diego Ferigo Date: Mon, 12 Apr 2021 13:07:14 +0200 Subject: [PATCH 4/5] Update documentation --- doc/profiles.md | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/doc/profiles.md b/doc/profiles.md index 70d09f0b3..04634c2f5 100644 --- a/doc/profiles.md +++ b/doc/profiles.md @@ -18,6 +18,7 @@ Table of Contents * [Event-driven profile](#event-driven) * [Dependencies-specific documentation](#dependencies-specific-documentation) * [Gazebo simulator](#gazebo) + * [Ignition](#ignition) * [MATLAB](#matlab) * [Octave](#octave) * [Python](#python) @@ -41,7 +42,7 @@ All these options are named `ROBOTOLOGY_ENABLE_` . | CMake Option | Description | Main packages included | Default Value | Profile-specific documentation | |:------------:|:-----------:|:---------------------:|:-------------:|:----:| -| `ROBOTOLOGY_ENABLE_CORE` | The core robotology software packages, necessary for most users. | [`YARP`](https://github.com/robotology/yarp), [`ICUB`](https://github.com/robotology/icub-main), [`ICUBcontrib`](https://github.com/robotology/icub-contrib-common), [`icub-models`](https://github.com/robotology/icub-models) and [`robots-configurations`](https://github.com/robotology/robots-configuration). [`GazeboYARPPlugins`](https://github.com/robotology/GazeboYARPPlugins) and [`icub-gazebo`](https://github.com/robotology/icub-gazebo) if the `ROBOTOLOGY_USES_GAZEBO` option is enabled. | `ON` | [Documentation on Core profile.](#core) | +| `ROBOTOLOGY_ENABLE_CORE` | The core robotology software packages, necessary for most users. | [`YARP`](https://github.com/robotology/yarp), [`ICUB`](https://github.com/robotology/icub-main), [`ICUBcontrib`](https://github.com/robotology/icub-contrib-common), [`icub-models`](https://github.com/robotology/icub-models) and [`robots-configurations`](https://github.com/robotology/robots-configuration). [`GazeboYARPPlugins`](https://github.com/robotology/GazeboYARPPlugins) and [`icub-gazebo`](https://github.com/robotology/icub-gazebo) if the `ROBOTOLOGY_USES_GAZEBO` option is enabled. [`gym-ignition`](https://github.com/robotology/gym-ignition) if the `ROBOTOLOGY_USES_IGNITION` option is enabled. | `ON` | [Documentation on Core profile.](#core) | | `ROBOTOLOGY_ENABLE_ROBOT_TESTING` | The robotology software packages related to robot testing. | [`RobotTestingFramework`](https://github.com/robotology/robot-testing-framework), [`icub-tests`](https://github.com/robotology/icub-tests), [`blocktest`](https://github.com/robotology/blocktest) and [`blocktest-yarp-plugins`](https://github.com/robotology/blocktest-yarp-plugins) | `OFF` | [Documentation on Robot Testing profile.](#robot-testing) | | `ROBOTOLOGY_ENABLE_DYNAMICS` | The robotology software packages related to balancing, walking and force control. | [`iDynTree`](https://github.com/robotology/idyntree), [`blockfactory`](https://github.com/robotology/blockfactory), [`wb-Toolbox`](https://github.com/robotology/wb-Toolbox), [`whole-body-controllers`](https://github.com/robotology/whole-body-controllers), [`walking-controllers`](https://github.com/robotology/walking-controllers), [`matioCpp`](https://github.com/dic-iit/matio-cpp), [`bipedal-locomotion-framework`](https://github.com/dic-iit/bipedal-locomotion-framework), [`YARP_telemetry`](https://github.com/robotology/yarp-telemetry). | `OFF` | [Documentation on Dynamics profile.](#dynamics) | | `ROBOTOLOGY_ENABLE_DYNAMICS_FULL_DEPS` | Optional dependencies for [`bipedal-locomotion-framework`](https://github.com/dic-iit/bipedal-locomotion-framework). | [`manif`](https://github.com/artivis/manif), [`qhull`](https://github.com/qhull/qhull), [`casadi`](https://github.com/casadi/casadi). [`CppAD`](https://github.com/coin-or/CppAD). | `OFF` | [Documentation on Dynamics full deps profile.](#dynamics-full-deps) | @@ -60,7 +61,8 @@ The dependencies CMake options specify if the packages dependending on something | CMake Option | Description | Default Value | Dependency-specific documentation | |:------------:|:-----------:|:-------------:|:---------------------------------:| -| `ROBOTOLOGY_USES_GAZEBO` | Include software and plugins that depend on the [Gazebo simulator](http://gazebosim.org/). | `ON` on Linux and macOS, `OFF` on Windows | [Documentation on Gazebo dependency.](#gazebo) | +| `ROBOTOLOGY_USES_GAZEBO` | Include software and plugins that depend on the [Gazebo Classic simulator](http://gazebosim.org/). | `ON` on Linux and macOS, `OFF` on Windows | [Documentation on Gazebo Classic dependency.](#gazebo) | +| `ROBOTOLOGY_USES_IGNITION` | Include software that depends on [Ignition](ignitionrobotics.org/). | `OFF` | [Documentation on Ignition Gazebo dependency.](#ignition) | | `ROBOTOLOGY_USES_MATLAB` | Include software and plugins that depend on the [Matlab](https://mathworks.com/products/matlab.html). | `OFF` | [Documentation on MATLAB dependency.](#matlab) | | `ROBOTOLOGY_USES_OCTAVE` | Include software and plugins that depend on [Octave](https://www.gnu.org/software/octave/). | `OFF` | [Documentation on Octave dependency.](#octave) | | `ROBOTOLOGY_USES_PYTHON` | Include software that depends on [Python](https://www.python.org/). | `OFF` | [Documentation on Python dependency.](#python) | @@ -86,6 +88,7 @@ Not all options are supported on all platforms. The following table provides a r | `ROBOTOLOGY_ENABLE_HUMAN_DYNAMICS` | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | `ROBOTOLOGY_ENABLE_EVENT_DRIVEN` | ✔️ | ✔️ | ❌ | ✔️ | ✔️ | ❌ | | `ROBOTOLOGY_USES_GAZEBO` | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | +| `ROBOTOLOGY_USES_IGNITION` | ❌ | ❌ | ❌ | ✔️ | ❌ | ❌ | | `ROBOTOLOGY_USES_MATLAB` | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | `ROBOTOLOGY_USES_OCTAVE` | ✔️ | ✔️ | ❌ | ❌ | ❌ | ❌ | | `ROBOTOLOGY_USES_PYTHON` | ✔️ | ❌ | ❌ | ✔️ | ✔️ | ✔️ | @@ -228,6 +231,30 @@ the correct enviroment variables as documented in [`robotology-superbuild-depend ### Check the installation Follow the steps in https://github.com/robotology/icub-gazebo#usage and/or https://github.com/robotology/icub-models#use-the-models-with-gazebo to check if the Gazebo-based iCub simulation works fine. +## Ignition +Support for this dependency is enabled by the `ROBOTOLOGY_USES_IGNITION` CMake option. +This option is set to `OFF` on all platforms as it is still experimental. + +### System Dependencies + +Different Ignition distributions can be installed alongside. +The projects included in the superbuild might require different distributions. +From the superbuild point of view, we currently do not allow enabling projects that only support a specific Ignition distribution, therefore all required distributions have to be found in the system. + +#### Using conda + +Follow [the source installation with conda-forge provided dependencies](https://github.com/robotology/robotology-superbuild/blob/master/doc/conda-forge.md#source-installation) and, after creating and environment and installing the default dependencies, execute: + +```bash +conda install -c conda-forge libignition-gazebo4 +``` + +#### Using official instructions + +Follow the official instructions to install Ignition on your platform, available at https://ignitionrobotics.org/docs. + +Note: this installation method is not currently tested in Continuous Integration. + ## MATLAB Support for this dependency is enabled by the `ROBOTOLOGY_USES_MATLAB` CMake option. From 3c8d5234a94fdbddcf5d3f0f8d75237177434ad2 Mon Sep 17 00:00:00 2001 From: Diego Ferigo Date: Mon, 12 Apr 2021 12:31:25 +0200 Subject: [PATCH 5/5] Add gym-ignition to latest.releases.yaml --- releases/latest.releases.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/releases/latest.releases.yaml b/releases/latest.releases.yaml index 0db878a53..ddd56b19f 100644 --- a/releases/latest.releases.yaml +++ b/releases/latest.releases.yaml @@ -191,3 +191,7 @@ repositories: type: git url: https://github.com/robotology/yarp-telemetry.git version: v0.1.0 + gym-ignition: + type: git + url: https://github.com/robotology/gym-ignition.git + version: v1.2.1