diff --git a/.ci/all-options-enabled-cache.cmake b/.ci/all-options-enabled-cache.cmake index 6b89527eb..0856b315a 100644 --- a/.ci/all-options-enabled-cache.cmake +++ b/.ci/all-options-enabled-cache.cmake @@ -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 "") diff --git a/.ci/initial-cache.gh.cmake b/.ci/initial-cache.gh.cmake index 32d1e692f..4268c4d80 100644 --- a/.ci/initial-cache.gh.cmake +++ b/.ci/initial-cache.gh.cmake @@ -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 "") diff --git a/.ci/install_debian.sh b/.ci/install_debian.sh index b5fab6c21..600619a4d 100755 --- a/.ci/install_debian.sh +++ b/.ci/install_debian.sh @@ -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 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f89a05a4b..fe745e2d9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -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: | @@ -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') diff --git a/doc/cmake-options.md b/doc/cmake-options.md index e56ffea38..54a261bef 100644 --- a/doc/cmake-options.md +++ b/doc/cmake-options.md @@ -91,12 +91,12 @@ 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`[3!](#f3) | ✔️ | ❌ | ✔️ | ✔️ | ✔️ | | `ROBOTOLOGY_USES_MUJOCO`[1!](#f1) | ✔️ | ❌ | ✔️ | ✔️ | ✔️ | | `ROBOTOLOGY_USES_PCL_AND_VTK` | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | | `ROBOTOLOGY_USES_IGNITION` | ❌ | ❌ | ✔️ | ❌ | ❌ | | `ROBOTOLOGY_USES_MATLAB` | ✔️ | ❌ | ✔️ | ✔️ | ✔️ | -| `ROBOTOLOGY_USES_OCTAVE`[3!](#f3) | ✔️ | ❌ | ❌ | ) ❌ | ❌ | +| `ROBOTOLOGY_USES_OCTAVE`[4!](#f4) | ✔️ | ❌ | ❌ | ) ❌ | ❌ | | `ROBOTOLOGY_USES_PYTHON` | ✔️ | ❌ | ✔️ | ✔️ | ✔️ | | `ROBOTOLOGY_USES_CFW2CAN` | ✔️ | ❌ | ✔️ | ❌ | ❌ | | `ROBOTOLOGY_USES_XSENS_MVN_SDK` | ❌ | ✔️ | ❌ | ❌ | ❌ | @@ -104,8 +104,12 @@ Not all options are supported on all platforms. The following table provides a r 1!:`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. + 2!:`ROBOTOLOGY_ENABLE_ROBOT_TESTING` and `ROBOTOLOGY_ENABLE_ICUB_HEAD` do not support building with conda-forge dependencies on Apple Silicon. -3!:`ROBOTOLOGY_USES_OCTAVE` do not support building with apt dependencies on Ubuntu 20.04. + +3!:`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). + +4!:`ROBOTOLOGY_USES_OCTAVE` do not support building with apt dependencies on Ubuntu 20.04. Profile-specific documentation @@ -206,6 +210,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.