title: publishing location using tf broadcast
body: <p>I am having a little problem using <code>tf::TransformListener</code> with the following method call:</p>
  
  <pre><code>listener.lookupTransform("/base_footprint", "/odom", ros::Time(0), transform);
  </code></pre>
  
  <p>I get this error:</p>
  
  <pre><code>[ERROR] [1430761593.614566598, 10.000000000]: "base_footprint" passed to lookupTransform argument target_frame does not exist.
  </code></pre>
  
  <p>I thought it was because I have not used a tf broacaster, but even with it the problem still remain. What am I doing wrong?</p>
  
  <p>The code for the listener:  </p>
  
  <pre class="lang-cpp prettyprint-override"><code>tf::TransformListener listener;
  ros::Rate rate(1.0);
  listener.waitForTransform("/base_footprint", "/odom", ros::Time(0), ros::Duration(10.0));
  tf::StampedTransform transform;
  try 
  {            
      listener.lookupTransform("/base_footprint", "/odom", ros::Time(0), transform);
      double x = transform.getOrigin().x();
      double y = transform.getOrigin().y();
      ROS_INFO("Current position: ( %f , %f)\n",x,y);
  }
  catch (tf::TransformException &amp;ex)
  {
      ROS_ERROR("%s",ex.what());
  }
  </code></pre>
  
  <p>The code for the broadcaster:</p>
  
  <pre class="lang-cpp prettyprint-override"><code>ros::Time current_time, last_time;
  tf::TransformBroadcaster odom_broadcaster;
  
  double x = 0.0;
  double y = 0.0;
  double th = 0.0;
  
  double vx = 0.1;
  double vy = -0.1;
  double vth = 0.1;
  
  current_time = ros::Time::now();
  double dt = (current_time - last_time).toSec();
  double delta_x = (vx * cos(th) - vy * sin(th)) * dt;
  double delta_y = (vx * sin(th) + vy * cos(th)) * dt;
  double delta_th = vth * dt;
  
  x += delta_x;
  y += delta_y;
  th += delta_th; 
  
  geometry_msgs::Quaternion odom_quat = tf::createQuaternionMsgFromYaw(th);
  
  geometry_msgs::TransformStamped odom_trans;
  odom_trans.header.stamp = current_time;
  odom_trans.header.frame_id = "odom";
  odom_trans.child_frame_id = "base_link";
  
  odom_trans.transform.translation.x = x;
  odom_trans.transform.translation.y = y;
  odom_trans.transform.translation.z = 0.0;
  odom_trans.transform.rotation = odom_quat;
  
  //send the transform
  odom_broadcaster.sendTransform(odom_trans);
  
  last_time = current_time;
  </code></pre>