Skip to content

Add the possibility to display the arrows in MeshcatVizualizer #3565

Add the possibility to display the arrows in MeshcatVizualizer

Add the possibility to display the arrows in MeshcatVizualizer #3565

Workflow file for this run

name: C++ CI Workflow
on:
push:
pull_request:
schedule:
# * is a special character in YAML so you have to quote this string
# Execute a "nightly" build at 2 AM UTC
- cron: '0 2 * * *'
env:
YCM_TAG: v0.12.0
YARP_TAG: v3.4.1
ICUB_TAG: v1.17.0
jobs:
build-with-conda-dependencies:
name: '[conda:${{ matrix.os }}]'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
build_type: [Release]
os: [ubuntu-20.04, macos-latest, windows-2019]
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
miniforge-version: latest
channels: conda-forge,robotology
- name: Install files to enable compilation of mex files [Conda/Linux]
if: contains(matrix.os, 'ubuntu')
run: |
curl -L -O https://github.com/robotology/robotology-vcpkg-ports/releases/download/storage/msdk_R2020b_mexa64.zip
unzip msdk_R2020b_mexa64.zip
rm msdk_R2020b_mexa64.zip
echo "GHA_Matlab_ROOT_DIR=${GITHUB_WORKSPACE}/msdk_R2020b_mexa64" >> $GITHUB_ENV
echo "GHA_Matlab_MEX_EXTENSION=mexa64" >> $GITHUB_ENV
- name: Install files to enable compilation of mex files [Conda/macOS]
if: contains(matrix.os, 'macos')
run: |
curl -L -O https://github.com/robotology/robotology-vcpkg-ports/releases/download/storage/msdk_R2020a_mexmaci64.zip
unzip msdk_R2020a_mexmaci64.zip
rm msdk_R2020a_mexmaci64.zip
echo "GHA_Matlab_ROOT_DIR=${GITHUB_WORKSPACE}/msdk_R2020a_mexmaci64" >> $GITHUB_ENV
echo "GHA_Matlab_MEX_EXTENSION=mexmaci64" >> $GITHUB_ENV
- name: Install files to enable compilation of mex files [Conda/Windows]
if: contains(matrix.os, 'windows')
shell: bash
run: |
curl -L -O https://github.com/robotology/robotology-vcpkg-ports/releases/download/storage/msdk_R2020a_mexw64.zip
unzip msdk_R2020a_mexw64.zip
rm msdk_R2020a_mexw64.zip
echo "GHA_Matlab_ROOT_DIR=${GITHUB_WORKSPACE}/msdk_R2020a_mexw64" >> $GITHUB_ENV
echo "GHA_Matlab_MEX_EXTENSION=mexw64" >> $GITHUB_ENV
- name: Dependencies [Conda]
shell: bash -l {0}
run: |
# Workaround for https://github.com/conda-incubator/setup-miniconda/issues/186
conda config --remove channels defaults
# Compilation related dependencies
mamba install cmake compilers make ninja pkg-config
# Actual dependencies
mamba install eigen libxml2 assimp ipopt irrlicht swig pybind11 python numpy
# robotology dependencies
mamba install yarp icub-main osqp-eigen
# Additional dependencies useful only on Linux
- name: Dependencies [Conda/Linux]
if: contains(matrix.os, 'ubuntu')
shell: bash -l {0}
run: |
# Additional dependencies only useful on Linux
# See https://github.com/robotology/robotology-superbuild/issues/477
mamba install expat-cos6-x86_64 freeglut 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 mesa-libgl-cos6-x86_64 mesa-libgl-devel-cos6-x86_64
- name: Print used environment [Conda]
shell: bash -l {0}
run: |
mamba list
env
- name: Configure [Conda/Linux&macOS]
if: contains(matrix.os, 'macos') || contains(matrix.os, 'ubuntu')
shell: bash -l {0}
run: |
mkdir build
cd build
cmake -GNinja -DCMAKE_INSTALL_PREFIX=${CONDA_PREFIX} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DMATLAB_FIND_DEBUG:BOOL=ON -DIDYNTREE_USES_MATLAB:BOOL=ON -DMatlab_ROOT_DIR=${GHA_Matlab_ROOT_DIR} -DMatlab_MEX_EXTENSION:STRING=${GHA_Matlab_MEX_EXTENSION} -DIDYNTREE_DISABLE_MATLAB_TESTS:BOOL=ON -DIDYNTREE_COMPILE_TESTS:BOOL=ON -DIDYNTREE_USES_ASSIMP:BOOL=ON -DIDYNTREE_USES_IPOPT:BOOL=ON -DIDYNTREE_USES_IRRLICHT:BOOL=ON -DIDYNTREE_USES_YARP:BOOL=ON -DIDYNTREE_USES_ICUB_MAIN:BOOL=ON -DIDYNTREE_USES_OSQPEIGEN:BOOL=ON -DIDYNTREE_USES_PYTHON:BOOL=ON -DIDYNTREE_USES_PYTHON_PYBIND11:BOOL=ON ..
- name: Configure [Conda/Windows]
if: contains(matrix.os, 'windows')
shell: bash -l {0}
run: |
mkdir build
cd build
cmake -G"Visual Studio 16 2019" -DCMAKE_INSTALL_PREFIX=${CONDA_PREFIX}/Library -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DMATLAB_FIND_DEBUG:BOOL=ON -DIDYNTREE_USES_MATLAB:BOOL=ON -DMatlab_ROOT_DIR=${GHA_Matlab_ROOT_DIR} -DMatlab_MEX_EXTENSION:STRING=${GHA_Matlab_MEX_EXTENSION} -DIDYNTREE_DISABLE_MATLAB_TESTS:BOOL=ON -DIDYNTREE_COMPILE_TESTS:BOOL=ON -DIDYNTREE_USES_ASSIMP:BOOL=ON -DIDYNTREE_USES_IPOPT:BOOL=ON -DIDYNTREE_USES_IRRLICHT:BOOL=ON -DIDYNTREE_USES_YARP:BOOL=ON -DIDYNTREE_USES_ICUB_MAIN:BOOL=ON -DIDYNTREE_USES_OSQPEIGEN:BOOL=ON -DIDYNTREE_USES_PYTHON:BOOL=ON -DIDYNTREE_USES_PYTHON_PYBIND11:BOOL=ON ..
- name: Build [Conda]
shell: bash -l {0}
run: |
cd build
cmake --build . --config ${{ matrix.build_type }}
- name: Inspect libraries linked by iDynTreeMEX.mexa64 [Conda/Linux]
if: contains(matrix.os, 'ubuntu')
shell: bash -l {0}
run: |
cd build
ldd ./lib/iDynTreeMEX.mexa64
- name: Test [Conda/Linux&macOS]
if: contains(matrix.os, 'macos') || contains(matrix.os, 'ubuntu')
shell: bash -l {0}
run: |
cd build
# Visualizer tests excluded as a workaround for https://github.com/robotology/idyntree/issues/808
ctest --output-on-failure -C ${{ matrix.build_type }} -E "Visualizer|matlab" .
- name: Test [Conda/Windows]
if: contains(matrix.os, 'windows')
shell: bash -l {0}
run: |
cd build
# Visualizer tests excluded as a workaround for https://github.com/robotology/idyntree/issues/808
# Python tests excluded as a workaround for https://github.com/robotology/idyntree/issues/939
# InverseKinematics tests are excluded as a workaround for https://github.com/robotology/idyntree/issues/1019
# ConsistencyTestiKin tests are excluded as a workaround for https://github.com/robotology/idyntree/issues/1029
ctest --output-on-failure -C ${{ matrix.build_type }} -E "Visualizer|matlab|Python|pybind|InverseKinematics|ConsistencyTestiKin" .
- name: Install [Conda]
shell: bash -l {0}
run: |
cd build
cmake --install . --config ${{ matrix.build_type }}
- name: Test standalone installation of MATLAB bindings [Conda/Linux&macOS]
if: contains(matrix.os, 'macos') || contains(matrix.os, 'ubuntu')
shell: bash -l {0}
run: |
cd bindings
mkdir build
cd build
cmake -GNinja -DCMAKE_INSTALL_PREFIX=${CONDA_PREFIX}/idyntree_bindings_install_test -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DMATLAB_FIND_DEBUG:BOOL=ON -DIDYNTREE_USES_MATLAB:BOOL=ON -DMatlab_ROOT_DIR=${GHA_Matlab_ROOT_DIR} -DMatlab_MEX_EXTENSION:STRING=${GHA_Matlab_MEX_EXTENSION} -DIDYNTREE_DISABLE_MATLAB_TESTS:BOOL=ON ..
cmake --build . --config ${{ matrix.build_type }}
cmake --install . --config ${{ matrix.build_type }}
- name: Test standalone installation of MATLAB bindings [Conda/Windows]
if: contains(matrix.os, 'windows')
shell: bash -l {0}
run: |
cd bindings
mkdir build
cd build
cmake -G"Visual Studio 16 2019" -DCMAKE_INSTALL_PREFIX=${CONDA_PREFIX}/Library/idyntree_bindings_install_test -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DMATLAB_FIND_DEBUG:BOOL=ON -DIDYNTREE_USES_MATLAB:BOOL=ON -DMatlab_ROOT_DIR=${GHA_Matlab_ROOT_DIR} -DMatlab_MEX_EXTENSION:STRING=${GHA_Matlab_MEX_EXTENSION} -DIDYNTREE_DISABLE_MATLAB_TESTS:BOOL=ON ..
cmake --build . --config ${{ matrix.build_type }}
cmake --install . --config ${{ matrix.build_type }}
build-with-system-dependencies:
name: '[${{ matrix.os }}@${{ matrix.build_type }}]'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
build_type: [Release]
os: [ubuntu-18.04, ubuntu-20.04, macOS-latest]
steps:
- uses: actions/checkout@master
- name: Install files to enable compilation of mex files [Linux]
if: contains(matrix.os, 'ubuntu')
run: |
curl -L -O https://github.com/robotology/robotology-vcpkg-ports/releases/download/storage/msdk_R2020b_mexa64.zip
unzip msdk_R2020b_mexa64.zip
rm msdk_R2020b_mexa64.zip
echo "GHA_Matlab_ROOT_DIR=${GITHUB_WORKSPACE}/msdk_R2020b_mexa64" >> $GITHUB_ENV
echo "GHA_Matlab_MEX_EXTENSION=mexa64" >> $GITHUB_ENV
- name: Install files to enable compilation of mex files [macOS]
if: contains(matrix.os, 'macos')
run: |
curl -L -O https://github.com/robotology/robotology-vcpkg-ports/releases/download/storage/msdk_R2020a_mexmaci64.zip
unzip msdk_R2020a_mexmaci64.zip
rm msdk_R2020a_mexmaci64.zip
echo "GHA_Matlab_ROOT_DIR=${GITHUB_WORKSPACE}/msdk_R2020a_mexmaci64" >> $GITHUB_ENV
echo "GHA_Matlab_MEX_EXTENSION=mexmaci64" >> $GITHUB_ENV
- name: Install files to enable compilation of mex files [Windows]
if: contains(matrix.os, 'windows')
shell: bash
run: |
curl -L -O https://github.com/robotology/robotology-vcpkg-ports/releases/download/storage/msdk_R2020a_mexw64.zip
unzip msdk_R2020a_mexw64.zip
rm msdk_R2020a_mexw64.zip
echo "GHA_Matlab_ROOT_DIR=${GITHUB_WORKSPACE}/msdk_R2020a_mexw64" >> $GITHUB_ENV
echo "GHA_Matlab_MEX_EXTENSION=mexw64" >> $GITHUB_ENV
# Print environment variables to simplify development and debugging
- name: Environment Variables
shell: bash
run: env
# Remove apt repos that are known to break from time to time
# See https://github.com/actions/virtual-environments/issues/323
- name: Remove broken apt repos [Ubuntu]
if: contains(matrix.os, 'ubuntu')
run: |
for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done
# ============
# DEPENDENCIES
# ============
- name: Dependencies [macOS]
if: matrix.os == 'macOS-latest'
run: |
brew install ace assimp boost eigen ipopt irrlicht swig
- name: Dependencies [Ubuntu]
if: contains(matrix.os, 'ubuntu')
run: |
sudo apt-get update
sudo apt-get install \
git build-essential cmake libace-dev coinor-libipopt-dev libeigen3-dev swig \
libxml2-dev liboctave-dev python-dev python3-numpy valgrind libassimp-dev libirrlicht-dev
- name: Source-based Dependencies [Ubuntu/macOS]
if: steps.cache-source-deps.outputs.cache-hit != 'true' && (contains(matrix.os, 'ubuntu') || matrix.os == 'macOS-latest')
shell: bash
run: |
# YCM
git clone -b ${YCM_TAG} https://github.com/robotology/ycm
cd ycm
mkdir -p build
cd build
cmake -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/install/deps ..
cmake --build . --config ${{ matrix.build_type }} --target install
# YARP
git clone -b ${YARP_TAG} https://github.com/robotology/yarp
cd yarp
mkdir -p build
cd build
cmake -DCMAKE_PREFIX_PATH=${GITHUB_WORKSPACE}/install/deps -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/install/deps ..
cmake --build . --config ${{ matrix.build_type }} --target install
# ICUB
git clone -b ${ICUB_TAG} https://github.com/robotology/icub-main
cd icub-main
mkdir -p build
cd build
cmake -DCMAKE_PREFIX_PATH=${GITHUB_WORKSPACE}/install/deps -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/install/deps ..
cmake --build . --config ${{ matrix.build_type }} --target install
- name: Dependencies (workaround for portaudio YCM problem) [macOS]
if: matrix.os == 'macOS-latest'
run: |
brew install octave
# ===================
# CMAKE-BASED PROJECT
# ===================
- name: Configure [Ubuntu/macOS]
if: contains(matrix.os, 'ubuntu') || matrix.os == 'macOS-latest'
shell: bash
run: |
mkdir -p build
cd build
cmake -DCMAKE_PREFIX_PATH=${GITHUB_WORKSPACE}/install/deps -DIDYNTREE_COMPILE_TESTS:BOOL=ON -DIDYNTREE_USES_YARP:BOOL=ON \
-DIDYNTREE_USES_ICUB_MAIN:BOOL=ON -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DIDYNTREE_USES_ASSIMP:BOOL=ON \
-DIDYNTREE_USES_MATLAB:BOOL=ON -DMatlab_ROOT_DIR=${GHA_Matlab_ROOT_DIR} -DMatlab_MEX_EXTENSION:STRING=${GHA_Matlab_MEX_EXTENSION} -DIDYNTREE_DISABLE_MATLAB_TESTS:BOOL=ON \
-DIDYNTREE_USES_IPOPT:BOOL=ON -DIDYNTREE_USES_OCTAVE:BOOL=ON -DIDYNTREE_USES_IRRLICHT:BOOL=ON -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/install ..
- name: Enable additional Ubuntu options (Valgrind, Python) [Ubuntu]
if: contains(matrix.os, 'ubuntu')
run: |
cd build
# Assimp is disabled on Ubuntu as a workaround for https://github.com/robotology/idyntree/issues/663
cmake -DIDYNTREE_USES_PYTHON:BOOL=ON -DIDYNTREE_RUN_VALGRIND_TESTS:BOOL=ON .
# For some reason, Ubuntu 18.04 image in GitHub Actions contain OpenBLAS 0.3.5, that is affected by https://github.com/xianyi/OpenBLAS/issues/2003
# As a workaround, we test against the regular blas instead of openblas
sudo apt-get install libblas-dev libatlas-base-dev
sudo apt-get remove libopenblas-base
- name: Build
shell: bash
run: |
cd build
# Attempt of fix for using YARP idl generators (that link ACE) in Windows
# See https://github.com/robotology/idyntree/issues/569
export PATH=$PATH:${GITHUB_WORKSPACE}/install/bin:${VCPKG_INSTALLATION_ROOT}/installed/x64-windows/bin:${VCPKG_INSTALLATION_ROOT}/installed/x64-windows/debug/bin
cmake --build . --config ${{ matrix.build_type }}
- name: Test
shell: bash
run: |
cd build
# Visualizer tests excluded as a workaround for https://github.com/robotology/idyntree/issues/808
ctest --output-on-failure -C ${{ matrix.build_type }} -E "Visualizer|matlab" .
- name: Install [Ubuntu/macOS]
if: contains(matrix.os, 'ubuntu') || matrix.os == 'macOS-latest'
shell: bash
run: |
cd build
cmake --build . --config ${{ matrix.build_type }} --target install
- name: Compile Examples [Ubuntu/macOS]
if: contains(matrix.os, 'ubuntu') || matrix.os == 'macOS-latest'
shell: bash
run: |
cd examples
mkdir -p build
cd build
cmake -DCMAKE_PREFIX_PATH="${GITHUB_WORKSPACE}/install/deps;${GITHUB_WORKSPACE}/install" ..
cmake --build . --config ${{ matrix.build_type }}
- name: Check build if some dependencies are not enabled [Ubuntu]
if: contains(matrix.os, 'ubuntu')
shell: bash
run: |
cd build
for missing_dep in ASSIMP IPOPT; do
echo "Testing ${missing_dep} as missing dependency."
# Deselect missing dependency and build
cmake -DIDYNTREE_USES_${missing_dep}:BOOL=OFF .
cmake --build . --config ${{ matrix.build_type }}
# Enable again dependency
cmake -DIDYNTREE_USES_${missing_dep}:BOOL=ON .
done