# Convert PoseWithCovariance to Transform

Is it possible to convert geometry_msgs/PoseWithCovariance to geometry_msgs/Transform and how?

ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A answers.ros.org |

Convert PoseWithCovariance to Transform

Is it possible to convert geometry_msgs/PoseWithCovariance to geometry_msgs/Transform and how?

add a comment

0

If covariance is not important:

```
geometry_msgs::PoseWithCovariance poseWithCovarianceMsg;
tf::Transform transform;
transform.setRotation(tf::Quaternion(poseWithCovarianceMsg.pose.orientation.x,
poseWithCovarianceMsg.pose.orientation.y,
poseWithCovarianceMsg.pose.orientation.z,
poseWithCovarianceMsg.pose.orientation.w));
transform.setOrigin(tf::Vector3(poseWithCovarianceMsg.pose.position.x,
poseWithCovarianceMsg.pose.position.y,
poseWithCovarianceMsg.pose.position.z));
geometry_msgs::Transform transformMsg;
tf::transformTFToMsg(transform, transformMsg);
```

Please start posting anonymously - your entry will be published after you log in or create a new account.

Asked: ** 2017-09-15 07:27:28 -0600 **

Seen: **562 times**

Last updated: **Sep 15 '17**

How to transform tf::Vector3 with tf::TransformListener::transformVector?

Calculating the quaternion increments in geometry_msgs/Transform

How to convert from geometry_msgs PoseWithCovariance to nav_msgs Odometry?

TF of URDF is not showing from robot state publisher

Given a vector of Pose samples, how do I compute the PoseWithCovariance?

Tag based pose estimation with covariance

Why there are negative values in the diagonal of covariance matrix when I use laser_scan_matcher？

ROS Answers is licensed under Creative Commons Attribution 3.0 Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.