diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..91aa8068b --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,80 @@ +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 * * *' + + +jobs: + build: + name: '[${{ matrix.os }}@${{ matrix.build_type }}]' + runs-on: ${{ matrix.os }} + strategy: + matrix: + build_type: [Release] + os: [ubuntu-latest, windows-latest, macos-latest] + fail-fast: false + + + steps: + - uses: actions/checkout@master + + - uses: conda-incubator/setup-miniconda@v3 + with: + miniforge-variant: Miniforge3 + miniforge-version: latest + channel-priority: true + conda-remove-defaults: true + channels: conda-forge, robotology + + # ============ + # DEPENDENCIES + # ============ + + - name: Dependencies + shell: bash -l {0} + run: | + conda install cmake cxx-compiler make ninja pkg-config yarp ycm-cmake-modules icub-main eigen "idyntree>=10.0.0" libunicycle-footstep-planner osqp-eigen "bipedal-locomotion-framework>=0.18.0" libtrintrin icub-contrib-common + + - name: Print used environment + shell: bash -l {0} + run: | + conda list + env + # =================== + # CMAKE-BASED PROJECT + # =================== + + - name: Configure [Windows] + # Use bash also on Windows (otherwise cd, mkdir, ... do not work) + if: matrix.os == 'windows-latest' + shell: bash -l {0} + run: | + mkdir -p build + cd build + cmake -G"Visual Studio 17 2022" \ + -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/install .. + + - name: Configure [Ubuntu/macOS] + if: matrix.os == 'ubuntu-latest' || matrix.os == 'macOS-latest' + shell: bash -l {0} + run: | + mkdir -p build + cd build + cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/install .. + + - name: Build + shell: bash -l {0} + run: | + cd build + cmake --build . --config ${{ matrix.build_type }} + + - name: Install + shell: bash -l {0} + run: | + cd build + cmake --build . --config ${{ matrix.build_type }} --target install diff --git a/README.md b/README.md index 6b9b1d1f1..c58b39a2e 100644 --- a/README.md +++ b/README.md @@ -65,6 +65,7 @@ Eprint = {arXiv:1809.02167}, # :page_facing_up: Dependencies * [YARP](http://www.yarp.it/): to handle the comunication with the robot; +* [trintrin](https://github.com/ami-iit/trintrin): a library with common messages for interprocess communication in robotics applications. * [iDynTree](https://github.com/robotology/idyntree): to handle the robot kinematics; * [iCubContrib](https://github.com/robotology/icub-contrib-common): to configure the modules; * [icub-main](https://github.com/robotology/icub-main): to smooth and integrate signals; diff --git a/cmake/WalkingControllersDependencies.cmake b/cmake/WalkingControllersDependencies.cmake index 6f9b10714..293b3e4de 100644 --- a/cmake/WalkingControllersDependencies.cmake +++ b/cmake/WalkingControllersDependencies.cmake @@ -9,6 +9,7 @@ find_package(iDynTree 10.0.0 REQUIRED) find_package(Eigen3 REQUIRED) find_package(UnicyclePlanner 0.8.0 REQUIRED) find_package(OsqpEigen 0.4.0 REQUIRED) +find_package(trintrin 0.0.1 REQUIRED) find_package(BipedalLocomotionFramework 0.18.0 COMPONENTS VectorsCollection IK ParametersHandlerYarpImplementation ContinuousDynamicalSystem ManifConversions Contacts diff --git a/src/RetargetingHelper/CMakeLists.txt b/src/RetargetingHelper/CMakeLists.txt index e55d7ea7f..505459664 100644 --- a/src/RetargetingHelper/CMakeLists.txt +++ b/src/RetargetingHelper/CMakeLists.txt @@ -6,5 +6,5 @@ add_walking_controllers_library( NAME RetargetingHelper SOURCES src/Helper.cpp PUBLIC_HEADERS include/WalkingControllers/RetargetingHelper/Helper.h - PUBLIC_LINK_LIBRARIES WalkingControllers::HumanState WalkingControllers::YarpUtilities WalkingControllers::KinDynWrapper ${iDynTree_LIBRARIES} ctrlLib + PUBLIC_LINK_LIBRARIES trintrin::msgs WalkingControllers::YarpUtilities WalkingControllers::KinDynWrapper ${iDynTree_LIBRARIES} ctrlLib PRIVATE_LINK_LIBRARIES Eigen3::Eigen) diff --git a/src/RetargetingHelper/include/WalkingControllers/RetargetingHelper/Helper.h b/src/RetargetingHelper/include/WalkingControllers/RetargetingHelper/Helper.h index 28be3702c..52935532a 100644 --- a/src/RetargetingHelper/include/WalkingControllers/RetargetingHelper/Helper.h +++ b/src/RetargetingHelper/include/WalkingControllers/RetargetingHelper/Helper.h @@ -22,7 +22,7 @@ #include #include -#include +#include namespace WalkingControllers { @@ -67,7 +67,7 @@ class RetargetingClient T velocity; }; - struct HDERetargeting : public RetargetingElement + struct HDERetargeting : public RetargetingElement { KinematicState joints; KinematicState com; diff --git a/src/YarpUtilities/CMakeLists.txt b/src/YarpUtilities/CMakeLists.txt index ec7d93238..623b4a4fe 100644 --- a/src/YarpUtilities/CMakeLists.txt +++ b/src/YarpUtilities/CMakeLists.txt @@ -14,8 +14,3 @@ add_walking_controllers_library( SOURCES ${YARP_UTILITIES_SRC} PUBLIC_HEADERS ${YARP_UTILITIES_HDR} PUBLIC_LINK_LIBRARIES ${YARP_LIBRARIES} ${iDynTree_LIBRARIES}) - -add_walking_controllers_yarp_thrift( - NAME HumanState - THRIFT thrifts/WalkingControllers/YarpUtilities/HumanState.thrift - INSTALLATION_FOLDER YarpUtilities) diff --git a/src/YarpUtilities/thrifts/WalkingControllers/YarpUtilities/HumanState.thrift b/src/YarpUtilities/thrifts/WalkingControllers/YarpUtilities/HumanState.thrift deleted file mode 100644 index 543d07e3c..000000000 --- a/src/YarpUtilities/thrifts/WalkingControllers/YarpUtilities/HumanState.thrift +++ /dev/null @@ -1,34 +0,0 @@ -namespace yarp WalkingControllers.YarpUtilities - -/** - * Representation of a 3D vector - */ -struct Vector3 { - 1: double x; - 2: double y; - 3: double z; -} - -/** - * Representation of a Quaternion - */ -struct Quaternion { - 1: double w; - 2: Vector3 imaginary; -} - -/** - * Representation of the IHumanState interface - */ -struct HumanState { - 1: list jointNames; - 2: list positions; - 3: list velocities; - - 4: string baseName; - 5: Vector3 baseOriginWRTGlobal; - 6: Quaternion baseOrientationWRTGlobal; - 7: list baseVelocityWRTGlobal; - 8: Vector3 CoMPositionWRTGlobal; - 9: Vector3 CoMVelocityWRTGlobal; -}