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

CMake install rules #64

Open
wants to merge 2 commits into
base: indigo-devel
Choose a base branch
from

Conversation

adynathos
Copy link

Added rules to copy files necessary for running the module with "make install".

I need to put the module in a Docker container and therefore determine the files that need to be copied.

@mani-monaj
Copy link
Member

Thanks for the PR. Could you please rebase your changes on top of the new changes in indigo-devel and also make sure that all CI tests are green?

@adynathos
Copy link
Author

Thank you for your reply, the rebase is now ready.

# PATTERN ".svn" EXCLUDE
# )
# Copy ARSDK libraries
install(DIRECTORY ${ARDRONESDK3_PATH}/lib/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Installing Parrot SDK's libs into ${CATKIN_PACKAGE_LIB_DESTINATION} might a bit problematic, since it also includes libraries like libcurl.so and libjson.so. I have been trying to package the SDK independently with the ultimate goal of removing the inline build step (#2). If you look at the install rules there you see that I copy all the products into a sub-folder. In your opinion, is it a safer approach?

@mani-monaj
Copy link
Member

@adynathos Would it be possible to modify/rebase your changes on top of the current indigo-devel. The driver now does not build the SDK inline anymore: #75

Added rules to copy files necessary for running the module with "make install".
@adynathos
Copy link
Author

Ok so I have updated it to remove the references to ARSDK binaries.

But when I did catkin_make install and copied the relevant directories to a docker container, the program failed to launch, complaining that it can't load libarcontroller.so, which is obviously false, because the parrot_arsdk package was installed with apt-get.

[ERROR] [1479314212.605687907]: Failed to load nodelet [/bebop/bebop_driver] of type [bebop_driver/BebopDriverNodelet] even after refreshing the cache: Failed to load library /opt/ros/kinetic/lib//libbebop_driver_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 = libarcontroller.so: cannot open shared object file: No such file or directory)
ros_1 | [ERROR] [1479314212.605731564]: The error before refreshing the cache was: Failed to load library /opt/ros/kinetic/lib//libbebop_driver_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 = libarcontroller.so: cannot open shared object file: No such file or directory)
ros_1 | [FATAL] [1479314212.605768290]: bebop_driver nodelet failed to load.

I solved this by symlinking all .so from /opt/ros/kinetic/lib/parrot_arsdk to /opt/ros/kinetic/lib in my container. When the symlinks are in /opt/ros/kinetic/lib it can find the libraries.
I am not experienced with ROS library discovery mechanism to know why that is.

@mani-monaj
Copy link
Member

@adynathos

Thanks for rebasing your changes and your efforts on debugging it.

The problem might be on my side since the install rules for ardronelib (as you correctly figured out) install the shared libraries into a sub-folder of /opt/ros/kinetic/lib. The main rationale behind that decision was not to pollute the default ROS libraries folder with custom libcurl and liblibressl that is compiled as part of arsdk. I will look into this issue more this weekend.

@mani-monaj
Copy link
Member

@adynathos I think I've found a workaround for runtime discovery of parrot_arsdk libraries:

aef8a5d

Could you please test this solution? The change is applied on top of your proposed changes in the following branch:

https://github.com/AutonomyLab/bebop_autonomy/tree/adynathos-indigo-devel

Could you also please clarify what the commit 0464832 does?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants