bipedal-locomotion-framework: Unable to use the yarp devices defined in blf

When I try to call yarpdev --list I get the following output. Notice that the other devices work fine

blf is installed by the superbuild

[INFO] |yarp.dev.Drivers| Here are devices listed for your system:
[ERROR] |yarp.os.YarpPluginSettings| Error while opening /home/gromualdi/robot-code/robotology-superbuild/build/install/lib/yarp/FTIMULoggerDevice.so:
  /home/gromualdi/robot-code/robotology-superbuild/build/install/lib/yarp/FTIMULoggerDevice.so: undefined symbol: FTIMULoggerDevice
[ERROR] |yarp.os.YarpPluginSettings| Error while opening /home/gromualdi/robot-code/robotology-superbuild/build/install/lib/yarp/FTIMULoggerDevice.so:
  /home/gromualdi/robot-code/robotology-superbuild/build/install/lib/yarp/FTIMULoggerDevice.so: undefined symbol: FTIMULoggerDevice
[ERROR] |yarp.os.YarpPluginSettings| Error while opening /home/gromualdi/robot-code/robotology-superbuild/build/install/lib/yarp/FTIMULoggerDevice.so:
  /home/gromualdi/robot-code/robotology-superbuild/build/install/lib/yarp/FTIMULoggerDevice.so: undefined symbol: FTIMULoggerDevice
[ERROR] |yarp.os.YarpPluginSettings| Error while opening /home/gromualdi/robot-code/robotology-superbuild/build/install/lib/yarp/FTIMULoggerDevice.so:
  /home/gromualdi/robot-code/robotology-superbuild/build/install/lib/yarp/FTIMULoggerDevice.so: undefined symbol: FTIMULoggerDevice
[ERROR] |yarp.os.YarpPluginSettings| Error while opening /home/gromualdi/robot-code/robotology-superbuild/build/install/lib/yarp/FTIMULoggerDevice.so:
  /home/gromualdi/robot-code/robotology-superbuild/build/install/lib/yarp/FTIMULoggerDevice.so: undefined symbol: FTIMULoggerDevice
[WARNING] |yarp.dev.Drivers| Wrong library name for plugin FTIMULoggerDevice
[ERROR] |yarp.os.YarpPluginSettings| Error while opening /home/gromualdi/robot-code/robotology-superbuild/build/install/lib/yarp/FloatingBaseEstimatorDevice.so:
  /home/gromualdi/robot-code/robotology-superbuild/build/install/lib/yarp/FloatingBaseEstimatorDevice.so: undefined symbol: FloatingBaseEstimatorDevice
[ERROR] |yarp.os.YarpPluginSettings| Error while opening /home/gromualdi/robot-code/robotology-superbuild/build/install/lib/yarp/FloatingBaseEstimatorDevice.so:
  /home/gromualdi/robot-code/robotology-superbuild/build/install/lib/yarp/FloatingBaseEstimatorDevice.so: undefined symbol: FloatingBaseEstimatorDevice
[ERROR] |yarp.os.YarpPluginSettings| Error while opening /home/gromualdi/robot-code/robotology-superbuild/build/install/lib/yarp/FloatingBaseEstimatorDevice.so:
  /home/gromualdi/robot-code/robotology-superbuild/build/install/lib/yarp/FloatingBaseEstimatorDevice.so: undefined symbol: FloatingBaseEstimatorDevice
[ERROR] |yarp.os.YarpPluginSettings| Error while opening /home/gromualdi/robot-code/robotology-superbuild/build/install/lib/yarp/FloatingBaseEstimatorDevice.so:
  /home/gromualdi/robot-code/robotology-superbuild/build/install/lib/yarp/FloatingBaseEstimatorDevice.so: undefined symbol: FloatingBaseEstimatorDevice
[ERROR] |yarp.os.YarpPluginSettings| Error while opening /home/gromualdi/robot-code/robotology-superbuild/build/install/lib/yarp/FloatingBaseEstimatorDevice.so:
  /home/gromualdi/robot-code/robotology-superbuild/build/install/lib/yarp/FloatingBaseEstimatorDevice.so: undefined symbol: FloatingBaseEstimatorDevice
