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

Migrate from YARP_telemetry to robometry #155

Merged
merged 5 commits into from
May 23, 2022
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
32 changes: 16 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: C++ CI Workflow

# template derived from https://github.com/robotology/how-to-export-cpp-library/tree/master/.github/workflows
# template derived from https://github.com/robotology/how-to-export-cpp-library/tree/master/.github/workflows
# and https://github.com/robotology/idyntree/blob/master/.github/workflows/ci.yml

on:
Expand All @@ -18,7 +18,7 @@ env:
YARP_TAG: v3.5.0
iDynTree_TAG: v5.1.0
matioCpp_TAG: v0.2.0
yarp_telemetry_TAG: v0.4.0
robometry_TAG: master # It will become v1.0.0 as soon as will be released
# Overwrite the VCPKG_INSTALLATION_ROOT env variable defined by Github Actions to point to our vcpkg
VCPKG_INSTALLATION_ROOT: C:\robotology\vcpkg

Expand All @@ -29,12 +29,12 @@ jobs:
strategy:
matrix:
build_type: [Release]
os: [ubuntu-latest, windows-latest, macOS-latest]
os: [ubuntu-latest, windows-latest, macOS-latest]
fail-fast: false

steps:
# Clone the repository in $GITHUB_WORKSPACE
- uses: actions/checkout@master
- uses: actions/checkout@master

- uses: conda-incubator/setup-miniconda@v2
if: contains(matrix.os, 'windows')
Expand All @@ -51,8 +51,8 @@ jobs:
shell: bash
run: env

# Remove apt repos on Ubuntu that are known to break from time to time
# See https://github.com/actions/virtual-environments/issues/323
# Remove apt repos on Ubuntu 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: matrix.os == 'ubuntu-latest'
run: |
Expand All @@ -66,7 +66,7 @@ jobs:
if: matrix.os == 'macOS-latest'
run: |
brew install ccache eigen ace tinyxml gsl boost libmatio

- name: Dependencies [Ubuntu]
if: matrix.os == 'ubuntu-latest'
run: |
Expand All @@ -82,7 +82,7 @@ jobs:
with:
path: ${{ github.workspace }}/install/deps
# Including ${{ runner.temp }} is a workaround for https://github.com/robotology/whole-body-estimators/issues/60
key: source-deps-${{runner.os}}-${{runner.temp}}-vcpkg-robotology-${{env.vcpkg_robotology_TAG}}-ycm-${{env.YCM_TAG}}-yarp-${{env.YARP_TAG}}-iDynTree-${{env.iDynTree_TAG}}-matioCpp-${{env.matioCpp_TAG}}-yarp_telemetry-${{env.yarp_telemetry_TAG}}
key: source-deps-${{runner.os}}-${{runner.temp}}-vcpkg-robotology-${{env.vcpkg_robotology_TAG}}-ycm-${{env.YCM_TAG}}-yarp-${{env.YARP_TAG}}-iDynTree-${{env.iDynTree_TAG}}-matioCpp-${{env.matioCpp_TAG}}-robometry-${{env.robometry_TAG}}


- name: Source-based Dependencies [Ubuntu/macOS]
Expand Down Expand Up @@ -131,11 +131,11 @@ jobs:
-DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/install/deps ..
cmake --build . --config ${{matrix.build_type}} --target install

# yarp-telemetry
# robometry
cd ${GITHUB_WORKSPACE}
git clone https://github.com/robotology/yarp-telemetry
cd yarp-telemetry
git checkout ${yarp_telemetry_TAG}
git clone https://github.com/robotology/robometry
cd robometry
git checkout ${robometry_TAG}
mkdir -p build
cd build
cmake -DCMAKE_PREFIX_PATH=${GITHUB_WORKSPACE}/install/deps \
Expand All @@ -146,10 +146,10 @@ jobs:
if: steps.cache-source-deps.outputs.cache-hit != 'true' && contains(matrix.os, 'windows')
shell: bash -l {0}
run: |
# Compilation related dependencies
# Compilation related dependencies
mamba install cmake compilers make ninja pkg-config
# Actual dependencies
mamba install -c robotology yarp wearables idyntree matio-cpp yarp-telemetry
mamba install -c robotology yarp idyntree matio-cpp

# ===================
# CMAKE-BASED PROJECT
Expand All @@ -175,12 +175,12 @@ jobs:
cmake -DCMAKE_PREFIX_PATH=${GITHUB_WORKSPACE}/install/deps \
-DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/install ..

