Robotics StackExchange | Archived questions

Costmap2DROS transform timeout. Current time: 493.0920, global_pose stamp: 492.2210, tolerance: 0.5000

Hello,

First, I'd like to say that i read other topic that had this error but couldn't find any solution out of the 15 post i read.

I'm trying to do a navigation simulation using gazebo and rviz on ros kinetic and ubuntu 16.04.7.

In my navigation launch file I use 4 nodes which are move_base, amcl, map_server and rviz. Link of the files at the end of the post

The problem is that few seconds after launch I start get warning about the robot position which is apparently not received or outdated. The robot is displayed on rviz but cannot navigate at all.

This bellow is the warnings i get when i start navigation.launch I'm not sure to really understand the warnings.

process[move_base_node-1]: started with pid [11793]
process[map_server-2]: started with pid [11794]
process[amcl-3]: started with pid [11799]
process[rviz-4]: started with pid [11823]
[ INFO] [1620717626.845437836, 478.530000000]: Requesting the map...
[ INFO] [1620717626.851227070, 478.533000000]: Received a 385 X 236 map @ 0.050 m/pix

[ INFO] [1620717626.883492238, 478.545000000]: Initializing likelihood field model; this can take some time on large maps...
[ INFO] [1620717626.936161327, 478.567000000]: Done initializing likelihood field model.
[ WARN] [1620717639.165987385, 483.610000000]: Timed out waiting for transform from base_footprint to map to become available before running costmap, tf error: canTransform: target_frame map does not exist.. canTransform returned after 0.1 timeout was 0.1.
[ WARN] [1620717651.736227482, 488.710000000]: Timed out waiting for transform from base_footprint to map to become available before running costmap, tf error: canTransform: target_frame map does not exist.. canTransform returned after 0.1 timeout was 0.1.
[ INFO] [1620717660.416085662, 492.269000000]: Using plugin "static_layer"
[ INFO] [1620717660.439320101, 492.277000000]: Requesting the map...
[ INFO] [1620717660.712104740, 492.380000000]: Resizing costmap to 385 X 236 at 0.050000 m/pix
[ INFO] [1620717660.957746166, 492.480000000]: Received a 385 X 236 map at 0.050000 m/pix
[ INFO] [1620717660.971553739, 492.483000000]: Using plugin "inflation_layer"
[ INFO] [1620717661.000677942, 492.494000000]: Using plugin "obstacle_layer"
[ INFO] [1620717661.008311355, 492.497000000]:     Subscribed to Topics: scan2 scan3
[ INFO] [1620717661.302711958, 492.622000000]: Using plugin "obstacle_layer"
[ INFO] [1620717661.311498776, 492.625000000]:     Subscribed to Topics: scan2 scan3
[ INFO] [1620717661.459331030, 492.685000000]: Using plugin "inflation_layer_local"
[ INFO] [1620717661.597994774, 492.743000000]: Created local_planner dwa_local_planner/DWAPlannerROS
[ INFO] [1620717661.608702179, 492.747000000]: Sim period is set to 0.20
[ WARN] [1620717662.481112605, 493.092000000]: Costmap2DROS transform timeout. Current time: 493.0920, global_pose stamp: 492.2210, tolerance: 0.5000
[ WARN] [1620717664.971351347, 494.092000000]: Costmap2DROS transform timeout. Current time: 494.0920, global_pose stamp: 492.2210, tolerance: 0.5000
[ WARN] [1620717667.382094815, 495.092000000]: Costmap2DROS transform timeout. Current time: 495.0920, global_pose stamp: 492.2210, tolerance: 0.5000
[ WARN] [1620717669.824983820, 496.092000000]: Costmap2DROS transform timeout. Current time: 496.0920, global_pose stamp: 492.2210, tolerance: 0.5000
[ WARN] [1620717672.293558718, 497.092000000]: Costmap2DROS transform timeout. Current time: 497.0920, global_pose stamp: 492.2210, tolerance: 0.5000
[ WARN] [1620717674.831612152, 498.092000000]: Costmap2DROS transform timeout. Current time: 498.0920, global_pose stamp: 492.2210, tolerance: 0.5000
[ WARN] [1620717677.288466602, 499.092000000]: Costmap2DROS transform timeout. Current time: 499.0920, global_pose stamp: 492.2210, tolerance: 0.5000
[ INFO] [1620717678.899110554, 499.740000000]: Recovery behavior will clear layer obstacle_layer
[ INFO] [1620717678.906033105, 499.743000000]: Recovery behavior will clear layer obstacle_layer
[ INFO] [1620717678.906121631, 499.743000000]: Recovery behavior will clear layer inflate_layer
[ WARN] [1620717682.157018363, 501.084000000]: Costmap2DROS transform timeout. Current time: 501.0840, global_pose stamp: 500.5380, tolerance: 0.5000
[ WARN] [1620717682.157136729, 501.084000000]: Could not get robot pose, cancelling reconfiguration

Also if I wait for a while i get this error :

Extrapolation Error looking up robot pose: Lookup would require extrapolation at time 5725.281000000, but only time 5726.151000000 is in the buffer, when looking up transform from frame [base_footprint] to frame [map]

Different files I have :

globalcostmap: globalframe: map
robotbaseframe: basefootprint
update
frequency: 2.0
publishfrequency: 2.5 staticmap: true # Set to false allow after using AggClearCostMapRecovery to replan correctly a path, default:true false lead to warning The origin for the sensor at (0.57, -3.01, 1.09) is out of map bounds transformtolerance: 0.5 alwayssendfullcostmap: true plugins: - {name: staticlayer, type: "costmap2d::StaticLayer"} - {name: inflationlayer, type: "costmap2d::InflationLayer"} - {name: obstaclelayer, type: "costmap2d::VoxelLayer"}

localcostmap: globalframe: odom
robotbaseframe: basefootprint
update
frequency: 5.0
publishfrequency: 2.0 staticmap: false #false rollingwindow: true
width: 4.0 height: 4.0
resolution: 0.05
transform
tolerance: 0.5 plugins: #- {name: staticlayer, type: "costmap2d::StaticLayer"} - {name: obstaclelayer, type: "costmap2d::VoxelLayer"} - {name: inflationlayerlocal, type: "costmap_2d::InflationLayer"}

Asked by tomkimsour on 2021-05-11 03:08:04 UTC

Comments

Are the linux time-of-day clocks synchronized on every ROS node? Most people run either systemd-timesyncd or ntp to accomplish this.

Asked by Mike Scheutzow on 2021-09-06 14:25:42 UTC

Answers

You have specified map as the global frame for the global_costmap.

You need to publish map -> base_link transform. You can look at the gmapping package for that.

Asked by skpro19 on 2021-05-11 07:59:16 UTC

Comments

That's what i did. But the error keeps appearing. It might be due to the hardware tho because the program works on another computer without errors.

Asked by tomkimsour on 2021-05-18 06:07:49 UTC