[WARNING] |yarp.dev.Drivers| Wrong library name for plugin FloatingBaseEstimatorDevice
[ERROR] |yarp.os.YarpPluginSettings| Error while opening /home/gromualdi/robot-code/robotology-superbuild/build/install/lib/yarp/ROSPublisherTestDevice.so:
  /home/gromualdi/robot-code/robotology-superbuild/build/install/lib/yarp/ROSPublisherTestDevice.so: undefined symbol: ROSPublisherTestDevice
[ERROR] |yarp.os.YarpPluginSettings| Error while opening /home/gromualdi/robot-code/robotology-superbuild/build/install/lib/yarp/ROSPublisherTestDevice.so:
  /home/gromualdi/robot-code/robotology-superbuild/build/install/lib/yarp/ROSPublisherTestDevice.so: undefined symbol: ROSPublisherTestDevice
[ERROR] |yarp.os.YarpPluginSettings| Error while opening /home/gromualdi/robot-code/robotology-superbuild/build/install/lib/yarp/ROSPublisherTestDevice.so:
  /home/gromualdi/robot-code/robotology-superbuild/build/install/lib/yarp/ROSPublisherTestDevice.so: undefined symbol: ROSPublisherTestDevice
[ERROR] |yarp.os.YarpPluginSettings| Error while opening /home/gromualdi/robot-code/robotology-superbuild/build/install/lib/yarp/ROSPublisherTestDevice.so:
  /home/gromualdi/robot-code/robotology-superbuild/build/install/lib/yarp/ROSPublisherTestDevice.so: undefined symbol: ROSPublisherTestDevice
[ERROR] |yarp.os.YarpPluginSettings| Error while opening /home/gromualdi/robot-code/robotology-superbuild/build/install/lib/yarp/ROSPublisherTestDevice.so:
  /home/gromualdi/robot-code/robotology-superbuild/build/install/lib/yarp/ROSPublisherTestDevice.so: undefined symbol: ROSPublisherTestDevice
[WARNING] |yarp.dev.Drivers| Wrong library name for plugin ROSPublisherTestDevice
[INFO] |yarp.dev.Drivers| Device "AudioPlayerWrapper", available on request (found in /home/gromualdi/robot-code/robotology-superbuild/build/install/lib/yarp/yarp_AudioPlayerWrapper.so library), is a network wrapper.
[INFO] |yarp.dev.Drivers| Device "AudioRecorderWrapper", available on request (found in /home/gromualdi/robot-code/robotology-superbuild/build/install/lib/yarp/yarp_AudioRecorderWrapper.so library), is a network wrapper.
[INFO] |yarp.dev.Drivers| Device "IMURosPublisher", available on request (found in /home/gromualdi/robot-code/robotology-superbuild/build/install/lib/yarp/yarp_IMURosPublisher.so library), is a network wrapper.
[INFO] |yarp.dev.Drivers| Device "JoypadControlClient", available on request (found in /home/gromualdi/robot-code/robotology-superbuild/build/install/lib/yarp/yarp_JoypadControlClient.so library), is a network wrapper.
[INFO] |yarp.dev.Drivers| Device "JoypadControlServer", available on request (found in /home/gromualdi/robot-code/robotology-superbuild/build/install/lib/yarp/yarp_JoypadControlServer.so library), is a network wrapper.
[INFO] |yarp.dev.Drivers| Device "MagneticFieldRosPublisher", available on request (found in /home/gromualdi/robot-code/robotology-superbuild/build/install/lib/yarp/yarp_MagneticFieldRosPublisher.so library), is a network wrapper.
[INFO] |yarp.dev.Drivers| Device "PoseStampedRosPublisher", available on request (found in /home/gromualdi/robot-code/robotology-superbuild/build/install/lib/yarp/yarp_PoseStampedRosPublisher.so library), is a network wrapper.

cc @prashanthr05 and @traversaro

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 19 (6 by maintainers)

Most upvoted comments

I opened https://github.com/robotology/yarp/issues/2606 to mitigate the risk of this happening again.

