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

Enable ROBOTOLOGY_USES_GZ in CI and improve documentation #1635

Merged
merged 8 commits into from
May 9, 2024
Merged
Show file tree
Hide file tree
Changes from 7 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
2 changes: 1 addition & 1 deletion .ci/all-options-enabled-cache.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Dependencies options
set(ROBOTOLOGY_USES_GAZEBO ON CACHE BOOL "")
set(ROBOTOLOGY_USES_GZ OFF CACHE BOOL "")
set(ROBOTOLOGY_USES_GZ ON CACHE BOOL "")
set(ROBOTOLOGY_USES_PCL_AND_VTK ON CACHE BOOL "")
set(ROBOTOLOGY_USES_OCTAVE ON CACHE BOOL "")
set(ROBOTOLOGY_USES_PYTHON ON CACHE BOOL "")
Expand Down
2 changes: 1 addition & 1 deletion .ci/initial-cache.gh.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Dependencies options
set(ROBOTOLOGY_USES_GAZEBO ON CACHE BOOL "")
set(ROBOTOLOGY_USES_GZ OFF CACHE BOOL "")
set(ROBOTOLOGY_USES_GZ ON CACHE BOOL "")
# ROBOTOLOGY_USES_MUJOCO is not really used as of January 2024
set(ROBOTOLOGY_USES_MUJOCO OFF CACHE BOOL "")
set(ROBOTOLOGY_USES_PCL_AND_VTK ON CACHE BOOL "")
Expand Down
23 changes: 17 additions & 6 deletions .ci/install_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,33 @@ else
apt-get install -y octave-dev
fi

# We enable osrf's gazebo binaries only on Ubuntu
if [[ ("ubuntu" == "$lsb_dist") ]]; then
mkdir -p /etc/apt/sources.list.d
echo deb http://packages.osrfoundation.org/gazebo/$lsb_dist\-stable $dist_version main > /etc/apt/sources.list.d/gazebo-stable.list
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys D2486D2DD83DB69272AFE98867170598AF249743
apt-get update
fi

# Gazebo Classic
# Just a limited amount of distros are supported by OSRF repos, for all the other we use the
# gazebo packages in regular repos

# Just a limited amount of distros are supported by OSRF repos,
# for all the other we use the gazebo packages in regular repos
# or we do not install gazebo classic if it is not available in apt
if [[ ("noble" == "$dist_version")]]; then
# There is no Gazebo Classic package for Noble
echo ""
elif [[ ("focal" == "$dist_version" || "buster" == "$dist_version") ]]; then
mkdir -p /etc/apt/sources.list.d
echo deb http://packages.osrfoundation.org/gazebo/$lsb_dist\-stable $dist_version main > /etc/apt/sources.list.d/gazebo-stable.list
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys D2486D2DD83DB69272AFE98867170598AF249743
apt-get update
apt-get install -y libgazebo11-dev
else
apt-get install -y libgazebo-dev
fi

# gz-sim8 binaries are only available for jammy (Ubuntu 22.04)
if [[ ("jammy" == "$dist_version") ]]; then
apt-get install -y gz-harmonic
fi

# PCL and VTK
apt-get install -y libpcl-dev

Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:
shell: bash -l {0}
run: |
# Dependencies
mamba install asio assimp boost eigen freetype gazebo glew glfw glm graphviz gsl ipopt irrlicht libjpeg-turbo libmatio libode libxml2 nlohmann_json pcl vtk opencv portaudio qt-main sdl sdl2 sqlite tinyxml spdlog lua soxr cmake compilers make ninja pkg-config tomlplusplus libzlib ffmpeg onnxruntime-cpp
mamba install asio assimp boost eigen freetype gazebo gz-sim8 glew glfw glm graphviz gsl ipopt irrlicht libjpeg-turbo libmatio libode libxml2 nlohmann_json pcl vtk opencv portaudio qt-main sdl sdl2 sqlite tinyxml spdlog lua soxr cmake compilers make ninja pkg-config tomlplusplus libzlib ffmpeg onnxruntime-cpp
# Python
mamba install python numpy swig==4.1.0 pybind11 pyqt matplotlib h5py tornado u-msgpack-python pyzmq ipython gst-plugins-good gst-plugins-bad pyqtwebengine qtpy pyyaml

