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 ROBOTOLOGY_USES_ROS2 and ROBOTOLOGY_USES_MOVEIT options #1746

Merged
merged 20 commits into from
Dec 3, 2024
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
37 changes: 33 additions & 4 deletions .github/workflows/pixi-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,32 @@ on:

jobs:
build-with-pixi:
name: '[pixi:${{ matrix.os }}]'
name: '[pixi:${{ matrix.os }}@task:${{ matrix.pixi_task }}]'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
build_type: [Release]
os: [ubuntu-22.04, macos-13, macos-14, windows-2019]

pixi_task: [build-all, build-ros2, build-ros2moveit]
exclude:
# ros is not supported on osx-arm64 (incompatibility with gz-sim8)
- os: macos-14
pixi_task: build-ros2
# We already test linux-64 and ros2 in build-all-ros2moveit
- os: ubuntu-22.04
pixi_task: build-ros2
# Windows build fail due to length of build folder
# See https://github.com/robotology/robotology-superbuild/pull/1746#issuecomment-2514352629
- os: windows-2019
pixi_task: build-ros2
# moveit is only supported on Linux for now (missing required package in robostack)
- os: macos-13
pixi_task: build-ros2moveit
- os: macos-14
pixi_task: build-ros2moveit
- os: windows-2019
pixi_task: build-ros2moveit
steps:
- uses: actions/checkout@v4

Expand All @@ -41,7 +59,8 @@ jobs:

- uses: prefix-dev/[email protected]

- name: Build
- name: Workaround on Windows
if: contains(matrix.os, 'windows')
shell: bash
run: |
# Avoid YCM complaining that the git user is not set
Expand All @@ -52,4 +71,14 @@ jobs:
# needs to be called before calling pixi run build-all, so
# we explicitly call pixi run configure-all
pixi run configure-all
pixi run build-all
# Workaround for build-ros2 builds
pixi run configure-ros2

- name: Build
shell: bash
run: |
# Avoid YCM complaining that the git user is not set
# Eventually we could consider removing that check in YCM
git config --global user.name PixiGHA User
git config --global user.email [email protected]
pixi run ${{ matrix.pixi_task }}
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ CTestTestfile.cmake
# pixi environments
.pixi
*.egg-info
# build directory used by pixi
/.build/
# build directories used by pixi
/.build*/
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,18 @@ To install Modern Gazebo (gz-sim) on Ubuntu Jammy (22.04) and Noble (24.04) and
sudo apt-get install libcli11-dev
~~~

#### `ROBOTOLOGY_USES_ROS2`

To install ROS 2 on Ubuntu Jammy (22.04) or Noble (24.04) with apt packages, follow the official instructions:
* Ubuntu 22.04 / ROS 2 Humble : https://docs.ros.org/en/humble/Installation/Ubuntu-Install-Debs.html
* Ubuntu 24.04 / ROS 2 Jazzy : https://docs.ros.org/en/jazzy/Installation/Ubuntu-Install-Debs.html

#### `ROBOTOLOGY_USES_MOVEIT`

To install MoveIt! on Ubuntu Jammy (22.04) or Noble (24.04) with apt packages, follow the instructions to enable the `ROBOTOLOGY_USES_ROS2` option, and then install the additional packages:
* Ubuntu 22.04 / ROS 2 Humble : `sudo apt install ros-humble-moveit`
* Ubuntu 24.04 / ROS 2 Jazzy : `sudo apt install ros-jazzy-moveit`

#### `ROBOTOLOGY_USES_PYTHON`

Install Python and the necessary development files using the following command:
Expand Down
22 changes: 22 additions & 0 deletions cmake/Buildxcub-moveit2.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright (C) Fondazione Istituto Italiano di Tecnologia
# CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT

include(YCMEPHelper)
include(FindOrBuildPackage)

find_or_build_package(YARP QUIET)
find_or_build_package(yarp-devices-ros2 QUIET)


