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 yarp-ros repo with Unstable branches and compile again against YARP master in Unstable branches #1547

Merged
merged 38 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
2f652a8
Add yarp-ros repo with Unstable branches
traversaro Nov 27, 2023
bfbb406
Fix
traversaro Nov 27, 2023
3dc8776
Update ProjectsTagsUnstable.cmake
traversaro Feb 29, 2024
4336b96
Merge branch 'master' into addyarpros
traversaro Feb 29, 2024
6f471ba
Drop support for Debian Buster 10 when compiling with apt dependencies
traversaro Feb 29, 2024
aa021d1
Switch to use CMake from Kitware repo for Ubuntu 20.04
traversaro Feb 29, 2024
5338a5e
Update ci.yml
traversaro Feb 29, 2024
2fb1a94
Update ci.yml
traversaro Feb 29, 2024
712a0a1
Update ci.yml
traversaro Feb 29, 2024
7f827de
Merge branch 'master' into addyarpros
traversaro Apr 2, 2024
e018cc4
merge master in addyarpros
traversaro Jul 30, 2024
550c33b
Create Buildyarp-ros-devices.cmake
traversaro Jul 30, 2024
a758cdd
Add ROBOTOLOGY_SUPERBUILD_BUILD_SEPARATE_YARP_ROS option
traversaro Jul 30, 2024
6acf91e
Delete cmake/Buildyarp-ros-devices.cmake
traversaro Jul 30, 2024
3ed7130
Update Buildyarp-devices-ros.cmake
traversaro Jul 30, 2024
1170061
Update ci.yml
traversaro Jul 30, 2024
6774235
Update ci.yml
traversaro Jul 30, 2024
7c3dbd5
Update install_debian.sh
traversaro Jul 30, 2024
c44c002
Update ci.yml
traversaro Jul 30, 2024
a94be9d
Update ci.yml
traversaro Jul 30, 2024
20f6d01
Update README.md
traversaro Jul 30, 2024
16fcbd7
Update ci.yml
traversaro Jul 30, 2024
4ce5993
Update README.md
traversaro Jul 30, 2024
e84a9f2
fixup
traversaro Jul 30, 2024
bba78d3
Update RobotologySuperbuildOptions.cmake
traversaro Jul 30, 2024
7d809d8
Update RobotologySuperbuildOptions.cmake
traversaro Jul 30, 2024
ad47361
fixup
traversaro Jul 30, 2024
b72b14d
Update Buildbipedal-locomotion-framework.cmake
traversaro Aug 9, 2024
51e420f
Merge branch 'master' into addyarpros
traversaro Sep 6, 2024
ce19622
Merge branch 'master' into addyarpros
traversaro Oct 10, 2024
9b6fe9d
Fix PATH definition for yarp-ros
traversaro Oct 10, 2024
60a89d6
Add back yarp-ros dependency in HDE
traversaro Oct 11, 2024
bf679e7
Fix vcpkg workaround for yarp-ros
traversaro Oct 29, 2024
1358f18
Source setup.sh before build in conda CI
traversaro Oct 29, 2024
b40e880
Document that the setup script needs to be called before running the …
traversaro Oct 29, 2024
74ffb85
Fix CI
traversaro Oct 29, 2024
18d5929
Update ci.yml
traversaro Oct 29, 2024
12638bd
Update README.md
traversaro Oct 30, 2024
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
51 changes: 28 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,10 @@ jobs:
# Using b instead of build as a temporary workaround to https://github.com/robotology/robotology-superbuild/issues/1542#issuecomment-1827682957
# Go back to build once https://github.com/robotology/yarp/pull/3057 is merged and released
cd b
# Make sure that (on Windows) YARP's dll are in the path in case some repos use a code generator
# in their build that uses YARP's dll
# https://github.com/robotology/robotology-superbuild/pull/1547#issuecomment-2278151057
source ./install/share/robotology-superbuild/setup.sh
cmake --build . --config ${{ matrix.build_type }}

# Skip on Apple Silicon https://github.com/robotology/robotology-superbuild/issues/1625
Expand All @@ -179,18 +183,17 @@ jobs:

docker-build:
name: '[docker:Tags:${{ matrix.project_tags }}@${{ matrix.docker_image }}@${{ matrix.build_type }}]'
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
build_type: [Debug]
cmake_generator:
- "Ninja"
docker_image:
- "ubuntu:focal"
- "ubuntu:jammy"
- "ubuntu:20.04"
- "ubuntu:22.04"
- "ubuntu:24.04"
- "debian:bullseye"

project_tags:
- Default
Expand Down Expand Up @@ -218,35 +221,29 @@ jobs:
rm -rf /host_usr_local/lib/android
rm -rf /host_usr_local/lib/node_modules

- name: Upgrade apt packages Debian Testing [Debian Testing]
if: matrix.docker_image == 'debian:testing'
run: |
# The Debian testing docker image is generated only
# once a month, so to actually test with the latest
# packages we need to manually upgrade the packages
apt-get -y upgrade

- name: Dependencies [Docker]
run: |
chmod +x ./.ci/install_debian.sh
bash ./.ci/install_debian.sh


- name: Install recent CMake [Docker/Ubuntu Focal]
if: matrix.docker_image == 'ubuntu:20.04'
run: |
apt-get -y update
apt-get install -y ca-certificates software-properties-common gpg wget
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null
echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ focal main' | tee /etc/apt/sources.list.d/kitware.list >/dev/null
apt-add-repository 'deb https://apt.kitware.com/ubuntu/ focal main'
apt-get install -y cmake

- name: Configure [Docker]
run: |
mkdir -p build
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 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 -DROBOTOLOGY_USES_GZ:BOOL=OFF .

- 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')
- name: Disable MuJoCo and gz-sim for distros released before 2022 [Docker ubuntu:20.04]
if: (matrix.docker_image == 'ubuntu:20.04')
run: |
cd build
cmake -DROBOTOLOGY_USES_MUJOCO:BOOL=OFF -DROBOTOLOGY_USES_GZ:BOOL=OFF .
Expand Down Expand Up @@ -403,8 +400,8 @@ jobs:
cmake -C ${ROBOTOLOGY_SUPERBUILD_SOURCE_DIR}/.ci/initial-cache.gh.cmake -A x64 -DCMAKE_TOOLCHAIN_FILE=C:/robotology/vcpkg/scripts/buildsystems/vcpkg.cmake -DROBOTOLOGY_USES_MATLAB:BOOL=OFF -DYCM_BOOTSTRAP_VERBOSE=ON -DYCM_EP_INSTALL_DIR=C:/robotology/robotology -DNON_INTERACTIVE_BUILD:BOOL=TRUE -DCMAKE_BUILD_TYPE=Debug ${{ matrix.project_tags_cmake_options }} ..
cmake -DROBOTOLOGY_ENABLE_TELEOPERATION:BOOL=OFF .

- name: Disable options unsupported on Ubuntu 20.04 and vcpkg
if: contains(matrix.os, '20.04') || contains(matrix.os, 'windows')
- name: Disable options unsupported on vcpkg
if: contains(matrix.os, 'windows')
shell: bash
run: |
cd ${ROBOTOLOGY_SUPERBUILD_SOURCE_DIR}
Expand All @@ -427,6 +424,10 @@ jobs:
cd build
# Make sure that vcpkg's ace .dll are on the PATH
source /c/robotology/scripts/setup-deps.sh
# Make sure that YARP's dll are in the path in case some repos use a code generator
# in their build that uses YARP's dll
# https://github.com/robotology/robotology-superbuild/pull/1547#issuecomment-2278151057
source /c/robotology/robotology/share/robotology-superbuild/setup.sh
cmake --build . --config Release
# Cleanup build directories to avoid to fill the disk
rm -rf ./robotology
Expand All @@ -439,6 +440,10 @@ jobs:
cd build
# Make sure that vcpkg's ace .dll are on the PATH
source /c/robotology/scripts/setup-deps.sh
# Make sure that YARP's dll are in the path in case some repos use a code generator
# in their build that uses YARP's dll
# https://github.com/robotology/robotology-superbuild/pull/1547#issuecomment-2278151057
source /c/robotology/robotology/share/robotology-superbuild/setup.sh
cmake --build . --config Debug
# Cleanup build directories to avoid to fill the disk
rm -rf ./robotology
Expand Down
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ We also support an additional deprecated way of compiling the superbuild, on Win
The following apt-based distributions are supported and tested by the robotology-superbuild:
* Ubuntu 20.04 (Focal Fossa)
* Ubuntu 22.04 (Jammy Jellyfish)
* Debian 11 (Bullseye)
* Ubuntu 24.04 (Noble Numbat)

