Quantcast
Channel: ROS Answers: Open Source Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 43

Using Armadillo C++ library with ROS

$
0
0
Hello all! So I am trying to use the armadillo library for my project with ROS. I installed armadillo on my computer (Ubuntu 12.04) using the commands > sudo apt-get install libarmadillo2>> sudo apt-get install libarmadillo-dev More about the armadillo library and related downloads can be found here: [http://arma.sourceforge.net/docs.html#svd](http://arma.sourceforge.net/docs.html#svd) I then downloaded the armadillo package, and navigated to the "**examples**" folder. There, I typed "**make**" in the commandline to build the executables from the example files. I then ran an example which required LAPACK and BLAS (which I have installed a long time ago) to complete. This example ran perfectly. (Actually, the example calculated the inverse and determinant of a sample matrix A, which require LAPACK and BLAS to be installed). So far, so good. Now I have a ROS package, which requires armadillo. I copied the file called "**armadillo**" and the folder called "**armadillo bits**" into the "**include**" folder of my ROS package. I then went into /include/armadillo_bits/config.hpp and configured LAPACK and BLAS by doing > #define ARMA_USE_LAPACK>> #define ARMA_USE_BLAS I then went back into the main package folder, and did "rosmake". Everything compiled fine. I then did > rosrun mypackage mypackage and I get the following error: error: svd(): use of LAPACK needs to be enabled terminate called after throwing an instance of 'std::logic_error' what(): Aborted (core dumped) Apparently, the svd() function (which also needs LAPACK and BLAS like the inverse and determinant functions) cannot detect LAPACK. This is weird, because it worked with the example file in the armadillo "examples" folder. I have a feeling that I am not linking to the right libraries, and there is something fishy going on. How do I get Armadillo to work inside a ROS package, the same way I got it to work inside the "examples" folder in the armadillo folder? All help is greatly appreciated. Thanks! Nishant

Viewing all articles
Browse latest Browse all 43

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>