ycm_ep_helper(xcub-moveit2 TYPE GIT
STYLE GITHUB
REPOSITORY icub-tech-iit/xcub-moveit2.git
TAG master
COMPONENT core
FOLDER src
DEPENDS YARP yarp-devices-ros2
# This is because xcub-moveit2 is a ros-style repository
# composed by multiple CMake projects, for compatibility with CMake
# we added an all_packages folder with CMakeLists.txt that add each
# subfolder with add_subdirectory
SOURCE_SUBDIR xcub_moveit_all_packages)
16 changes: 16 additions & 0 deletions cmake/Buildyarp-devices-ros2.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright (C) Fondazione Istituto Italiano di Tecnologia
# CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT

include(YCMEPHelper)
include(FindOrBuildPackage)

find_or_build_package(YCM QUIET)
find_or_build_package(YARP QUIET)

ycm_ep_helper(yarp-devices-ros2 TYPE GIT
STYLE GITHUB
REPOSITORY robotology/yarp-devices-ros2.git
TAG master
COMPONENT core
FOLDER src
DEPENDS YCM YARP)
6 changes: 6 additions & 0 deletions cmake/RobotologySuperbuildLogic.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,12 @@ if(ROBOTOLOGY_ENABLE_CORE)
if(ROBOTOLOGY_USES_MATLAB OR ROBOTOLOGY_USES_OCTAVE)
find_or_build_package(yarp-matlab-bindings)
endif()
if(ROBOTOLOGY_USES_ROS2)
find_or_build_package(yarp-devices-ros2)
endif()
if(ROBOTOLOGY_USES_MOVEIT)
find_or_build_package(xcub-moveit2)
endif()
endif()

# Robot Testing
Expand Down
2 changes: 2 additions & 0 deletions cmake/RobotologySuperbuildOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ else()
endif()
option(ROBOTOLOGY_USES_GAZEBO "Enable compilation of software that depends on Gazebo Classic" ${ROBOTOLOGY_USES_GAZEBO_DEFAULT})
option(ROBOTOLOGY_USES_PCL_AND_VTK "Enable compilation of software that depends on PCL and VTK" OFF)
option(ROBOTOLOGY_USES_ROS2 "Enable compilation of software that depends on ROS 2" OFF)
option(ROBOTOLOGY_USES_MOVEIT "Enable compilation of software that depends on MoveIt" OFF)
option(ROBOTOLOGY_USES_MUJOCO "Enable compilation of mujoco and software that depends on it" OFF)