I noticed that there are these three options in the CMake configuration

ENABLE_FTIMULoggerDevice                                                               
ENABLE_FloatingBaseEstimatorDe   
ENABLE_ROSPublisherTestDevice 

by default, there are OFF. If I put them ON and I apply #335 (comment)

yarpdev --list

The error disappears

[INFO] |yarp.dev.Drivers| Device "FTIMULoggerDevice", available on request (found in /home/gromualdi/robot-code/robotology-superbuild/build/install/lib/yarp/FTIMULoggerDevice.so library).
[INFO] |yarp.dev.Drivers| Device "FloatingBaseEstimatorDevice", available on request (found in /home/gromualdi/robot-code/robotology-superbuild/build/install/lib/yarp/FloatingBaseEstimatorDevice.so library).

Why these parameters are there?

Good catch! I was also affected by the issue in the past and I had forgot about it. The reason is that yarp_prepare_device defines them (see https://github.com/robotology/yarp/blob/5313b2defd8be7237567ea56eca8dde93dfc8121/cmake/YarpPlugin.cmake#L214). If the option is off, the shared library is installed normally (and this is the confusing part) but the YARP_DEFINE_SHARED_SUBCLASS macro is not compiled (see https://github.com/robotology/yarp/blob/5313b2defd8be7237567ea56eca8dde93dfc8121/cmake/YarpPlugin.cmake#L492) so some necessary symbols are not defined. If you want a device to be by default on, you can add on top of fixes in https://github.com/dic-iit/bipedal-locomotion-framework/pull/337/files the DEFAULT ON option to the yarp_prepare_plugin call, see for example: https://github.com/robotology/whole-body-estimators/blob/master/devices/genericSensorClient/CMakeLists.txt#L10 . You can also set ADVANCED so the option do not pollute the users-facing options: https://github.com/robotology/yarp/blob/5313b2defd8be7237567ea56eca8dde93dfc8121/cmake/YarpPlugin.cmake#L220 .

I noticed that there are these three options in the CMake configuration

ENABLE_FTIMULoggerDevice                                                               
ENABLE_FloatingBaseEstimatorDe   
ENABLE_ROSPublisherTestDevice 

by default, there are OFF. If I put them ON and I apply https://github.com/dic-iit/bipedal-locomotion-framework/issues/335#issuecomment-859674712

yarpdev --list

The error disappears

[INFO] |yarp.dev.Drivers| Device "FTIMULoggerDevice", available on request (found in /home/gromualdi/robot-code/robotology-superbuild/build/install/lib/yarp/FTIMULoggerDevice.so library).
[INFO] |yarp.dev.Drivers| Device "FloatingBaseEstimatorDevice", available on request (found in /home/gromualdi/robot-code/robotology-superbuild/build/install/lib/yarp/FloatingBaseEstimatorDevice.so library).

Why these parameters are there?

I quickly checked with the released binaries in conda:

conda create -n blf 
conda activate blf
conda install -c conda-forge -c robotology bipedal-locomotion-framework

and the problem is present also there:

(blf) gitpod@ws-840219e8-49e2-4a4b-b398-141ed14d5ae3:/workspace/gitpod-ubuntu-20.04$ yarpdev --list
[INFO] |yarp.dev.Drivers| Here are devices listed for your system:
[ERROR] |yarp.os.YarpPluginSettings| Error while opening /home/gitpod/mambaforge/envs/blf/lib/yarp/FloatingBaseEstimatorDevice.so:
  /home/gitpod/mambaforge/envs/blf/lib/yarp/FloatingBaseEstimatorDevice.so: undefined symbol: FloatingBaseEstimatorDevice
[ERROR] |yarp.os.YarpPluginSettings| Error while opening /home/gitpod/mambaforge/envs/blf/lib/yarp/FloatingBaseEstimatorDevice.so:
  /home/gitpod/mambaforge/envs/blf/lib/yarp/FloatingBaseEstimatorDevice.so: undefined symbol: FloatingBaseEstimatorDevice
[WARNING] |yarp.dev.Drivers| Wrong library name for plugin FloatingBaseEstimatorDevice