Transform listener can't find base_link
Hello all,
I'm trying to read values from base_link frame in order to get my robot's coordinates with the following code:
tf::TransformListener listener;
tf::StampedTransform transform;
try {
listener.lookupTransform("/base_link", "/odom", ros::Time(0),
transform);
} catch (tf::TransformException ex) {
ROS_ERROR("%s", ex.what());
}
However, all I get is an error.
[ERROR] [1394401426.907398394, 36.516000000]: Frame id /base_link does not exist! Frames (1)
I can visualize base_link in rviz or read it's values on terminal using rostopic echo so I'm pretty sure it exists.
Any help is much appreciated.