ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

Using Eigen libraries in ROS

asked 2017-02-12 11:07:23 -0500

smcdouall gravatar image

updated 2017-02-12 12:08:38 -0500

gvdhoorn gravatar image

Hi, I am fairly new to ROS and was wanting to do some matrix multiplication in a node. I found that Eigen has a good range of different matrices and vectors to use but was not quite sure what modifications I would have to make to allow it to be used in ROS.

First of all when I download the libraries, where do I put them? Is it inside the workspace folder, the src folder inside the workspace folder or is it inside the package inside the src folder? So one of these:

/workspace
/workspace/src
/workspace/src/package

In addition what changes do I have to make to the CMakeLists.txt file inside the package to include these new libraries?

Is there anything else I have to do in order to get these libraries working? I take it I need to include the header files in the node files I’m using (i.e. #include <Eigen/Eigen> #include <Eigen/Eigenvalues>)

Any help would be greatly appreciated. I am using catkin and the OS is Ubuntu Kinetic 16.04. If any more information is required please don't hesitate to ask.

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
1

answered 2017-07-12 09:02:14 -0500

ParitoshKelkar gravatar image

updated 2017-07-12 09:03:53 -0500

I have installed the Eigen headers at /usr/local/include/Eigen3/.

(I downloaded stable eigenxxx.tar.gz. Extracted and renamed extracted folder as Eigen3)

I use link_directories(/usr/local/include) in my CMakeLists and in my node I use

#include <Eigen3/Eigen/Dense>

I did read at (catkin_wiki) that the link_directories is not preferred but as of now I have not been able to get it working with FIND_LIBRARY and TARGET_LINK_LIBRARY. Will update the answer when I do

*Tested on Indigo and 14.04. But I think should work with your configuration as well

edit flag offensive delete link more
0

answered 2017-02-15 10:02:50 -0500

joq gravatar image
edit flag offensive delete link more

Question Tools

Stats

Asked: 2017-02-12 11:07:23 -0500

Seen: 9,822 times

Last updated: Jul 12 '17