Skip to content

Commit 9b766a1

Browse files
Merge pull request #337 from dic-iit/fix/yarp_dev
Various fixes for the yarp devices
2 parents b7adab2 + 5f33564 commit 9b766a1

File tree

5 files changed

+29
-19
lines changed

5 files changed

+29
-19
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ All notable changes to this project are documented in this file.
7575
- Avoid to use the default copy-constructor and copy-assignment operator in `ContactPhaseList` class (https://github.com/dic-iit/bipedal-locomotion-framework/pull/295)
7676
- Fix `toString()` method of `VariablesHandler` class (https://github.com/dic-iit/bipedal-locomotion-framework/pull/302)
7777
- Fix in `YarpUtilities::getVectorFromSearchable` when a vector of boolean is passed as input (https://github.com/dic-iit/bipedal-locomotion-framework/pull/313)
78+
- Various fixes for the yarp devices (https://github.com/dic-iit/bipedal-locomotion-framework/pull/337)
7879

7980
## [0.1.1] - 2021-05-08
8081
### Fix

cmake/AddBipedalLocomotionYARPDevice.cmake

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -42,27 +42,30 @@ function(add_bipedal_yarp_device)
4242
TYPE ${type}
4343
INCLUDE ${public_headers})
4444

45-
yarp_add_plugin(${name} ${sources} ${public_headers})
45+
if(NOT SKIP_${name})
4646

47-
target_link_libraries(${name} PUBLIC ${public_link_libraries})
48-
target_compile_features(${name} PUBLIC cxx_std_17)
47+
yarp_add_plugin(${name} ${sources} ${public_headers})
4948

50-
# Specify include directories for both compilation and installation process.
51-
# The $<INSTALL_PREFIX> generator expression is useful to ensure to create
52-
# relocatable configuration files, see https://cmake.org/cmake/help/latest/manual/cmake-packages.7.html#creating-relocatable-packages
53-
target_include_directories(${name} PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
54-
"<INSTALLINTERFACE:<INSTALL_PREFIX>/${CMAKE_INSTALL_INCLUDEDIR}>")
49+
target_link_libraries(${name} PUBLIC ${public_link_libraries})
50+
target_compile_features(${name} PUBLIC cxx_std_17)
5551

56-
# Specify installation targets, typology and destination folders.
57-
yarp_install(TARGETS ${name}
58-
COMPONENT runtime
59-
LIBRARY DESTINATION ${YARP_DYNAMIC_PLUGINS_INSTALL_DIR}
60-
ARCHIVE DESTINATION ${YARP_STATIC_PLUGINS_INSTALL_DIR}
61-
YARP_INI DESTINATION ${YARP_PLUGIN_MANIFESTS_INSTALL_DIR})
52+
# Specify include directories for both compilation and installation process.
53+
# The $<INSTALL_PREFIX> generator expression is useful to ensure to create
54+
# relocatable configuration files, see https://cmake.org/cmake/help/latest/manual/cmake-packages.7.html#creating-relocatable-packages
55+
target_include_directories(${name} PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
56+
"<INSTALLINTERFACE:<INSTALL_PREFIX>/${CMAKE_INSTALL_INCLUDEDIR}>")
6257

63-
add_subdirectory(app)
58+
# Specify installation targets, typology and destination folders.
59+
yarp_install(TARGETS ${name}
60+
COMPONENT runtime
61+
LIBRARY DESTINATION ${YARP_DYNAMIC_PLUGINS_INSTALL_DIR}
62+
ARCHIVE DESTINATION ${YARP_STATIC_PLUGINS_INSTALL_DIR}
63+
YARP_INI DESTINATION ${YARP_PLUGIN_MANIFESTS_INSTALL_DIR})
6464

65+
add_subdirectory(app)
6566

66-
message(STATUS "Created device ${name}.")
67+
message(STATUS "Created device ${name} for export ${PROJECT_NAME}.")
68+
69+
endif()
6770

6871
endfunction()

devices/FloatingBaseEstimatorDevice/include/BipedalLocomotion/FloatingBaseEstimatorDevice.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ class BipedalLocomotion::FloatingBaseEstimatorDevice : public yarp::dev::DeviceD
3434
public yarp::os::PeriodicThread
3535
{
3636
public:
37-
explicit FloatingBaseEstimatorDevice(double period, yarp::os::ShouldUseSystemClock useSystemClock = yarp::os::ShouldUseSystemClock::No);
37+
FloatingBaseEstimatorDevice(double period,
38+
yarp::os::ShouldUseSystemClock useSystemClock
39+
= yarp::os::ShouldUseSystemClock::No);
3840
FloatingBaseEstimatorDevice();
3941
~FloatingBaseEstimatorDevice();
4042

devices/examples/FTIMULoggerDevice/include/BipedalLocomotion/FTIMULoggerDevice.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ class BipedalLocomotion::FTIMULoggerDevice : public yarp::dev::DeviceDriver,
2525
public yarp::os::PeriodicThread
2626
{
2727
public:
28-
explicit FTIMULoggerDevice(double period, yarp::os::ShouldUseSystemClock useSystemClock = yarp::os::ShouldUseSystemClock::No);
28+
FTIMULoggerDevice(double period,
29+
yarp::os::ShouldUseSystemClock useSystemClock
30+
= yarp::os::ShouldUseSystemClock::No);
2931
FTIMULoggerDevice();
3032
~FTIMULoggerDevice();
3133

devices/examples/ROSPublisherTestDevice/include/BipedalLocomotion/ROSPublisherTestDevice.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ class BipedalLocomotion::ROSPublisherTestDevice : public yarp::dev::DeviceDriver
2424
public yarp::os::PeriodicThread
2525
{
2626
public:
27-
explicit ROSPublisherTestDevice(double period, yarp::os::ShouldUseSystemClock useSystemClock = yarp::os::ShouldUseSystemClock::No);
27+
ROSPublisherTestDevice(double period,
28+
yarp::os::ShouldUseSystemClock useSystemClock
29+
= yarp::os::ShouldUseSystemClock::No);
2830
ROSPublisherTestDevice();
2931
~ROSPublisherTestDevice();
3032

0 commit comments

Comments
 (0)