# Convert PoseWithCovariance to Transform

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

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 -0500 **

Seen: **472 times**

Last updated: **Sep 15 '17**

Tag based pose estimation with covariance

compute pose covariance ORB-SLAM

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

How to use a callback only once in python

Is it possible to plot coraviance matrices in rxplot?

What is the message of geometry_msgs/PoseWithCovariance

Subscribe to geometry_msgs/Pose2D message for arduino application

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

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

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.