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

Add gym-ignition project #685

Merged
merged 5 commits into from
Apr 13, 2021
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
9 changes: 8 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand All @@ -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
Expand Down
21 changes: 21 additions & 0 deletions cmake/Buildgym-ignition.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright (C) 2021 iCub Facility, Istituto Italiano di Tecnologia
# Authors: Diego Ferigo <diego.ferigo@iit.it>
# 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
1 change: 1 addition & 0 deletions cmake/ProjectsTagsUnstable.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
3 changes: 3 additions & 0 deletions cmake/RobotologySuperbuildLogic.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
8 changes: 6 additions & 2 deletions cmake/RobotologySuperbuildOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
31 changes: 29 additions & 2 deletions doc/profiles.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -41,7 +42,7 @@ All these options are named `ROBOTOLOGY_ENABLE_<profile>` .

| 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) |
Expand All @@ -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) |
Expand All @@ -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` | ✔️ | ❌ | ❌ | ✔️ | ✔️ | ✔️ |
Expand Down Expand Up @@ -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.

Expand Down
4 changes: 4 additions & 0 deletions releases/latest.releases.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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