Timed out waiting for transform from base_footprint to map to become available before running costmap

asked 2022-07-19 21:28:07 -0500

RyanChen.YLC gravatar image

As title,

When running move_base, this warning showed up and then process died.

details about the error message:

ROS_MASTER_URI=http://localhost:11311

process[map_server-1]: started with pid [40976]
process[cartographer-2]: started with pid [40977]
process[move_base-3]: started with pid [40978]
[ WARN] [1658282219.609009842, 358.055000000]: 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 358.054 timeout was 0.1.
[ INFO] [1658282220.096382994, 358.392000000]: global_costmap: Using plugin "static_layer"
[ INFO] [1658282220.112678754, 358.410000000]: Requesting the map...
[ INFO] [1658282220.360217662, 358.614000000]: Resizing costmap to 379 X 374 at 0.050000 m/pix
[ INFO] [1658282220.479364155, 358.713000000]: Received a 379 X 374 map at 0.050000 m/pix
[ INFO] [1658282220.485903135, 358.718000000]: global_costmap: Using plugin "obstacle_layer"
[ INFO] [1658282220.491388655, 358.721000000]:     Subscribed to Topics: scan
[ INFO] [1658282220.511445313, 358.738000000]: global_costmap: Using plugin "inflation_layer"
[ INFO] [1658282220.605130716, 358.812000000]: Waypoint planner has been initialized
[ INFO] [1658282220.618342603, 358.823000000]: local_costmap: Using plugin "obstacle_layer"
[ INFO] [1658282220.622837668, 358.823000000]:     Subscribed to Topics: scan
[ INFO] [1658282220.649877107, 358.845000000]: local_costmap: Using plugin "inflation_layer"
[ INFO] [1658282220.712694613, 358.890000000]: Created local_planner teb_local_planner/TebLocalPlannerROS
[ INFO] [1658282220.818135275, 358.960000000]: Footprint model 'line' (line_start: [0,0]m, line_end: [0.4,0]m) loaded for trajectory optimization.
[ INFO] [1658282220.818325887, 358.960000000]: Parallel planning in distinctive topologies enabled.
[ INFO] [1658282220.818387784, 358.960000000]: No costmap conversion plugin specified. All occupied costmap cells are treaten as point obstacles.
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
[move_base-3] process has died [pid 40978, exit code -6, cmd /opt/ros/noetic/lib/move_base/move_base map:=map odom:=/odom_combined cmd_vel:=/navigation/cmd_vel __name:=move_base __log:=/home/usun/.ros/log/3659fbfe-07cf-11ed-b050-e1cb1d9ec4be/move_base-3.log].
log file: /home/usun/.ros/log/3659fbfe-07cf-11ed-b050-e1cb1d9ec4be/move_base-3*.log

This seems to be a tf error, but when I looked up the tf tree, all the frames connected, see image below.

image description

I've tried to set transform_tolerance parameters of costmaps to 10.0, process still died.

Any suggestion will be highly appreciated. Thanks.

edit retag flag offensive close merge delete

Comments

I guess that process died due to "

terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc

"

But still no idea how to solve.

RyanChen.YLC gravatar image RyanChen.YLC  ( 2022-07-20 00:52:49 -0500 )edit

You can try to split the launchfile and launch it all step by step. 1. mapserver 2. cartographer 3. movebase

yaiin gravatar image yaiin  ( 2022-07-21 02:48:44 -0500 )edit

Update:

I think this error does not come from the codes, maybe the system problem, because I reinstalled my Ubuntu 20.04 and ros noetic, cloned same project, then ran it. No error showed up.

RyanChen.YLC gravatar image RyanChen.YLC  ( 2022-07-21 21:43:01 -0500 )edit

@yaiin Thanks for replying. As I updated, the codes can be run very well. Although there's no error showing up now, I still don't know where the previous error came from. I will keep trying to reproduce this error and solve it. Thanks again.

RyanChen.YLC gravatar image RyanChen.YLC  ( 2022-07-21 21:45:47 -0500 )edit

Hi @RyanChen.YLC, I have the same problem too. Do you have any idea now?

One2INF gravatar image One2INF  ( 2022-07-31 22:38:44 -0500 )edit

Hi, @One2INF.

I think this error may come from the installation of the code (Movebase, TEB, ... etc).

Maybe try git clone source codes to your workspace and run the project again.

RyanChen.YLC gravatar image RyanChen.YLC  ( 2022-08-01 19:47:53 -0500 )edit