# Build step
# Build step
- name: Build
shell: bash
run: |
cd build
# Attempt of fix for using YARP idl generators (that link ACE) in Windows
# 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}/install/x64-windows/bin:${VCPKG_INSTALLATION_ROOT}/installed/x64-windows/debug/bin
cmake --build . --config ${{matrix.build_type}}
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed
- Fix deprecated `YARP` functions in `YarpUtilities` component (https://github.com/robotology/wearables/pull/152)
- Ported `iWearLogger` to the usage of `robometry` (new name of `YARP_telemetry`, https://github.com/robotology/wearables/pull/155)

### Added
- Added the possibility to change the `carrier` for `IWearRemapper` connection. (https://github.com/robotology/wearables/pull/147)
Expand All @@ -27,8 +28,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Remove `rpc` port from `IWearWrapper` and `IWearRemapper`. (https://github.com/robotology/wearables/pull/131)

### Added
- Added `IWearFrameVisualizer` module to visualize any wearable device frames associated with the link sensors. (https://github.com/robotology/wearables/pull/121)
- Added `HapticGlove` device to stream sense glove data and provide haptic feedback to the user. (https://github.com/robotology/wearables/pull/121)
- Added `IWearFrameVisualizer` module to visualize any wearable device frames associated with the link sensors. (https://github.com/robotology/wearables/pull/121)
- Added `HapticGlove` device to stream sense glove data and provide haptic feedback to the user. (https://github.com/robotology/wearables/pull/121)
- Updated `Paexo` wearable device with yarp ports for motor control. (https://github.com/robotology/wearables/pull/124)
- Updated 'iwear_logger' wrapper device with options to stream data through yarp ports. (https://github.com/robotology/wearables/pull/123)
- Added `iwear_logger` wrapper device to log wearable sensors data using `yarp-telemetry`. (https://github.com/robotology/wearables/pull/113)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Here following there is a list of the required dependencies you need for using t
It must be noted that `YARP`, together with a subset of the optional dependencies, can be installed together in one place using the [robotology-superbuild](https://github.com/robotology/robotology-superbuild) enabling its [`Human-Dynamics` profile](https://github.com/robotology/robotology-superbuild#human-dynamics).

### Optional
* [YARP-telemetry](https://github.com/robotology/yarp-telemetry) device: if present, the `IWearLogger` is installed.
* [robometry](https://github.com/robotology/robometry) device: if present, the `IWearLogger` is installed.

## Build the suite
### Linux/macOS
Expand Down
10 changes: 5 additions & 5 deletions wrappers/IWearLogger/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# This software may be modified and distributed under the terms of the
# GNU Lesser General Public License v2.1 or any later version.

find_package(YARP COMPONENTS telemetry dev QUIET)

if (${YARP_FOUND})
find_package(YARP COMPONENTS dev QUIET)
find_package(robometry QUIET)
if (${YARP_FOUND} AND ${robometry_FOUND})

yarp_prepare_plugin(iwear_logger
TYPE wearable::wrappers::IWearLogger
Expand All @@ -21,7 +21,7 @@ target_include_directories(IWearLogger PRIVATE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>)

target_link_libraries(IWearLogger PUBLIC
IWear WearableData YARP::YARP_dev YARP::YARP_init YARP::YARP_telemetry)
IWear WearableData YARP::YARP_dev YARP::YARP_init robometry::robometry)

yarp_install(
TARGETS IWearLogger
Expand All @@ -31,6 +31,6 @@ yarp_install(
YARP_INI DESTINATION ${YARP_PLUGIN_MANIFESTS_INSTALL_DIR})

else()
message(WARNING "YARP-telemetry is missing. IWearLogger will not be installed.")
message(WARNING "robometry is missing. IWearLogger will not be installed.")
endif()

8 changes: 4 additions & 4 deletions wrappers/IWearLogger/src/IWearLogger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include <yarp/os/Network.h>
#include <yarp/sig/Vector.h>

#include <yarp/telemetry/experimental/BufferManager.h>
#include <robometry/BufferManager.h>

const std::string WrapperName = "IWearLogger";
const std::string logPrefix = WrapperName + " :";
Expand Down Expand Up @@ -160,8 +160,8 @@ class IWearLogger::impl
yarp::dev::IPreciselyTimed* iPreciselyTimed = nullptr;
std::mutex loggerMutex;
IWearLoggerSettings settings;
yarp::telemetry::experimental::BufferConfig bufferConfig;
yarp::telemetry::experimental::BufferManager<double> bufferManager;
robometry::BufferConfig bufferConfig;
robometry::BufferManager bufferManager;

wearable::VectorOfSensorPtr<const wearable::sensor::IAccelerometer> accelerometers;
wearable::VectorOfSensorPtr<const wearable::sensor::IEmgSensor> emgSensors;
Expand Down Expand Up @@ -762,7 +762,7 @@ void IWearLogger::run()
}
}

if (pImpl->settings.logAllQuantities || pImpl->settings.logSkinSensors)
if (pImpl->settings.logAllQuantities || pImpl->settings.logSkinSensors)
{
for (const auto& sensor : pImpl->skinSensors) {
std::vector<double> pressureVector;
Expand Down