Getting transformation matrixes
Is it at all possible to get the transformation matrix that the robot navigation system is using? For example, when the navigation sets up the transformation matrixes from a known map to odom to base_footprint and so on. is there somewhere these transformation matrixes are stored and if so, can they be obtained?
I checked the out inforamtion on tf
, there is this method called asMatrix
, I dont know how to use it, I dont know what I'm supposed to use for the header
argument.
Asked by distro on 2022-02-23 23:54:26 UTC
Comments
TF listener is perhaps what you want? See Writing a tf2 listener (C++) or Writing a tf2 listener (Python), depending on whether you're using
roscpp
orrospy
The transformation is of type
geometry_msgs::TransformStamped
, which can be converted to a matrix as described in #q332407Asked by abhishek47 on 2022-02-24 12:24:38 UTC
@abhishek47 What was discussed in the link was simply getting the pose of one frame from another in 4X4 matrix format, not getting the transformation matrix itself.
Asked by distro on 2022-02-24 14:12:26 UTC