Closed progtologist closed 9 years ago
If I understand correctly, you are referring to a scenario where:
Please confirm if this ordering is correct, and also specify more details regarding this error (e.g. apt/dpkg failed to install ueye_cam, or ueye_cam nodelet fails to run, or another process using uEye drivers fails to run, or something else). Furthermore, attach all relevant printouts.
(Also, I suppose it won't hurt to try inversing steps 1 and 2, and see if that solves the problem.)
As for a fix, a temporary stopgap would be to re-package the latest versions of the IDS driver, and update DownloadUEyeDriversUnofficial.cmake. I'm not sure how to fix this issue permanently (since ROS buildfarm needs the temporary drivers, and I don't know/think bloom has an option for conditional install / post-install script).
To reproduce:
IDS Camera Manager V1.9.1 don't work with
libueye_api < 4.60!
use a newer libueye!
As a suggested fix, remove the install directives for the UNOFFICIAL_UEYE_DRIVERS so as they will not be a part of the debian package. They will be compiled and linked against, but they will not be installed.
I had considered your suggestion of not installing the unofficial drivers, but then people that had not installed the IDS drivers would see a generic "no shared library found" error when trying to run the ueye_cam nodelet, without instructions on how to download the official drivers...
Would you consider re-installing the latest IDS drivers, after installing ros-DISTRO-ueye-cam? I suspect that this would overwrite the ones included in the ueye_cam package.
(Note that historically, I was requested to package up ueye_cam because some users wished to batch-install via automated scripts, when configuring new robots.)
The problem is not in overwriting, it's with dynamic linking. In a system where both the official and the unofficial driver are installed, two versions of the same library exist:
locate libueye_api.so
/opt/ros/DISTRO/lib/libueye_api.so
/usr/lib/libueye_api.so
The /opt/ros/... version is the library install by your package, while the other version is installed by the IDS driver. The executable upon runtime will try to link with the library that is first found in the LD_LIBRARY_PATH, which in the case of ROS, the ROS libraries are prioritized as shown here
echo $LD_LIBRARY_PATH
/opt/ros/DISTRO/lib:/opt/ros/DISTRO/lib/x86_64-linux-gnu:/usr/lib32:/opt/ros/DISTRO/lib/python2.7/dist-packages
I believe that the solutions that can be applied are:
Overall your work is exceptional, thank you for all your effort!
Ah I misread where CATKIN_PACKAGE_LIB_DESTINATION was linked -- I thought it was linked to /usr/lib, but given that it's not, clearly there won't be any overwriting possibilities.
I am still convinced that it is better to have ueye_cam guaranteed to run when apt-installed on any machine, at the cost of masking a newer version of the lib.
As a temporary fix, I will re-package .h/.so for v4.61 and upload those to the ros servers. In the mean time, please consider either removing libueye_api.so* and ueye.h* from /opt/ros/DISTRO/lib, or building ueye_cam from source.
P.S.:
Just a final note - suggestion. I would agree 100% on your suggestion on keeping the library in the deb, if and only if the package would work without installing the ueye drivers. But since the package will not work unless the user has launched the daemon - and therefore installed the official library. Therefore, I still believe that there is no reason to provide the library in the ros-debian package. P.S.: I have used the source package version as soon as I have discovered the "bug".
You do raise a good point -- installing ueye_cam without the underlying IDS drivers will allow the nodelet to (start to) execute properly, but will not be able to connect to any uEye cameras, given that the daemon is not present. On the other hand, not including the barebone version of the .so will cause the nodelet to fail to execute:
[ERROR] [1439772259.508635678]: Failed to load nodelet [/ueye_cam_nodelet] of type [ueye_cam/ueye_cam_nodelet]: Failed to load library /PATH/libueye_cam_nodelet.so. Make sure that you are calling the PLUGINLIB_EXPORT_CLASS macro in the library code, and that names are consistent between this macro and your XML. Error string: Could not load library (Poco exception = libueye_api.so: cannot open shared object file: No such file or directory)
I wish that there's a way to warn the user in this case to install the IDS drivers...
In the mean time, I will remove the barebone IDS .h/.so from the debian package. Cheers :smile:
There is a way, I will make a pull request with a proposed fix ;-) EDIT: Unfortunately you were right, there is no way of intercepting that exception, as it is thrown in the nodelet manager instance prior to the construction of the nodelet and the driver. I tested pretty much everything without any luck. :( Still, I made some cleanup on the code, so I will make a PR if you wish to integrate them, nothing major though.
No worries. We'll deal with the fallout if and when it comes. In the mean time I've updated the barebones lib to 4.61, and pushed it to the buildfarms. Cheers.
Has anyone thought of/tried subscribing rosconsole
topics?
http://answers.ros.org/question/33503/subscribing-to-rosout-info/
[ERROR] [1439772259.508635678]: Failed to load no...
This should be catch-able using rosconsole/rosout API.
Seems like some work would be involved in running a daemon to check for this message on launch + give a more sensible warning message. I welcome pull request, but personally I'm happy with the current setup until IDS releases debs for their drivers.
In DownloadUEyeDriversUnofficial.cmake you warn:
but at the same time in CMakeLists.txt you are
which results in the debian package including the temporary drivers that were only dowloaded for compiling. This causes error in environments were a newer version of the drivers is installed (or required) and the user has the debian package of the ueye_cam driver installed.