rospy: how to set a transform to TransformerROS ?
After initializing a node, a declare a TransformerROS.
transformer = tf.TransformerROS(True,rospy.Duration(10.0))
but if I want to perform a transform between two frames (in my case, I use turtlebot and I want to transform between odom and base_link), this does not work :
transformed_point = transformer.transformPoint("odom",point)
with error:
[...]
File "/opt/ros/indigo/lib/python2.7/dist-packages/tf/listener.py", line 71, in asMatrix
translation,rotation = self.lookupTransform(target_frame, hdr.frame_id, hdr.stamp)
[...]
LookupException: "odom" passed to lookupTransform argument target_frame does not exist
note: I have the bring up nodes of turtlebot running and rostopic informs me odom is broadcasted at 50Hz. Also odom frame shows up in rviz.
Also, I notice :
transformer.getFrameStrings()
prints []
What am I missing ?
Example from here: http://docs.ros.org/jade/api/tf/html/... seems to imply I should set the transform to the transformer first, but according to the error I get, the transformer seems to be searching for the transform itself (" ... self.lookupTransform(target_frame, hdr.frame_id, hdr.stamp) ...")
edit : I tried with an instance of TransformListener rather than TransformROS, for same result
I haven't used the TransformerROS, but is it possible that you create it and use it immediately so it didn't have the time to receive the transformations?
for your issue in the edit: this helped me. But i'm having the same issue with the TransformerROS aswell...