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

Hi,

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: https://github.com/ros-perception/slam_gmapping/blob/groovy-devel/gmapping/src/slam_gmapping.cpp

I searched the file and found these lines:

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


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?

...in 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.

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.

Thanks!

edit retag close merge delete

In git, it is hardcoded, somebody has to modify it. actual parameter was "transform_publish_period" http://wiki.ros.org/gmapping#Parameters

( 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!

( 2014-01-28 08:45:08 -0500 )edit

Sort by » oldest newest most voted

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.

more
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.1840142160654068, "perplexity": 2934.117976336035}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 20, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2021-21/segments/1620243989018.90/warc/CC-MAIN-20210509213453-20210510003453-00598.warc.gz"}