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

Revision history [back]

click to hide/show revision 1
initial version

The error isn't saying that it can't get the transform. If you read it, it clearly says that TypeError: 'TransformStamped' object is not iterable. Change the lookup line to:

transformObject = tfBuffer.lookup_transform('odom', 'base_footprint', rospy.Time.now(), rospy.Duration(3.0))

Then, to get the translation and rotation, set:

trans = transformObject.transform.translation
rot = transformObject.transform.rotation

It was easy to see this was the case if you read the error type.