ROS Answers: Open Source Q&A Forum - RSS feedhttps://answers.ros.org/questions/Open source question and answer forum written in Python and DjangoenROS Answers is licensed under Creative Commons Attribution 3.0Wed, 20 Nov 2019 03:50:12 -0600How to invert a geometry_msgs::Transform in C++?https://answers.ros.org/question/338080/how-to-invert-a-geometry_msgstransform-in-c/Given a `geometry_msgs::Transform` not obtained through tf, how can I obtain the inverse of this transform?Wed, 20 Nov 2019 03:36:41 -0600https://answers.ros.org/question/338080/how-to-invert-a-geometry_msgstransform-in-c/Answer by Rufus for <p>Given a <code>geometry_msgs::Transform</code> not obtained through tf, how can I obtain the inverse of this transform?</p>
https://answers.ros.org/question/338080/how-to-invert-a-geometry_msgstransform-in-c/?answer=338083#post-id-338083```
tf::Transform transform;
tf::transformMsgToTF(transform_msg, transform);
geometry_msgs::Transform inverted_transform_msg;
tf::transformTFToMsg(transform.inverse(), inverted_transform_msg)Wed, 20 Nov 2019 03:50:12 -0600https://answers.ros.org/question/338080/how-to-invert-a-geometry_msgstransform-in-c/?answer=338083#post-id-338083