Counterpart to pcl_ros::transformAsMatrix ?
Hi,
I understand pcl_ros::transformAsMatrix(const tf::Transform& bt, Eigen::Matrix4f &out_mat) can be used to convert a tf::transform to a 4x4 matrix describing the same transformation.
I am now looking for a method that does the same thing backwards, converting a 4x4 matrix to a tf::transform.
Is such a method already implemented somewhere?
Thanks
EDIT: Solution that works for me, thanks to Eric:
Eigen::Matrix4f mf; //The matrix I want to convert
Eigen::Matrix4d md(mf.cast<double>());
Eigen::Affine3d affine(md);
tf::Transform transform;
tf::TransformEigenToTF(affine, transform);
A small info which might be helpful for others. For ROS hydro, tf::transformEigenToTF must be used.