orocos / rtt_ros_integration

Orocos-ROS integration libraries and tools
BSD 3-Clause "New" or "Revised" License
84 stars 56 forks source link

rtt_roscomm: There is no dependency handling when generating typekits #173

Open danieto98 opened 3 months ago

danieto98 commented 3 months ago

If a ROS message my_pkg_1/MyMsg1 depends on a message my_pkg_2/MyMsg2 from another package and the typekit for the first package is generated using ros_generate_rtt_typekit(my_pkg_1), then, when attempting to use use this type in Orocos, this results in a compilation error due to the boost::serialization::serialize() function for my_pkg_2/MyMsg2 not being defined.

It would be nice if typekits could also be generated automatically for these types of dependencies, to avoid having to hunt down and list every single dependency recursively in order to have complex ROS messages work.

I found a workaround by generating typekits for all dependencies listed in ${${my_pkg_1}_MSG_DEPENDENCIES}, which is set by calling include(${${my_pkg_1}_PREFIX}/${CATKIN_GLOBAL_SHARE_DESTINATION}/${my_pkg_1}/cmake/${my_pkg_1}-msg-paths.cmake). I believe something similar could be done.