Skip to content

Commit

Permalink
Add bipedal-locomotion-framework (#526)
Browse files Browse the repository at this point in the history
  • Loading branch information
GiulioRomualdi authored Nov 26, 2020
1 parent dbfd6d6 commit b3e3833
Show file tree
Hide file tree
Showing 13 changed files with 180 additions and 9 deletions.
3 changes: 3 additions & 0 deletions .ci/install_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ apt-get install -y clang valgrind ccache ninja-build
# Core dependencies
apt-get install -y build-essential cmake cmake-curses-gui coinor-libipopt-dev freeglut3-dev git libace-dev libboost-filesystem-dev libboost-system-dev libboost-thread-dev libdc1394-22-dev libedit-dev libeigen3-dev libgsl0-dev libjpeg-dev liblua5.1-dev libode-dev libopencv-dev libsdl1.2-dev libtinyxml-dev libv4l-dev libxml2-dev lua5.1 portaudio19-dev qml-module-qt-labs-folderlistmodel qml-module-qt-labs-settings qml-module-qtmultimedia qml-module-qtquick-controls qml-module-qtquick-dialogs qml-module-qtquick-window2 qml-module-qtquick2 qtbase5-dev qtdeclarative5-dev qtmultimedia5-dev swig

# Dynamics dependencies
apt-get install -y libmatio-dev

# Python
apt-get install -y python3-dev python3-numpy

Expand Down
22 changes: 15 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
run: |
mkdir -p build
cd build
cmake -G"${{ matrix.cmake_generator }}" -DROBOTOLOGY_USES_GAZEBO:BOOL=ON -DROBOTOLOGY_USES_OCTAVE:BOOL=OFF -DROBOTOLOGY_USES_PYTHON:BOOL=OFF -DROBOTOLOGY_ENABLE_ROBOT_TESTING:BOOL=ON -DROBOTOLOGY_ENABLE_DYNAMICS:BOOL=ON -DROBOTOLOGY_ENABLE_HUMAN_DYNAMICS:BOOL=ON -DROBOTOLOGY_ENABLE_ICUB_HEAD:BOOL=OFF -DROBOTOLOGY_ENABLE_ICUB_BASIC_DEMOS:BOOL=ON -DROBOTOLOGY_ENABLE_TELEOPERATION:BOOL=ON -DROBOTOLOGY_ENABLE_EVENT_DRIVEN:BOOL=ON -DNON_INTERACTIVE_BUILD:BOOL=TRUE -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ${{ matrix.project_tags_cmake_options }} ..
cmake -G"${{ matrix.cmake_generator }}" -DROBOTOLOGY_USES_GAZEBO:BOOL=ON -DROBOTOLOGY_USES_OCTAVE:BOOL=OFF -DROBOTOLOGY_USES_PYTHON:BOOL=OFF -DROBOTOLOGY_ENABLE_ROBOT_TESTING:BOOL=ON -DROBOTOLOGY_ENABLE_DYNAMICS:BOOL=ON -DROBOTOLOGY_ENABLE_HUMAN_DYNAMICS:BOOL=ON -DROBOTOLOGY_ENABLE_ICUB_HEAD:BOOL=OFF -DROBOTOLOGY_ENABLE_ICUB_BASIC_DEMOS:BOOL=ON -DROBOTOLOGY_ENABLE_TELEOPERATION:BOOL=ON -DROBOTOLOGY_ENABLE_EVENT_DRIVEN:BOOL=ON -DNON_INTERACTIVE_BUILD:BOOL=TRUE -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ${{ matrix.project_tags_cmake_options }} ..
- name: Build [Conda]
shell: bash -l {0}
Expand Down Expand Up @@ -128,7 +128,13 @@ jobs:
cd build
# Octave is disabled as a workaround for https://github.com/robotology/robotology-superbuild/issues/384
# Python is disabled as a workaround for https://github.com/robotology/robotology-superbuild/issues/494
cmake -G"${{ matrix.cmake_generator }}" -DROBOTOLOGY_USES_GAZEBO:BOOL=ON -DROBOTOLOGY_USES_OCTAVE:BOOL=OFF -DROBOTOLOGY_USES_PYTHON:BOOL=OFF -DROBOTOLOGY_ENABLE_ROBOT_TESTING:BOOL=ON -DROBOTOLOGY_ENABLE_DYNAMICS:BOOL=ON -DROBOTOLOGY_ENABLE_HUMAN_DYNAMICS:BOOL=ON -DROBOTOLOGY_ENABLE_ICUB_HEAD:BOOL=ON -DROBOTOLOGY_ENABLE_ICUB_BASIC_DEMOS:BOOL=ON -DROBOTOLOGY_ENABLE_TELEOPERATION:BOOL=ON -DROBOTOLOGY_ENABLE_EVENT_DRIVEN:BOOL=ON -DNON_INTERACTIVE_BUILD:BOOL=TRUE -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ${{ matrix.project_tags_cmake_options }} ..
cmake -G"${{ matrix.cmake_generator }}" -DROBOTOLOGY_USES_GAZEBO:BOOL=ON -DROBOTOLOGY_USES_OCTAVE:BOOL=OFF -DROBOTOLOGY_USES_PYTHON:BOOL=OFF -DROBOTOLOGY_ENABLE_ROBOT_TESTING:BOOL=ON -DROBOTOLOGY_ENABLE_DYNAMICS:BOOL=ON -DROBOTOLOGY_ENABLE_DYNAMICS_FULL_DEPS:BOOL=ON -DROBOTOLOGY_ENABLE_HUMAN_DYNAMICS:BOOL=ON -DROBOTOLOGY_ENABLE_ICUB_HEAD:BOOL=ON -DROBOTOLOGY_ENABLE_ICUB_BASIC_DEMOS:BOOL=ON -DROBOTOLOGY_ENABLE_TELEOPERATION:BOOL=ON -DROBOTOLOGY_ENABLE_EVENT_DRIVEN:BOOL=ON -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-sid and debian-buster]
if: (matrix.docker_image == 'debian:sid' || matrix.docker_image == 'debian:buster-backports')
run: |
cd build
cmake -DROBOTOLOGY_ENABLE_DYNAMICS_FULL_DEPS:BOOL=OFF .
- name: Build [Docker]
run: |
Expand Down Expand Up @@ -225,9 +231,11 @@ jobs:
brew update
brew upgrade
# Core dependencies
brew install ace boost cmake eigen gsl ipopt jpeg libedit ninja opencv pkg-config portaudio qt5 sqlite swig tinyxml
brew install ace boost cmake eigen gsl ipopt jpeg libedit opencv pkg-config portaudio qt5 sqlite swig tinyxml
# ROBOTOLOGY_ENABLE_DYNAMICS dependencies
brew install libmatio
# ROBOTOLOGY_ENABLE_DYNAMICS_FULL_DEPS (qhull and cppad are installed with brew)
brew install cppad qhull
# ROBOTOLOGY_USES_GAZEBO dependencies
brew install osrf/simulation/gazebo11
# CI-specific dependencies
Expand Down Expand Up @@ -255,8 +263,8 @@ jobs:
shell: bash
run: |
mkdir -p build
cd build
cmake -G"${{ matrix.cmake_generator }}" -DYCM_BOOTSTRAP_VERBOSE=ON -DROBOTOLOGY_USES_GAZEBO:BOOL=ON -DROBOTOLOGY_USES_OCTAVE:BOOL=ON -DROBOTOLOGY_USES_PYTHON:BOOL=ON -DROBOTOLOGY_ENABLE_ROBOT_TESTING:BOOL=ON -DROBOTOLOGY_ENABLE_DYNAMICS:BOOL=ON -DROBOTOLOGY_ENABLE_HUMAN_DYNAMICS:BOOL=ON -DROBOTOLOGY_ENABLE_ICUB_HEAD:BOOL=ON -DROBOTOLOGY_ENABLE_ICUB_BASIC_DEMOS:BOOL=ON -DROBOTOLOGY_ENABLE_TELEOPERATION:BOOL=ON -DROBOTOLOGY_ENABLE_EVENT_DRIVEN:BOOL=ON -DNON_INTERACTIVE_BUILD:BOOL=TRUE -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ${{ matrix.project_tags_cmake_options }} ..
cd build
cmake -G"${{ matrix.cmake_generator }}" -DYCM_BOOTSTRAP_VERBOSE=ON -DROBOTOLOGY_USES_GAZEBO:BOOL=ON -DROBOTOLOGY_USES_OCTAVE:BOOL=ON -DROBOTOLOGY_USES_PYTHON:BOOL=ON -DROBOTOLOGY_ENABLE_ROBOT_TESTING:BOOL=ON -DROBOTOLOGY_ENABLE_DYNAMICS:BOOL=ON -DROBOTOLOGY_ENABLE_DYNAMICS_FULL_DEPS:BOOL=ON -DROBOTOLOGY_ENABLE_HUMAN_DYNAMICS:BOOL=ON -DROBOTOLOGY_ENABLE_ICUB_HEAD:BOOL=ON -DROBOTOLOGY_ENABLE_ICUB_BASIC_DEMOS:BOOL=ON -DROBOTOLOGY_ENABLE_TELEOPERATION:BOOL=ON -DROBOTOLOGY_ENABLE_EVENT_DRIVEN:BOOL=ON -DNON_INTERACTIVE_BUILD:BOOL=TRUE -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ${{ matrix.project_tags_cmake_options }} ..
- name: Disable macOS unsupported options
if: contains(matrix.os, 'macos')
Expand All @@ -273,8 +281,8 @@ jobs:
source /c/robotology/scripts/setup-deps.sh
mkdir -p build
cd build
# ROBOTOLOGY_ENABLE_TELEOPERATION is OFF as a workaround for https://github.com/robotology/robotology-superbuild/issues/472
cmake -A x64 -DCMAKE_TOOLCHAIN_FILE=C:/robotology/vcpkg/scripts/buildsystems/vcpkg.cmake -DYCM_BOOTSTRAP_VERBOSE=ON -DYCM_EP_INSTALL_DIR=C:/robotology/robotology -DROBOTOLOGY_USES_GAZEBO:BOOL=ON -DROBOTOLOGY_USES_OCTAVE:BOOL=OFF -DROBOTOLOGY_USES_PYTHON:BOOL=OFF -DROBOTOLOGY_USES_ESDCAN:BOOL=ON -DROBOTOLOGY_ENABLE_ROBOT_TESTING:BOOL=ON -DROBOTOLOGY_ENABLE_DYNAMICS:BOOL=ON -DROBOTOLOGY_ENABLE_HUMAN_DYNAMICS:BOOL=ON -DROBOTOLOGY_ENABLE_ICUB_HEAD:BOOL=ON -DROBOTOLOGY_ENABLE_ICUB_BASIC_DEMOS:BOOL=ON -DROBOTOLOGY_ENABLE_TELEOPERATION:BOOL=OFF -DROBOTOLOGY_ENABLE_EVENT_DRIVEN:BOOL=OFF -DNON_INTERACTIVE_BUILD:BOOL=TRUE -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ${{ matrix.project_tags_cmake_options }} ..
# ROBOTOLOGY_ENABLE_TELEOPERATION is OFF as a workaround for https://github.com/robotology/robotology-superbuild/issues/472
cmake -A x64 -DCMAKE_TOOLCHAIN_FILE=C:/robotology/vcpkg/scripts/buildsystems/vcpkg.cmake -DYCM_BOOTSTRAP_VERBOSE=ON -DYCM_EP_INSTALL_DIR=C:/robotology/robotology -DROBOTOLOGY_USES_GAZEBO:BOOL=ON -DROBOTOLOGY_USES_OCTAVE:BOOL=OFF -DROBOTOLOGY_USES_PYTHON:BOOL=OFF -DROBOTOLOGY_USES_ESDCAN:BOOL=ON -DROBOTOLOGY_ENABLE_ROBOT_TESTING:BOOL=ON -DROBOTOLOGY_ENABLE_DYNAMICS:BOOL=ON -DROBOTOLOGY_ENABLE_DYNAMICS_FULL_DEPS:BOOL=ON -DROBOTOLOGY_ENABLE_HUMAN_DYNAMICS:BOOL=ON -DROBOTOLOGY_ENABLE_ICUB_HEAD:BOOL=ON -DROBOTOLOGY_ENABLE_ICUB_BASIC_DEMOS:BOOL=ON -DROBOTOLOGY_ENABLE_TELEOPERATION:BOOL=OFF -DROBOTOLOGY_ENABLE_EVENT_DRIVEN:BOOL=OFF -DNON_INTERACTIVE_BUILD:BOOL=TRUE -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ${{ matrix.project_tags_cmake_options }} ..
- name: Build [Ubuntu&macOS]
Expand Down
17 changes: 16 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ option(ROBOTOLOGY_USES_CYBERITH_SDK "Enable compilation of software that depend
option(ROBOTOLOGY_ENABLE_CORE "Enable compilation of core software libraries." TRUE)
option(ROBOTOLOGY_ENABLE_ROBOT_TESTING "Enable compilation of software for robot testing." FALSE)
option(ROBOTOLOGY_ENABLE_DYNAMICS "Enable compilation of software for balancing and walking." FALSE)
option(ROBOTOLOGY_ENABLE_DYNAMICS_FULL_DEPS "Enable compilation of all the dependencies of bipedal-locomotion-framework." FALSE)
option(ROBOTOLOGY_ENABLE_TELEOPERATION "Enable compilation of software for teleoperation." FALSE)
option(ROBOTOLOGY_ENABLE_EVENT_DRIVEN "Enable compilation of software for event-driven." FALSE)
option(ROBOTOLOGY_ENABLE_ICUB_HEAD "Enable compilation of software necessary on the system running in the head of the iCub robot." FALSE)
Expand Down Expand Up @@ -161,9 +162,23 @@ if(ROBOTOLOGY_ENABLE_DYNAMICS)
find_or_build_package(walking-controllers)
find_or_build_package(whole-body-estimators)
find_or_build_package(whole-body-controllers)
find_or_build_package(matio-cpp)
find_or_build_package(bipedal-locomotion-framework)
if(ROBOTOLOGY_USES_GAZEBO)
find_or_build_package(icub-gazebo-wholebody)
endif()
endif()
endif()

if(ROBOTOLOGY_ENABLE_DYNAMICS_FULL_DEPS)
find_or_build_package(manif)
find_or_build_package(qhull)
find_or_build_package(casadi)

# cppad is currently disabled on windows
# https://github.com/robotology/robotology-superbuild-dependencies-vcpkg/pull/37
if(NOT WIN32)
find_or_build_package(CppAD)
endif()
endif()

# Teleoperation
Expand Down
12 changes: 12 additions & 0 deletions cmake/BuildCppAD.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Copyright (C) 2020 iCub Facility, Istituto Italiano di Tecnologia
# Authors: Giulio Romualdi <[email protected]>
# CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT

include(YCMEPHelper)

ycm_ep_helper(CppAD TYPE GIT
STYLE GITHUB
REPOSITORY coin-or/CppAD.git
TAG master
COMPONENT external
FOLDER external)
49 changes: 49 additions & 0 deletions cmake/Buildbipedal-locomotion-framework.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Copyright (C) 2020 iCub Facility, Istituto Italiano di Tecnologia
# Authors: Giulio Romualdi <[email protected]>
# 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(iDynTree QUIET)
find_or_build_package(matio-cpp QUIET)

set(bipedal-locomotion-framework_DEPENDS "")
list(APPEND bipedal-locomotion-framework_DEPENDS YARP)
list(APPEND bipedal-locomotion-framework_DEPENDS iDynTree)
list(APPEND bipedal-locomotion-framework_DEPENDS matio-cpp)

set(bipedal-locomotion-framework_USES_CppAD OFF)

if (ROBOTOLOGY_ENABLE_DYNAMICS_FULL_DEPS)
find_or_build_package(manif QUIET)
find_or_build_package(qhull QUIET)
find_or_build_package(casadi QUIET)

# cppad is currently disabled on windows
# https://github.com/robotology/robotology-superbuild-dependencies-vcpkg/pull/37
if(NOT WIN32)
find_or_build_package(CppAD)
list(APPEND bipedal-locomotion-framework_DEPENDS CppAD)
set(bipedal-locomotion-framework_USES_CppAD ON)
endif()

list(APPEND bipedal-locomotion-framework_DEPENDS manif)
list(APPEND bipedal-locomotion-framework_DEPENDS qhull)
list(APPEND bipedal-locomotion-framework_DEPENDS casadi)

endif()

ycm_ep_helper(bipedal-locomotion-framework TYPE GIT
STYLE GITHUB
REPOSITORY dic-iit/bipedal-locomotion-framework.git
TAG master
COMPONENT dynamics
FOLDER robotology
CMAKE_ARGS -DBUILD_TESTING:BOOL=OFF
-DFRAMEWORK_USE_manif:BOOL=${ROBOTOLOGY_ENABLE_DYNAMICS_FULL_DEPS}
-DFRAMEWORK_USE_Qhull:BOOL=${ROBOTOLOGY_ENABLE_DYNAMICS_FULL_DEPS}
-DFRAMEWORK_USE_cppad:BOOL=${bipedal-locomotion-framework_USES_CppAD}
-DFRAMEWORK_USE_casadi:BOOL=${ROBOTOLOGY_ENABLE_DYNAMICS_FULL_DEPS}
DEPENDS ${bipedal-locomotion-framework_DEPENDS})
23 changes: 23 additions & 0 deletions cmake/Buildcasadi.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright (C) 2020 iCub Facility, Istituto Italiano di Tecnologia
# Authors: Giulio Romualdi <[email protected]>
# CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT

include(YCMEPHelper)

include(FindOrBuildPackage)
find_or_build_package(osqp QUIET)

ycm_ep_helper(casadi TYPE GIT
STYLE GITHUB
REPOSITORY GiulioRomualdi/casadi.git
TAG feature/support_osqp_0.6.0
COMPONENT external
FOLDER external
CMAKE_ARGS -DWITH_IPOPT:BOOL=ON
-DWITH_OSQP:BOOL=ON
-DUSE_SYSTEM_WISE_OSQP:BOOL=ON
-DINCLUDE_PREFIX:PATH=include
-DCMAKE_PREFIX:PATH=lib/cmake/casadi
-DLIB_PREFIX:PATH=lib
-DBIN_PREFIX:PATH=bin
DEPENDS osqp)
13 changes: 13 additions & 0 deletions cmake/Buildmanif.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright (C) 2020 iCub Facility, Istituto Italiano di Tecnologia
# Authors: Giulio Romualdi <[email protected]>
# CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT

include(YCMEPHelper)

ycm_ep_helper(manif TYPE GIT
STYLE GITHUB
REPOSITORY artivis/manif.git
TAG master
COMPONENT external
FOLDER external
CMAKE_ARGS -DBUILD_TESTING:BOOL=OFF -DBUILD_EXAMPLES:BOOL=OFF)
12 changes: 12 additions & 0 deletions cmake/Buildmatio-cpp.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Copyright (C) 2020 iCub Facility, Istituto Italiano di Tecnologia
# Authors: Giulio Romualdi <[email protected]>
# CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT
include(YCMEPHelper)

ycm_ep_helper(matio-cpp TYPE GIT
STYLE GITHUB
REPOSITORY dic-iit/matio-cpp.git
TAG master
COMPONENT dynamics
FOLDER robotology
CMAKE_ARGS -DBUILD_TESTING:BOOL=OFF)
12 changes: 12 additions & 0 deletions cmake/Buildqhull.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Copyright (C) 2020 iCub Facility, Istituto Italiano di Tecnologia
# Authors: Giulio Romualdi <[email protected]>
# CopyPolicy: Released under the terms of the LGPLv2.1 or later, see LGPL.TXT

include(YCMEPHelper)

ycm_ep_helper(qhull TYPE GIT
STYLE GITHUB
REPOSITORY qhull/qhull.git
TAG master
COMPONENT external
CMAKE_ARGS -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON)
4 changes: 4 additions & 0 deletions cmake/ProjectsTagsStable.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ endmacro()

# External projects
set_tag(osqp_TAG v0.6.0)
set_tag(manif_TAG 44bdfebff0fbc56cb189f680212257dc7f20ea58)
set_tag(qhull_TAG v8.0.2)
set_tag(CppAD_TAG 20200000.3)
set_tag(casadi a26cd8ffba99052b74553eec1daeff640eea7e79)

# Robotology projects
set_tag(YCM_TAG ycm-0.12)
Expand Down
4 changes: 4 additions & 0 deletions cmake/ProjectsTagsUnstable.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ endmacro()

# External projects
set_tag(osqp_TAG v0.6.0)
set_tag(manif_TAG 44bdfebff0fbc56cb189f680212257dc7f20ea58)
set_tag(qhull_TAG v8.0.2)
set_tag(CppAD_TAG 20200000.3)
set_tag(casadi a26cd8ffba99052b74553eec1daeff640eea7e79)

# Robotology projects
set_tag(YARP_TAG master)
Expand Down
2 changes: 1 addition & 1 deletion doc/profiles.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ This profile is enabled by the `ROBOTOLOGY_ENABLE_DYNAMICS` CMake option.
The steps necessary to install the system dependencies of the Dynamics profile are provided in
operating system-specific installation documentation, and no additional required system dependency is required.

The only optional system dependency of `wb-toolbox`, project part of this profile, is [tbeu/matio](https://github.com/tbeu/matio/).
The only optional system dependency of `wb-toolbox` and `matio-cpp`, projects part of this profile, is [tbeu/matio](https://github.com/tbeu/matio/).

#### Linux

Expand Down
16 changes: 16 additions & 0 deletions releases/2020.11.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,22 @@ repositories:
type: git
url: https://github.com/oxfordcontrol/osqp.git
version: v0.6.0
manif:
type: git
url: https://github.com/artivis/manif.git
version: 44bdfebff0fbc56cb189f680212257dc7f20ea58
qhull:
type: git
url: https://github.com/qhull/qhull.git
version: v8.0.2
CppAD:
type: git
url: https://github.com/coin-or/CppAD.git
version: 20200000.3
casadi:
type: git
url: https://github.com/GiulioRomualdi/casadi.git
version: a26cd8ffba99052b74553eec1daeff640eea7e79
YCM:
type: git
url: https://github.com/robotology/ycm.git
Expand Down

0 comments on commit b3e3833

Please sign in to comment.