Other versions may be working, but they are not checked.

Expand All @@ -117,10 +117,11 @@ sudo bash ./scripts/install_apt_dependencies.sh

Besides the packages listed in `apt.txt` file, the script `install_apt_dependencies.sh` also installs some other packages depending on the distribution used, please inspect the script for more information.

For what regards CMake, the robotology-superbuild requires CMake 3.16 . If you are using a recent Debian-based system such as Ubuntu 20.04, the default CMake is recent enough and you do not need to do further steps.
For what regards CMake, the robotology-superbuild requires CMake 3.19 . If you are using a recent Debian-based system such as Ubuntu 22.04, the default CMake is recent enough and you do not need to do further steps.

If instead you use an older distro in which the default version of CMake is older, you can easily install a newer CMake version in several ways. For the following distributions, we recommend the following methods:
* Ubuntu 20.04 : install a recent CMake via Kitware APT Repository, see https://apt.kitware.com/ .
* Ubuntu 20.04 "Focal" : install a recent CMake via Kitware APT Repository, see https://apt.kitware.com/ .


For some [profile](doc/cmake-options.md#profile-cmake-options) or [dependency](doc/cmake-options.md#dependencies-cmake-options) specific CMake option you may need to install additional system dependencies, following the dependency-specific documentation listed in the following. If you do not want to enable an option, you should ignore the corresponding section and continue with the installation process.

Expand All @@ -142,8 +143,7 @@ If you are on Ubuntu 24.04, please use conda if you want to install Gazebo Class

#### `ROBOTOLOGY_USES_GZ`

To install Modern Gazebo (gz-sim) on Ubuntu Jammy (22.04) and Noble (20.04) and other supported Debian/Ubuntu systems, follow the instructions available at https://gazebosim.org/docs/harmonic/install_ubuntu#binary-installation-on-ubuntu . Furthermore, you also need to install the `cli11` dependency with:

To install Modern Gazebo (gz-sim) on Ubuntu Jammy (22.04) and Noble (24.04) and other supported Debian/Ubuntu systems, follow the instructions available at https://gazebosim.org/docs/harmonic/install_ubuntu#binary-installation-on-ubuntu . Furthermore, you also need to install the `cli11` dependency with:
~~~
sudo apt-get install libcli11-dev
~~~
Expand Down Expand Up @@ -179,6 +179,7 @@ cd robotology-superbuild
mkdir build
cd build
ccmake ../
source ./install/share/robotology-superbuild.sh
make
```
You can configure the ccmake environment if you know you will use some particular set of software (put them in "ON").
Expand Down
8 changes: 7 additions & 1 deletion cmake/BuildHumanDynamicsEstimation.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ if(WIN32)
list(APPEND HDE_OPTIONAL_CMAKE_ARGS -DXSENS_MVN_USE_SDK:BOOL=${ROBOTOLOGY_USES_XSENS_MVN_SDK} -DENABLE_XsensSuit:BOOL=${ROBOTOLOGY_USES_XSENS_MVN_SDK} )
endif()

if(ROBOTOLOGY_BUILD_SEPARATE_YARP_ROS)
find_or_build_package(yarp-ros QUIET)
list(APPEND HumanDynamicsEstimation_OPTIONAL_DEPS yarp-ros)
endif()

ycm_ep_helper(HumanDynamicsEstimation TYPE GIT
STYLE GITHUB
REPOSITORY robotology/human-dynamics-estimation.git
Expand All @@ -43,7 +48,8 @@ ycm_ep_helper(HumanDynamicsEstimation TYPE GIT
osqp
OsqpEigen
ICUB
robometry)
robometry
${HumanDynamicsEstimation_OPTIONAL_DEPS})

set(HumanDynamicsEstimation_CONDA_PKG_NAME human-dynamics-estimation)
set(HumanDynamicsEstimation_CONDA_PKG_CONDA_FORGE_OVERRIDE ON)
5 changes: 5 additions & 0 deletions cmake/Buildbipedal-locomotion-framework.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ if (ROBOTOLOGY_ENABLE_DYNAMICS_FULL_DEPS)
endif()
endif()

if(ROBOTOLOGY_BUILD_SEPARATE_YARP_ROS)
find_or_build_package(yarp-ros QUIET)
list(APPEND bipedal-locomotion-framework_DEPENDS yarp-ros)
endif()

set(bipedal-locomotion-framework_OPTIONAL_CMAKE_ARGS "")
if(ROBOTOLOGY_USES_PYTHON)
list(APPEND bipedal-locomotion-framework_OPTIONAL_CMAKE_ARGS "-DFRAMEWORK_PYTHON_INSTALL_DIR:PATH=${ROBOTOLOGY_SUPERBUILD_PYTHON_INSTALL_DIR}")
Expand Down
10 changes: 9 additions & 1 deletion cmake/Buildblocktest-yarp-plugins.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ include(FindOrBuildPackage)
find_or_build_package(YARP QUIET)
find_or_build_package(blocktestcore QUIET)

set(blocktest-yarp-plugins_OPTIONAL_DEPS "")

if(ROBOTOLOGY_BUILD_SEPARATE_YARP_ROS)
find_or_build_package(yarp-ros QUIET)
list(APPEND blocktest-yarp-plugins_OPTIONAL_DEPS yarp-ros)
endif()

ycm_ep_helper(blocktest-yarp-plugins TYPE GIT
STYLE GITHUB
REPOSITORY robotology/blocktest-yarp-plugins.git
Expand All @@ -16,6 +23,7 @@ ycm_ep_helper(blocktest-yarp-plugins TYPE GIT
FOLDER src
DEPENDS YARP
blocktestcore
${blocktest-yarp-plugins_OPTIONAL_DEPS}
CMAKE_ARGS -DENABLE_MSVC_WARNINGS:BOOL=OFF)

set(blocktest-yarp-plugins_CONDA_DEPENDENCIES libboost-devel)
6 changes: 6 additions & 0 deletions cmake/Buildidyntree-yarp-tools.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ find_or_build_package(iDynTree QUIET)
find_or_build_package(YARP QUIET)
find_or_build_package(ICUB QUIET)

if(ROBOTOLOGY_BUILD_SEPARATE_YARP_ROS)
find_or_build_package(yarp-ros QUIET)
list(APPEND idyntree-yarp-tools_OPTIONAL_DEPS yarp-ros)
endif()

ycm_ep_helper(idyntree-yarp-tools TYPE GIT
STYLE GITHUB
REPOSITORY robotology/idyntree-yarp-tools.git
Expand All @@ -16,6 +21,7 @@ ycm_ep_helper(idyntree-yarp-tools TYPE GIT
DEPENDS iDynTree
YARP
ICUB
${idyntree-yarp-tools_OPTIONAL_DEPS}
CMAKE_ARGS -DIDYNTREE_YARP_TOOLS_USES_ICUB_MAIN:BOOL=ON
-DIDYNTREE_YARP_TOOLS_USES_QT:BOOL=ON
-DIDYNTREE_YARP_TOOLS_USES_QT_CHARTS:BOOL=OFF)
Expand Down
7 changes: 6 additions & 1 deletion cmake/Buildyarp-devices-ros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,15 @@ include(FindOrBuildPackage)

find_or_build_package(YARP QUIET)

if(ROBOTOLOGY_BUILD_SEPARATE_YARP_ROS)
find_or_build_package(yarp-ros QUIET)
list(APPEND YDR_OPTIONAL_DEPS yarp-ros)
endif()

ycm_ep_helper(yarp-devices-ros TYPE GIT
STYLE GITHUB
REPOSITORY robotology/yarp-devices-ros.git
TAG master
COMPONENT core
FOLDER src
DEPENDS YARP)
DEPENDS YARP ${YDR_OPTIONAL_DEPS})
16 changes: 16 additions & 0 deletions cmake/Buildyarp-ros.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright (C) 2023 Fondazione Istituto Italiano di Tecnologia
# Authors: Silvio Traversaro <silvio.traversaro@iit.it>
# CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT

include(YCMEPHelper)
include(FindOrBuildPackage)

find_or_build_package(YARP QUIET)

ycm_ep_helper(yarp-ros TYPE GIT
STYLE GITHUB
REPOSITORY robotology/yarp-ros.git
TAG master
COMPONENT core
FOLDER src
DEPENDS YARP)
2 changes: 0 additions & 2 deletions cmake/ProjectsTagsUnstable.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ set_tag(casadi_TAG 3.6.6)
set_tag(casadi-matlab-bindings_TAG v3.6.6.0)

# Robotology projects
set_tag(YARP_TAG yarp-3.9)
set_tag(yarp-matlab-bindings_TAG yarp-3.9)
set_tag(ICUB_TAG devel)
set_tag(RobotTestingFramework_TAG devel)
set_tag(blockTest_TAG devel)
Expand Down
5 changes: 4 additions & 1 deletion cmake/RobotologySuperbuildLogic.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ endif()
# Core
if(ROBOTOLOGY_ENABLE_CORE)
find_or_build_package(YARP)
if(ROBOTOLOGY_BUILD_SEPARATE_YARP_ROS)
find_or_build_package(yarp-ros)
endif()
find_or_build_package(yarp-devices-ros)
find_or_build_package(ICUB)
find_or_build_package(ICUBcontrib)
Expand Down Expand Up @@ -203,7 +206,7 @@ if(ROBOTOLOGY_ENABLE_R1_ROBOT)
find_or_build_package(cer)
endif()

# Dummy option used to only clone repos to update them
# Dummy option used to only clone repos to update them
# via update-latest-releases.yml GitHub Action
if(ROBOTOLOGY_INTERNAL_CLONE_ALL_REPOS_FOR_UPDATE)
find_or_build_package(icub-firmware)
Expand Down
11 changes: 10 additions & 1 deletion cmake/RobotologySuperbuildOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,20 @@ if(WIN32 AND DEFINED ENV{CONDA_PREFIX})
list(REMOVE_ITEM CMAKE_CONFIGURATION_TYPES "Debug")
endif()
endif()

set(ROBOTOLOGY_PROJECT_TAGS "Stable" CACHE STRING "The tags to be used for the robotology projects: Stable, Unstable, LatestRelease or Custom. This can be changed only before the first configuration.")
set(ROBOTOLOGY_PROJECT_TAGS_CUSTOM_FILE CACHE FILEPATH "If ROBOTOLOGY_PROJECT_TAGS is custom, this file will be loaded to specify the tags of the projects to use.")
set_property(CACHE ROBOTOLOGY_PROJECT_TAGS PROPERTY STRINGS "Stable" "Unstable" "LatestRelease" "Custom")


# For now, only YARP master (used in Unstable ROBOTOLOGY_PROJECT_TAGS) requires to have separate yarp-ros and yarp-ros-devices
# However, we keep ROBOTOLOGY_BUILD_SEPARATE_YARP_ROS as a user selectable option as some users could use ROBOTOLOGY_PROJECT_TAGS set to
# Stable or a given release, and manually change the YARP to a version that does not contain yarp-ros functionality
option(ROBOTOLOGY_BUILD_SEPARATE_YARP_ROS "If ON, build yarp-ros and yarp-ros-devices repository" OFF)
if(ROBOTOLOGY_PROJECT_TAGS STREQUAL "Unstable")
# If ROBOTOLOGY_PROJECT_TAGS is Unstable, force the value to be ON
set(ROBOTOLOGY_BUILD_SEPARATE_YARP_ROS ON CACHE BOOL "" FORCE)
endif()

if(ROBOTOLOGY_PROJECT_TAGS STREQUAL "Stable")
include(ProjectsTagsStable)
elseif(ROBOTOLOGY_PROJECT_TAGS STREQUAL "Unstable")
Expand Down
2 changes: 2 additions & 0 deletions doc/conda-forge.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ cd robotology-superbuild
mkdir build
cd build
cmake ..
source ./install/share/robotology-superbuild/setup.sh
cmake --build . --config Release
~~~

Expand All @@ -229,6 +230,7 @@ cd robotology-superbuild
mkdir build
cd build
cmake -G"Visual Studio 16 2019" ..
call .\install\share\robotology-superbuild\setup.bat
cmake --build . --config Release
~~~

Expand Down
Loading