usrl-uofsc / stag_ros

A ROS package for the Stable Fiducial Marker System
45 stars 16 forks source link

cmake: export and install library stag_core #18

Closed meyerj closed 1 year ago

meyerj commented 1 year ago

Thanks for your nice package, or more specifically for porting STag and integrating it with ROS!

Some suggested changes to CMakeLists.txt:

If you prefer not to export any library target and/or header file to downstream packages, that is also fine. Then we can fork STag directly and add a package.xml and CMakeLists.txt file there. I would still recommend to leave the catkin_package() call empty then, because there is nothing to export, and for simply running the nodes or nodelets that is not required.

meyerj commented 1 year ago
  • It may still work without, as long as the devel-space is around and has not been cleaned, but not for a binary package built by the OSRF buildfarm, for example.

Confirmed that the latest ros-noetic-stag-ros binary package for Ubuntu Focal, version 0.3.9-3, indeed does not work:

johannes@im-laptop-007:~$ source /opt/ros/noetic/setup.bash
johannes@im-laptop-007:~$ rosrun stag_ros stag_node
/opt/ros/noetic/lib/stag_ros/stag_node: error while loading shared libraries: libstag_core.so: cannot open shared object file: No such file or directory
johannes@im-laptop-007:~$ rosrun stag_ros stag_nodelet_runnable 
[ INFO] [1675885893.643372928]: Initializing nodelet with 8 worker threads.
[ERROR] [1675885893.655363470]: Failed to load nodelet [/stag_nodelet] of type [stag_ros/stag_nodelet] even after refreshing the cache: Could not find library corresponding to plugin stag_ros/stag_nodelet. Make sure the plugin description XML file has the correct name of the library and that the library actually exists.
[ERROR] [1675885893.655398627]: The error before refreshing the cache was: Could not find library corresponding to plugin stag_ros/stag_nodelet. Make sure the plugin description XML file has the correct name of the library and that the library actually exists.
MikeK4y commented 1 year ago

Thank you for your contribution!