ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

tf transformpose with Odometry message

asked 2015-09-14 03:46:53 -0500

charles.fox gravatar image

I have some Odometry messages arriving in a frame, that I'd like to translate to another frame. I'm trying to do this with

t = tf.TransformerROS(True, rospy.Duration(10.0))
pose_base = t.transformPose("map", msg.pose)

However I get #AttributeError: 'PoseWithCovariance' object has no attribute 'header'

This I think is because the Odometry message itself is stamped with msg.header.stamp, but PoseWithCovarience part, msg.pose, does not have it's own stamp. What's the best way to send this information to tf to get the transformed pose? (I don't care about the twist, but it would be nice to have the covarience of the pose transformed.)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-09-14 09:06:04 -0500

PT gravatar image

Because transformPose requires a PoseStamped message, one way is to create a PoseStamped message (not need to publish it). Then, fill the PoseStamped message with the information from your Odom message, and use it for transformPose function.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-09-14 03:46:53 -0500

Seen: 1,326 times

Last updated: Sep 14 '15