Expand Down Expand Up @@ -245,23 +245,23 @@ jobs:
cd build
cmake -C ${GITHUB_WORKSPACE}/.ci/initial-cache.gh.cmake -G"${{ matrix.cmake_generator }}" -DNON_INTERACTIVE_BUILD:BOOL=TRUE -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ${{ matrix.project_tags_cmake_options }} ..

- name: Disable profiles that are not supported in docker for now [Docker debian-testing and debian-buster]
- name: Disable profiles that are not supported in Debian [Docker debian-testing and debian-buster]
if: (matrix.docker_image == 'debian:testing' || matrix.docker_image == 'debian:buster-backports')
run: |
cd build
cmake -DROBOTOLOGY_ENABLE_DYNAMICS_FULL_DEPS:BOOL=OFF -DROBOTOLOGY_USES_MUJOCO:BOOL=OFF -DROBOTOLOGY_ENABLE_ROBOT_TESTING:BOOL=OFF -DROBOTOLOGY_USES_PYTHON:BOOL=OFF .
cmake -DROBOTOLOGY_ENABLE_DYNAMICS_FULL_DEPS:BOOL=OFF -DROBOTOLOGY_USES_MUJOCO:BOOL=OFF -DROBOTOLOGY_ENABLE_ROBOT_TESTING:BOOL=OFF -DROBOTOLOGY_USES_PYTHON:BOOL=OFF -DROBOTOLOGY_USES_GZ:BOOL=OFF .

- name: Disable MuJoCo for other distros released before 2022 [Docker ubuntu:focal and debian:bullseye]
- name: Disable MuJoCo and gz-sim for distros released before 2022 [Docker ubuntu:focal and debian:bullseye]
if: (matrix.docker_image == 'ubuntu:focal' || matrix.docker_image == 'debian:bullseye')
run: |
cd build
cmake -DROBOTOLOGY_USES_MUJOCO:BOOL=OFF .
cmake -DROBOTOLOGY_USES_MUJOCO:BOOL=OFF -DROBOTOLOGY_USES_GZ:BOOL=OFF .

- name: Disable Gazebo Classic support for distro without Gazebo Classic binaries [Docker ubuntu:24.04]
if: (matrix.docker_image == 'ubuntu:24.04')
run: |
cd build
cmake -DROBOTOLOGY_USES_GAZEBO:BOOL=OFF .
cmake -DROBOTOLOGY_USES_GAZEBO:BOOL=OFF -DROBOTOLOGY_USES_GZ:BOOL=OFF .

- name: Build [Docker]
run: |
Expand Down Expand Up @@ -408,7 +408,7 @@ jobs:
run: |
cd ${ROBOTOLOGY_SUPERBUILD_SOURCE_DIR}
cd build
cmake -DROBOTOLOGY_USES_MUJOCO:BOOL=OFF .
cmake -DROBOTOLOGY_USES_MUJOCO:BOOL=OFF -DROBOTOLOGY_USES_GZ:BOOL=OFF .

