Getting transformation matrixes [closed]
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.
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 #q332407@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.