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

How to solve the Costmap2DROS transform timeout?

asked 2016-07-05 21:24:23 -0500

peppe gravatar image

Hi everyone,

I have been following this tutorial and I was able to reproduce it until the last point: Navigating in the map. I did not modify any of the parameters provided by the tutorial and I am just trying to reproduce the screenshots.

However, when I try to navigate the robot in rviz with the 2D Nav Goal button, the robot does not move, and in the master terminal I keep getting the warning:

[ WARN] [1467770020.472781433]: Costmap2DROS transform timeout. Current time: 1467770020.4727, global_pose stamp: 1467770014.8758, tolerance: 0.3000

One more thing that I noticed is that if I run rosrun tf tf_monitor I get that the publisher is unknown, instead of the robot_state_publisher:

Frame: wide_stereo_r_stereo_camera_optical_frame published by unknown_publisher Average Delay: -0.484559 Max Delay: 0

I suppose that the two problems are related, but I can't figure out a way to solve them. Do you have any idea how to fix this problem?

Thank you in advance for your help.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-07-07 06:03:29 -0500

peppe gravatar image

To solve this problem I had to add this line in morse_2dnav/nav.launch:

<param name ="/use_sim_time" value="true"/>

Moreover, I add to add these lines in the nav_tutorial/default.py

clock = Clock()
robot.append(clock)
clock.add_interface('ros',topic='/clock')

I guess that the problem had to do with a poor synchronization between MORSE and ROS. I hope this helps others.

edit flag offensive delete link more

Comments

where did you gind these "morse_2d/nav.launch" and "nav_tutorial/default.py" files? I try searching for both of them but there is no such file or directory. I have a turtlebot 3 with ROS kinetic installed trying to follow the same tutorial for setting a 2D nav goal, but I get the same error.

ltelang gravatar image ltelang  ( 2017-10-31 07:46:46 -0500 )edit

Thanks it really did the trick!

areis gravatar image areis  ( 2019-03-04 13:14:59 -0500 )edit

thanks for the answer, this line works only with the simulation, but not with the real robot.

any other ideia?

engcarolinasoares gravatar image engcarolinasoares  ( 2019-06-13 09:40:17 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2016-07-05 21:24:23 -0500

Seen: 4,352 times

Last updated: Jul 07 '16