ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
You'll want to declare dependencies on both packages in your package.xml, and then use the find_package() command in CMake to locate them and add the appropriate include directories and libraries to your project.
There's a fairly good catkin build on how to declare and use external dependencies: http://docs.ros.org/hydro/api/catkin/html/howto/system_library_dependencies.html
It looks like GTSAM is already a CMake package, so you should be able to use find_package with it without issues. I did a quick google search and found someone at Georgia Tech doing this from rosbuild: https://code.google.com/p/gt-ros-pkg/source/browse/arm_3d_cb_calib/CMakeLists.txt?repo=cpl&name=kelsey_sandbox&r=f03e0f08ee4f55ec22d878f702c0b830ed319d6c ; you'll probably need to change the rosbuild macros to normal cmake macros, but otherwise you should be able to do something similar.
Since you're installed GTSAM from source, and most of the other people that use your package will probably do the same thing, you may not want to declare your dependency on gtsam in your package.xml ; this will prevent the ROS tools from trying to verify that it's installed, which is difficult to do for source packages.
If you do get to a point where you'd like to release your package to the ROS build farm, you'll probably want to get the GTSAM maintainers to release it as a plain CMake package into ROS. This is fairly easily done through Bloom.
Side notes on Boost: