Eigen::eigen2_Transform3D and TF
Hi Guys,
I am trying to use tf::TransformTFToEigen with a TF listener.
I have both eigen2 and eigen3 installed.
The error I get is "'eigen2_Transform3d' is not a member of Eigen". I was assuming that including <tf_conversions tf_eigen.h=""> would pull in any eigen dependencies, as that is what happens in tf_eigen.cpp.
Here is my code:
#include <ros/ros.h>
#include "std_msgs/String.h"
#include "std_msgs/Float32.h"
#include <tf_conversions/tf_eigen.h>
#include <tf/transform_listener.h>
int main(int argc, char** argv){
ros::init(argc, argv, "openni_tracker_listener");
ros::NodeHandle node;
tf::TransformListener listener;
Eigen::eigen2_Transform3d t;
ros::Rate rate(10.0);
while (node.ok()){
tf::StampedTransform transform;
try{
listener.lookupTransform( "/right_hand", "/left_hand",
ros::Time(0), transform);
tf::TransformTFToEigen(transform,t);
}catch (tf::TransformException ex){
ROS_ERROR("%s",ex.what());
}
ros::spinOnce();
rate.sleep();
}
return 0;
};
Thanks for the help!
Kel