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

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

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.

I can see on this page (https://github.com/ros-perception/slam_gmapping/pull/1) 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.

Thanks!

edit retag flag offensive close merge delete

Comments

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

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
0

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

Stats

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

Seen: 286 times

Last updated: Mar 12 '14