Robotics StackExchange | Archived questions

tf::matrixEigenToTF

Eigen::Affine3f transform_temp = (Affine3f)transforms[i]; 
        const Eigen::Matrix3d rotation_part = transform_temp.rotation().cast<double>();
        const Eigen::Vector3d translation_part = transform_temp.translation().cast<double>();
        tf::Matrix3x3 rot;
        tf::Vector3 tra;
        tf::matrixEigenToTF(rotation_part, rot);
        tf::vectorEigenToTF(translation_part, tra);
        tf::Transform temp_transform(rot, tra);

        listener->lookupTransform (link, msg_in->header.frame_id, ros::Time(0), tfTransform);

        broadcaster->sendTransform(tf::StampedTransform(tfTransform * temp_transform.inverse(), ros::Time::now(), link,  "chess_board"));

I got the following error. Do not know why, I have findpackage(catkin REQUIRED COMPONENTS tf tfconversions) and also targetlinklibraries(${catkin_LIBRARIES})

undefined reference to `tf::matrixEigenToTF(Eigen::Matrix<double, 3, 3, 1, 3, 3> const&, tf::Matrix3x3&)'

Asked by johnny.lin on 2015-10-14 00:35:37 UTC

Comments

I can manually transform this by just copying the tf::matrixEigenToTF() code. But still do not know why calling this function directly does not work.

Asked by johnny.lin on 2015-10-14 01:07:31 UTC

Answers