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

Error in the boost library on teo-manipulation computer #8

Closed
rsantos88 opened this issue Feb 22, 2021 · 2 comments
Closed

Error in the boost library on teo-manipulation computer #8

rsantos88 opened this issue Feb 22, 2021 · 2 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@rsantos88
Copy link
Contributor

We are having some errors that we do not know the cause of. In order to work with the 3DMGX510 sensor library we need to install the boost 1.68 library for serial communication. (The unused dependencies of the Qt Serial Port library are pending to be eliminated). For this, the steps documented here have been followed.
This installation has been done outside of the robot (both on my personal computer and on the humasoft test-computer) and there has been no problem. Instead, Teo's manipulation computer makes errors.
Problems found:

  • To run the device of the imu, you need to have root rights (use sudo). This is a problem regardless of which computer it is used on.
  • When we run it in teo-manipulation, it shows the following error:
teo@manipulation:~$ sudo yarpdev --device SoftNeckIMU
error while opening /usr/local/lib/humasoft-yarp-devices/SoftNeckIMU.so:
  /usr/local/lib/humasoft-yarp-devices/SoftNeckIMU.so: undefined symbol: _ZN5boost6system6detail25generic_category_instanceE
Cannot load plugin from shared library (SoftNeckIMU)
(SoftNeckIMU: cannot open shared object file: No such file or directory)
yarpdev: ***ERROR*** could not find device <SoftNeckIMU>
[ERROR]yarpdev: ***ERROR*** device not available.
[INFO]Suggestions:
[INFO]+ Do "yarpdev --list" to see list of supported devices.
[INFO]+ Or append "--verbose" option to get more information.

I've tried to do as much cleaning as possible of previous versions or libraries that may have been previously installed on this computer but this has not solved the error .

  • To prevent this error from occurring, we decided to update the libboost library to 1.70. The error is corrected but when executing the device, after time it shows the following error:
Writing bottle: 0.539499533696250588299 0.455339973403611042446
Writing bottle: 0.539179498299559134544 0.454408167066807477941
Writing bottle: 0.539489762116511006873 0.453931894913696842853
Writing bottle: 0.539768597298535324214 0.454209432299665205601
Writing bottle: 0.539822018019291527402 0.454588552091119924015
Writing bottle: 0.539817105899918714407 0.454803128164230019426
Writing bottle: 0.540226409435973220496 0.454690402514234870424
Writing bottle: 0.540459451595299511517 0.454803065819913143741
Writing bottle: 0.539984271709715191179 0.454916447357962938636
Writing bottle: 0.539219359280560084358 0.454857323179415906633
Writing bottle: 0.538831887934430930898 0.455187254124834017599
Writing bottle: 0.538834167025645571769 0.455359238801501420291
Writing bottle: 0.538347428452001008914 0.455171411522581781384
Writing bottle: 0.537605210693642421305 0.455163330156272472049
Writing bottle: 0.53693123479614690563 0.454980387095662797137
Writing bottle: 0.536252153412300924806 0.454345552628658777561
Writing bottle: 0.535678430357014678798 0.454168049166333465116
Writing bottle: 0.535006863787729214366 0.454486857644305297654
Writing bottle: 0.534794415660489019793 0.454238132870214084136
Writing bottle: 0.535079682343034601644 0.453895783723174239821
Writing bottle: 0.534957069909199667279 0.453397767704494691898
Writing bottle: 0.534752398208124923862 0.452695893772663171539
Writing bottle: 0.534652247277958014848 0.452185193234149795938
Writing bottle: 0.5347379652356351043 0.452245800553693955148
terminate called after throwing an instance of 'boost::wrapexcept<boost::system::system_error>'
  what():  read: End of file

On computers outside of Teo, the test was made to install both version 1.68 and 1.70 and there was no error shown

@rsantos88 rsantos88 added bug Something isn't working help wanted Extra attention is needed labels Feb 22, 2021
@PeterBowman
Copy link
Member

To run the device of the imu, you need to have root rights (use sudo). This is a problem regardless of which computer it is used on.

You could set udev rules to avoid sudo, see roboticslab-uc3m/amor-configuration-files#2.

When we run it in teo-manipulation, it shows the following error:

Not sure how to confirm this now (here is the PPA anyway), but I have a feeling the libboost1.68-dev package you list in the install guide only contains common headers for all Boost libraries. Canonical's PPA makes a distinction between libboost-dev (just headers) and libboost-all-dev (headers + compiled binaries). Boost interdependencies may vary across releases, so with Boost 1.68 you could be missing some dependencies, perhaps Boost.System (ref), which is not the case with Boost 1.70.

I'd suggest taking a closer look at your dependencies and what is installed by apt, anyway (ref). For instance, in openrave-yarp-plugins we compiled a list of required Boost libs and whether they are header-only or need binaries: ref. See also ref and ref.

To prevent this error from occurring, we decided to update the libboost library to 1.70. The error is corrected but when executing the device, after time it shows the following error:

"End of file" -> no more data to read from? You could wrap the relevant bits in your code in a try-catch block and see whether this error is fatal or just a random data drop for which a workaround could be arranged.

@rsantos88
Copy link
Contributor Author

Some notes to keep in mind:
When trying to install libboost-all-dev (headers + compiled binaries), the boost version it installs is 1.58.

$ dpkg -s libboost-dev | grep Version
Version: 1.58.0.1ubuntu1

This does not allow the library to be compiled correctly, showing the following error:

[  3%] Building CXX object libraries/YarpPlugins/SoftNeckSensors/sensor-integration/CMakeFiles/SensorIntegration.dir/SensorIntegration.cpp.o
In file included from /home/teo/repos/humasoft/yarp-devices/libraries/YarpPlugins/SoftNeckSensors/sensor-integration/SensorIntegration.h:4:0,
                 from /home/teo/repos/humasoft/yarp-devices/libraries/YarpPlugins/SoftNeckSensors/sensor-integration/SensorIntegration.cpp:1:
/home/teo/repos/humasoft/yarp-devices/libraries/YarpPlugins/SoftNeckSensors/sensor-integration/SerialComm.h:51:5: error: ‘io_context’ does not name a type; did you mean ‘ucontext’?
     io_context io; //Active I/0 Functions
     ^~~~~~~~~~
     ucontext

As I have investigated this is due to a name change in the interface with the update to boost 1.66. This is why version 1.58 can be considered deprecated.
Therefore, updating boost to the latest version, (for ubuntu 16.04 currently used in Teo, this would be 1.74) all the previous problems are solved. It is interesting to note that with boost 1.68, the tests I did on the computers where it worked without showing errors was using Ubuntu 18.04.

Finally, the most serious error, which was the program closing due to a communication failure, has been solved by connecting the IMU through a small USB extension cable to a separate port on the manipulation-pc, without going through the white HUB.
This IMU sensor requires additional power through another USB cable, so this has been connected to the HUB to give it that additional power in another port of the computer. We prevent the communication port from passing through the HUB (we only use it to give additional power to the sensor)

20210226_185400

I close the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants