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

What's the status of the "tf_delay" parameter in gmapping?

asked 2014-01-24 08:27:52 -0500

BlitherPants gravatar image

updated 2014-01-24 08:31:02 -0500


I am using ROS Groovy. I have been trying to make slam_gmapping future-date the map->odom transform. In my search I went to the repo listed on the wiki page and found this:

I searched the file and found these lines:

void SlamGMapping::publishTransform()
  ros::Time tf_expiration = ros::Time::now() + ros::Duration(tf_delay_);
  tfB_->sendTransform( tf::StampedTransform (map_to_odom_, tf_expiration, map_frame_, odom_frame_));

This is exactly what I'm looking for: to be able to use "tf_delay" as a parameter in a launch file. However, when I look at my copy of gmapping on my machine, specifically, /opt/ros/groovy/stacks/slam_gmapping/gmapping/src/slam_gmapping.cpp

I am assuming this file is the most updated source code for whatever gmapping executable is launched by the "turtlebot_navigation gmapping_demo.launch" file? this cpp file, there is no "tf_delay" parameter. Instead, the delay is a fixed .05 sec.

I note that the wiki page for gmapping doesn't have this parameter listed either.

I can see on this page ( that there have been talks about this parameter.

My understanding is limited on the repositories and how my ROS software is updated. The GitHub page only has the "groovy_devel" branch but not "groovy" available. Does that mean these changes are not available in the general release?

I am pretty sure whatever I have on my machine now is not incorporating this parameter, as when I add a tf_delay of .3 to my launch file and run rosrun tf tf_monitor odom map, the tf broadcast from slam_gmapping has an average delay of .0005

If anyone can clear this up for me, or explain how to get this parameter integrated without trying to modify and compile my own version of gmapping, I'd appreciate it.


edit retag flag offensive close merge delete


In git, it is hardcoded, somebody has to modify it. actual parameter was "transform_publish_period"

bvbdort gravatar image bvbdort  ( 2014-01-28 08:05:46 -0500 )edit

From looking at the repository, I'm pretty sure "transform_publish_period" is designed for something else and is used separately from the "tf_delay" in the development branch. That would make sense, as I don't want to modify the period, but simply add a delay. Thanks though!

BlitherPants gravatar image BlitherPants  ( 2014-01-28 08:45:08 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2014-03-12 04:05:46 -0500

BlitherPants gravatar image

In case anyone is curious, I eventually downloaded the groovy_devel branch of gmapping and compiled it myself. It does what I expected it to do.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2014-01-24 08:27:52 -0500

Seen: 289 times

Last updated: Mar 12 '14