How to convert eigen::Transform to tf2::Transform and vice versa in ROS C++?

1k views Asked by At

How can i convert between types in eigen and tf2 ?

Eigen::Transform Tf2ToEigen(const tf2::Transform& in)
{
    eigen::Transform out;
    tf2::convert(in, out);
    return out;
}

tf2::Transform EigenToTf2(const Eigen::Transform& in)
{
    tf2::Transform out;
    tf2::convert(in, out);
    return out;
}

tf2::convert above doesn't seem to work.

0

There are 0 answers