Tuesday, February 11, 2014

adding / Linking GTSAM with ROS

After downloading the gtsam from their website and successfully compiling it.

I downloaded gtsam-2.3.1 to /home/sai/workspace/

Then add these lines in the CMakeLists.txt

include_directories(/home/sai/workspace/gtsam-2.3.1)
include_directories(/home/sai/workspace/gtsam-2.3.1/build)
include_directories(/home/sai/workspace/gtsam-2.3.1/build/gtsam)
link_directories(/home/sai/workspace/gtsam-2.3.1/build)
link_directories(/home/sai/workspace/gtsam-2.3.1/build/gtsam)


rosbuild_add_executable(OdometryExample src/OdometryExample.cpp)
target_link_libraries(OdometryExample gtsam)


This shows an example that runs as ros node


Cya

2 comments:

  1. I want to use gtsam in ros like the gmapping package. would you please tell me what to do exactly.

    ReplyDelete
    Replies
    1. Hey! I know it has been too long. But did you figure out using gtsam like gmapping ? I am doing the same.

      Delete