No tf between odom and base
I want to obtain the current position (odometry position) of my robot by listening to the tf between odom and the base of the robot (base_footprint). However, even though the tf exists the code cannot find any.
Here is my code:
def get_start_position():
tf = TransformListener()
if tf.frameExists("base_footprint") and tf.frameExists("odom"):
print "Frames exist"
t = tf.getLatestCommonTime("/base_link", "/map")
p,q = tf.lookupTransform("/odom", "/base_footprint", t)
print p
x = 1
y = 5.9
z = 0
w = 1
return [x,y,z,w]
And here is my tf tree:
For some reason, the function does not return true tf values instead returns dummy values as specified above.