Compilation error for matrix log using Eigen in 12.04
So I've written, compiled, and run the following code on my personal machine that runs 13.04:
#include <Eigen/Core>
#include <unsupported/Eigen/MatrixFunctions>
#include <ur5/utilities.h>
#include <me530646_lab1/lab1.h>
#include <me530646_lab2/lab2.h>
#include <me530646_lab3/lab3.h>
#include <me530646_lab4/lab4.h>
#define PI M_PI
int main(int argc, char **argv){
ros::init(argc,argv,"lab3");
ros::NodeHandle n;
UR5 robot = UR5(n);
//Example of how to use the matrix logarithm
Eigen::Vector3d v(0,0,PI/4);
printf("Vector v:\n");
printEigen(v);
Eigen::Matrix3d R = expr(v);
printf("expr(v)\n");
printEigen(R);
Eigen::Matrix3d skew = R.log();
printf("expr(v).log()\n");
printEigen(skew);
printf("\"Unskew\" of expr(v).log():\n");
printEigen(Eigen::Vector3f(skew(2,1),skew(0,2),skew(1,0)));
}
When I try to run it on a machine with 12.04, however, I get the following error:
/home/rkeatin3/ur5_ws/src/me530646/ME530646/me530646_project/src/project_main.cpp: In function ‘int main(int, char**)’:
/home/rkeatin3/ur5_ws/src/me530646/ME530646/me530646_project/src/project_main.cpp:68:49: error: ‘const Type’ has no member named ‘log’
make[2]: *** [me530646/ME530646/me530646_project/CMakeFiles/project_main.dir/src/project_main.cpp.o] Error 1
make[1]: *** [me530646/ME530646/me530646_project/CMakeFiles/project_main.dir/all] Error 2
make: *** [all] Error 2
Invoking "make" failed
What's causing this problem, and how do I fix it? I tried downloading the most recent version and copying the header files to /usr/include, but that didn't fix the problem.