Skip to content

Commit

Permalink
Merge pull request #337 from dic-iit/fix/yarp_dev
Browse files Browse the repository at this point in the history
Various fixes for the yarp devices
  • Loading branch information
GiulioRomualdi authored Jun 14, 2021
2 parents b7adab2 + 5f33564 commit 9b766a1
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 19 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ All notable changes to this project are documented in this file.
- Avoid to use the default copy-constructor and copy-assignment operator in `ContactPhaseList` class (https://github.com/dic-iit/bipedal-locomotion-framework/pull/295)
- Fix `toString()` method of `VariablesHandler` class (https://github.com/dic-iit/bipedal-locomotion-framework/pull/302)
- Fix in `YarpUtilities::getVectorFromSearchable` when a vector of boolean is passed as input (https://github.com/dic-iit/bipedal-locomotion-framework/pull/313)
- Various fixes for the yarp devices (https://github.com/dic-iit/bipedal-locomotion-framework/pull/337)

## [0.1.1] - 2021-05-08
### Fix
Expand Down
35 changes: 19 additions & 16 deletions cmake/AddBipedalLocomotionYARPDevice.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -42,27 +42,30 @@ function(add_bipedal_yarp_device)
TYPE ${type}
INCLUDE ${public_headers})

yarp_add_plugin(${name} ${sources} ${public_headers})
if(NOT SKIP_${name})

target_link_libraries(${name} PUBLIC ${public_link_libraries})
target_compile_features(${name} PUBLIC cxx_std_17)
yarp_add_plugin(${name} ${sources} ${public_headers})

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

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

add_subdirectory(app)
# Specify installation targets, typology and destination folders.
yarp_install(TARGETS ${name}
COMPONENT runtime
LIBRARY DESTINATION ${YARP_DYNAMIC_PLUGINS_INSTALL_DIR}
ARCHIVE DESTINATION ${YARP_STATIC_PLUGINS_INSTALL_DIR}
YARP_INI DESTINATION ${YARP_PLUGIN_MANIFESTS_INSTALL_DIR})

add_subdirectory(app)

message(STATUS "Created device ${name}.")
message(STATUS "Created device ${name} for export ${PROJECT_NAME}.")

endif()

endfunction()
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ class BipedalLocomotion::FloatingBaseEstimatorDevice : public yarp::dev::DeviceD
public yarp::os::PeriodicThread
{
public:
explicit FloatingBaseEstimatorDevice(double period, yarp::os::ShouldUseSystemClock useSystemClock = yarp::os::ShouldUseSystemClock::No);
FloatingBaseEstimatorDevice(double period,
yarp::os::ShouldUseSystemClock useSystemClock
= yarp::os::ShouldUseSystemClock::No);
FloatingBaseEstimatorDevice();
~FloatingBaseEstimatorDevice();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ class BipedalLocomotion::FTIMULoggerDevice : public yarp::dev::DeviceDriver,
public yarp::os::PeriodicThread
{
public:
explicit FTIMULoggerDevice(double period, yarp::os::ShouldUseSystemClock useSystemClock = yarp::os::ShouldUseSystemClock::No);
FTIMULoggerDevice(double period,
yarp::os::ShouldUseSystemClock useSystemClock
= yarp::os::ShouldUseSystemClock::No);
FTIMULoggerDevice();
~FTIMULoggerDevice();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ class BipedalLocomotion::ROSPublisherTestDevice : public yarp::dev::DeviceDriver
public yarp::os::PeriodicThread
{
public:
explicit ROSPublisherTestDevice(double period, yarp::os::ShouldUseSystemClock useSystemClock = yarp::os::ShouldUseSystemClock::No);
ROSPublisherTestDevice(double period,
yarp::os::ShouldUseSystemClock useSystemClock
= yarp::os::ShouldUseSystemClock::No);
ROSPublisherTestDevice();
~ROSPublisherTestDevice();

Expand Down

0 comments on commit 9b766a1

Please sign in to comment.