tf spits a lookup exception
I'm using the tf package and specifically the tf.TransformerROS class in Python. If I try calling its methods transformPose or transformPointCloud it returns a LookupException
tf.LookupException: Frame id /map does not exist! When trying to transform between /base_link and /map.
However if I try running the tf_monitor right after that I see that tf has knowledge of the frame
~>rosrun tf tf_monitor base_link map
Waiting for transform chain to become available between /base_link and /map
RESULTS: for /base_link to /map
Chain is: /base_link -> /base_footprint -> /odom_combined -> /map
Net delay avg = 0.00684423: max = 0.054
Frames:
Frame: /base_footprint published by /robot_pose_ekf Average Delay: 0.0185 Max Delay: 0.026
Frame: /base_link published by /robot_state_publisher Average Delay: 0.0075 Max Delay: 0.008
Frame: /odom_combined published by /slam_gmapping Average Delay: 0 Max Delay: 0
All Broadcasters:
Node: /robot_pose_ekf 33.5196 Hz, Average Delay: 0.0185 Max Delay: 0.026
Node: /robot_state_publisher 55.5556 Hz, Average Delay: 0.0075 Max Delay: 0.008
Node: /slam_gmapping 25 Hz, Average Delay: 0 Max Delay: 0
I'm running gazebo simulation and have ROBOT=sim set. Any ideas how to get transformPointCloud to work?
Edit: Here is (simplified) the part of the code that deals with tf
import roslib
roslib.load_manifest(PKG)
import rospy
import tf
class Class():
def __init__(self):
#...
self.tfTrasformer = tf.TransformerROS()
#...
# somewhere in the methods
obj.object.cluster = self.tfTrasformer.transformPointCloud("/map",obj.object.cluster)