Does tf.lookupTransform (python) take time to fire up?
Hi there,
I have an issue I don't understand with tf in Python. Consider this code:
import rospy, tf
rospy.init_node('test')
l = tf.TransformListener()
# rospy.sleep(0.5)
# l.waitForTransform('BODY', 'manipulation_marker', rospy.Time(0), rospy.Time(10))
print l.lookupTransform('BODY', 'manipulation_marker', rospy.Time(0))
When I run it, I get a LookupException:
LookupException: "BODY" passed to lookupTransform argument target_frame does not exist.
But if I uncomment the sleep() before the lookupTransform, it works fine.
So, I was thinking I could use the waitForTransform() function to replace this sleep() and get the transform as soon as it is available. (Next commented line.) But it doesn't work either and I get a generic Exception() with no error message!
To give you more information about my TF, here is the output from tf_monitor:
RESULTS: for BODY to manipulation_marker
Chain is: * -> * -> * -> BODY
Net delay avg = 0.0424558: max = 0.0998758
All Broadcasters:
Node: unknown_publisher 111.186 Hz, Average Delay: -0.221831 Max Delay: 0.0471964
What should I do here to get the transform as soon as it is available?