ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

ejkreinar's profile - activity

2014-08-19 07:00:39 -0500 received badge  Student (source)
2013-11-01 18:23:28 -0500 received badge  Supporter (source)
2013-03-16 14:15:26 -0500 received badge  Famous Question (source)
2013-02-07 15:20:59 -0500 received badge  Notable Question (source)
2012-12-08 06:57:14 -0500 received badge  Popular Question (source)
2012-11-28 06:24:28 -0500 commented question Odometry transform lookup fails in AMCL node

No, it happens during normal function. Also to note, Ive tested amcl with stageros publishing the odom->base_link transform, which works without any tf errors.

2012-11-28 04:36:55 -0500 asked a question Odometry transform lookup fails in AMCL node

Hi,

I'm new to working with tf so any input would be really appreciated.. I'm broadcasting an odom->base_link transform at 10 Hz. When I run my amcl node, I get the following warning:

[ WARN] [1354118581.042450543]: Failed to compute odom pose, skipping scan (Unable to lookup transform, cache is empty, when looking up transform from frame [/base_link] to frame [/odom])

I'm working with a slightly modified AMCL node, but it is based on the navigation stack's AMCL, and the transform listener/ odometry lookup works exactly the same.

Some debugging...

If I explicitly wait for the transform to arrive in the amcl getOdomPose function (shown below), the base_link->odom transform lookup works:

this->tf_->waitForTransform(odom_frame_id_, f, t, ros::Duration(0.1));
this->tf_->transformPose(odom_frame_id_, ident, odom_pose);

Or if I future-date the transform before broadcasting in the odometry node (shown below), the base_link->odom transform lookup also works:

odom_broadcaster_.sendTransform(
  tf::StampedTransform(tf::Transform(tf::createQuaternionFromYaw(tht_), tf::Vector3(x_, y_, 0.0)),
  ros::Time::now()+ros::Duration(0.1), "odom", "base_link"));

I am not particularly happy with either of these fixes. Waiting for the transform causes the running time of the AMCL to take a huge hit. And I'm nervous about future dating the odometry because the position would be wrong if tf performs interpolation. I could increase the publishing rate of odometry from 10Hz to 20-30 Hz or so, but that doesnt seem to be a catch-all solution to me.

What is the accepted way to make sure amcl received the base_link->odom transform correctly?