- name: Build [Ubuntu]
if: contains(matrix.os, 'ubuntu')
Expand Down
13 changes: 10 additions & 3 deletions doc/cmake-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,21 +91,23 @@ Not all options are supported on all platforms. The following table provides a r
| `ROBOTOLOGY_ENABLE_EVENT_DRIVEN` | ✔️ | ❌ | ✔️ | ❌ | ❌ |
| `ROBOTOLOGY_ENABLE_GRASPING` | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
| `ROBOTOLOGY_USES_GAZEBO` | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
| `ROBOTOLOGY_USES_GZ_SIM` | ✔️ | ❌ | ✔️ | ✔️ | ✔️ |
| `ROBOTOLOGY_USES_GZ_SIM`<sup id="a3">[3!](#f3)</sup> | ✔️ | ❌ | ✔️ | ✔️ | ✔️ |
| `ROBOTOLOGY_USES_MUJOCO`<sup id="a1">[1!](#f1)</sup> | ✔️ | ❌ | ✔️ | ✔️ | ✔️ |
| `ROBOTOLOGY_USES_PCL_AND_VTK` | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
| `ROBOTOLOGY_USES_IGNITION` | ❌ | ❌ | ✔️ | ❌ | ❌ |
| `ROBOTOLOGY_USES_MATLAB` | ✔️ | ❌ | ✔️ | ✔️ | ✔️ |
| `ROBOTOLOGY_USES_OCTAVE`<sup id="a3">[3!](#f3)</sup> | ✔️ | ❌ | ❌ | ) ❌ | ❌ |
| `ROBOTOLOGY_USES_OCTAVE`<sup id="a4">[4!](#f4)</sup> | ✔️ | ❌ | ❌ | ) ❌ | ❌ |
| `ROBOTOLOGY_USES_PYTHON` | ✔️ | ❌ | ✔️ | ✔️ | ✔️ |
| `ROBOTOLOGY_USES_CFW2CAN` | ✔️ | ❌ | ✔️ | ❌ | ❌ |
| `ROBOTOLOGY_USES_XSENS_MVN_SDK` | ❌ | ✔️ | ❌ | ❌ | ❌ |
| `ROBOTOLOGY_USES_ESDCAN` | ❌ | ✔️ | ❌ | ❌ | ✔️ |


<b id="f1">1!</b>:`ROBOTOLOGY_USES_MUJOCO` does not support building with apt dependencies on Debian or Ubuntu distributions older than 2022. Furthermore, it does not support build on Windows with Visual Studio 2019, it requires Visual Studio 2022.

<b id="f2">2!</b>:`ROBOTOLOGY_ENABLE_ROBOT_TESTING` and `ROBOTOLOGY_ENABLE_ICUB_HEAD` do not support building with conda-forge dependencies on Apple Silicon.
<b id="f3">3!</b>:`ROBOTOLOGY_USES_OCTAVE` do not support building with apt dependencies on Ubuntu 20.04.
<b id="f3">3!</b>:`ROBOTOLOGY_USES_GZ_SIM` with apt dependencies do not support building on Debian distros (only Ubuntu is supported). At the moment Ubuntu 24.04 apt packages are not available (https://github.com/gazebosim/gz-sim/issues/2390#issuecomment-2096728527). Furthermore it does not run on Windows (https://github.com/gazebosim/gz-sim/issues/2089) and have known problems on macOS (https://github.com/robotology/gz-sim-yarp-plugins/issues/90).
traversaro marked this conversation as resolved.
Show resolved Hide resolved
<b id="f4">4!</b>:`ROBOTOLOGY_USES_OCTAVE` do not support building with apt dependencies on Ubuntu 20.04.
traversaro marked this conversation as resolved.
Show resolved Hide resolved


Profile-specific documentation
Expand Down Expand Up @@ -206,6 +208,11 @@ Follow the steps in https://github.com/robotology/icub-models#use-the-models-wi

Support for this dependency is enabled by the `ROBOTOLOGY_USES_GZ_SIM` CMake option, that enables the software that depends on "Modern Gazebo" (gz-sim).

> [!IMPORTANT]
> At the moment the `ROBOTOLOGY_USES_GZ_SIM` does not run on Windows (https://github.com/gazebosim/gz-sim/issues/2089) and have known problems on macOS (https://github.com/robotology/gz-sim-yarp-plugins/issues/90). Furthermore, it is not supported on non-Ubuntu Debian distributions with apt dependencies.



## MuJoCo

Support for this dependency is enabled by the `ROBOTOLOGY_USES_MUJOCO` CMake option, that enables the software that depends on MuJoCo. Note that differently from other `ROBOTOLOGY_USES_<..>` options, in this case the main dependency (MuJoCo) is compiled by the superbuild.
Expand Down
Loading