## Enable packages that depend on the Modern Gazebo (gz-sim) simulator
Expand Down
21 changes: 21 additions & 0 deletions doc/cmake-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ Table of Contents
* [Dependencies-specific documentation](#dependencies-specific-documentation)
* [Gazebo Classic simulator](#gazebo-classic-simulator)
* [Modern Gazebo simulator](#modern-gazebo-simulator)
* [ROS 2](#ros-2)
* [MoveIt](#moveit)
* [MuJoCo simulator](#mujoco)
* [Ignition](#ignition)
* [MATLAB](#matlab)
Expand Down Expand Up @@ -64,6 +66,8 @@ The dependencies CMake options specify if the packages dependending on something
|:------------:|:-----------:|:-------------:|:---------------------------------:|
| `ROBOTOLOGY_USES_GAZEBO` | Include software and plugins that depend on the [Gazebo Classic simulator](https://classic.gazebosim.org/). | `ON` | [Documentation on Gazebo Classic dependency.](#gazebo-classic-simulator) |
| `ROBOTOLOGY_USES_GZ` | Include software and plugins that depend on the [Modern Gazebo (gz-sim) simulator](http://gazebosim.org/). | `OFF` | [Documentation on Modern Gazebo (gz-sim) dependency.](#modern-gazebo-simulator) |
| `ROBOTOLOGY_USES_ROS2` | Include software and plugins that depend on [ROS 2](https://www.ros.org/). | `OFF` | [Documentation on ROS 2 dependency.](#ros-2) |
| `ROBOTOLOGY_USES_MOVEIT` | Include software and plugins that depend on the [MoveIt motion planning framework](https://moveit.ai/). | `OFF` | [Documentation on MoveIt dependency.](#moveit) |
| `ROBOTOLOGY_USES_MUJOCO` | Include software and plugins that depend on the [MuJoCo simulator](https://mujoco.org/). | `ON` | [Documentation on MuJoCo dependency.](#mujoco) |
| `ROBOTOLOGY_USES_PCL_AND_VTK` | Include software and plugins that depend on the [PCL](https://pointclouds.org/) or [VTK](https://vtk.org/). | `OFF` | [Documentation on PCL and VTK dependency.](#pcl_and_vtk) |
| `ROBOTOLOGY_USES_IGNITION` | Include software that depends on [Ignition](ignitionrobotics.org/). | `OFF` | [Documentation on Ignition Gazebo dependency.](#ignition) |
Expand Down Expand Up @@ -94,6 +98,8 @@ Not all options are supported on all platforms. The following table provides a r
| `ROBOTOLOGY_USES_GZ`<sup id="a3">[3!](#f3)</sup> | ✔️ | ❌ | ✔️ | ✔️ | ✔️ |
| `ROBOTOLOGY_USES_MUJOCO`<sup id="a1">[1!](#f1)</sup> | ✔️ | ❌ | ✔️ | ✔️ | ✔️ |
| `ROBOTOLOGY_USES_PCL_AND_VTK` | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
| `ROBOTOLOGY_USES_ROS2` | ✔️ | ❌ | ✔️ | ✔️ | ✔️ |
| `ROBOTOLOGY_USES_MOVEIT` | ✔️ | ❌ | ✔️ | ❌ | ❌ |
| `ROBOTOLOGY_USES_IGNITION` | ❌ | ❌ | ✔️ | ❌ | ❌ |
| `ROBOTOLOGY_USES_MATLAB` | ✔️ | ❌ | ✔️ | ✔️ | ✔️ |
| `ROBOTOLOGY_USES_OCTAVE`<sup id="a4">[4!](#f4)</sup> | ✔️ | ❌ | ❌ | ) ❌ | ❌ |
Expand Down Expand Up @@ -204,6 +210,7 @@ Dependencies-specific documentation
Support for this dependency is enabled by the `ROBOTOLOGY_USES_GAZEBO` CMake option, that enables the software that depends on "Classic Gazebo".

### Check the installation

Follow the steps in https://github.com/robotology/icub-models#use-the-models-with-gazebo to check if the Gazebo-based iCub simulation works fine.

## Modern Gazebo simulator
Expand All @@ -213,6 +220,20 @@ Support for this dependency is enabled by the `ROBOTOLOGY_USES_GZ` CMake option,
> [!IMPORTANT]
> At the moment the `ROBOTOLOGY_USES_GZ` 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.

## ROS 2

This option enables the compilation of the [`yarp-devices-ros2` repo](https://github.com/robotology/yarp-devices-ros2).

> [!WARNING]
> No conda binaries are available for the `yarp-devices-ros2` package at the moment, neither in `conda-forge` nor the `robotology` channel.


## MoveIt

This option enables the compilation of the [`xcub-moveit2` repo](https://github.com/icub-tech-iit/xcub-moveit2).

> [!WARNING]
> No conda binaries are available for the `xcub-moveit2` package at the moment, neither in `conda-forge` nor the `robotology` channel.


## MuJoCo
Expand Down
16 changes: 16 additions & 0 deletions doc/conda-forge.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,22 @@ If you install your dependencies with `conda`, just make sure to install the `gz
conda install -c conda-forge gz-sim8
~~~

#### `ROBOTOLOGY_USES_ROS2`

If you install your dependencies with `conda`, just make sure to install the required packages from the `robostack-staging` channel:

~~~
conda install -c conda-forge -c robostack-staging ros-humble-ros-base ros-humble-test-msgs
~~~

#### `ROBOTOLOGY_USES_MOVEIT`

If you install your dependencies with `conda`, just make sure to install the required packages from the `robostack-staging` channel:

~~~
conda install -c conda-forge -c robostack-staging ros-humble-moveit ros-humble-hardware-interface ros-humble-moveit-visual-tools ros-humble-gazebo-msgs ros-humble-controller-manager
~~~

### Clone the repo
To compile the `robotology-superbuild` code itself, you need to clone it, following the instructions in https://github.com/robotology/robotology-superbuild#clone-the-repo .

Expand Down
Loading
Loading