ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Through comment conversation with OP, I believe his question really boiled down to not knowing which ROS libraries he would need to link against if trying to compile a ROS node using a hand-written Makefile that didn't take advantage of catkin's ability to find ROS packages and automatically create CMake variables for this exact purpose.
I'm not sure what the purpose of this hand-written Makefile is.
I mentioned that OP could use ldd
to identify which libraries were loaded at runtime when running the executable generated by catkin (e.g. ldd /home/user/catkin_ws/devel/lib/package_name/executable_name
). OP said that was able to help him solve the problem.
One could also use CMake to figure out the value of the relevant variables. For example, adding
message(STATUS "catkin_LIBRARIES=${catkin_LIBRARIES}")
to a CMakeLists.txt file in a package would cause CMake to print the value of the variables that you are linking against when using something like target_link_libraries(example_node ${catkin_LIBRARIES})
. Although this might return more libraries than are actually needed.