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

Navigation stack tutorial: move_base crashes: bad_alloc thrown, gdb output attached

asked 2012-02-06 02:10:42 -0500

Hi,

This is a question that is related to

http://answers.ros.org/question/3800/error-on-navstack-with-p3dx-robot-aborting-because

It is a follow-up in the sense that in the previous question I proposed to use AMCL and a pre-made map as in the ROS tutorials. In the previous question, I was not using a pre-made map. I was using Gmapping and making the map as I went along. This time I am running AMCL, pretty similar to the tutorial described in:

http://www.ros.org/wiki/navigation/Tutorials/RobotSetup

While following this tutorial, the move_base node dies even before I send a navigation goal. Upon searching ROS-Answers for similar questions, I came across

http://answers.ros.org/question/316/move_base-node-dies-cant-tell-why

where the solution was investigated by running gdb and running a back trace. I have attempted the same, and the results of the back trace are attached.

My Procedure

  1. Run Motor drivers
  2. Run Laser drivers
  3. Run relevant transforms
  4. Run pre-made map through map server. Map YAML
  5. Run Navigation : Launch file , costmap_common_params , local_costmap_params , global_costmap_params , base_local_planner .

After a few seconds, the terminal where I run the navigation launch file crashes. Here is the output of that terminal along with the gdb backtrace : output with backtrace

Other Relevant Data

I hope this information is sufficient. Please ask me anything else that you might require.

Cheers!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2012-02-06 02:38:40 -0500

DimitriProsser gravatar image

I would run top while you try to run this program to see how much of your system memory you are consuming. You're using a 4000x4000 pixel map, so this could easily use the majority of your RAM. Maybe I read it wrong, but it looked like you loaded this map more than once in the backtrace. This could explain your problem.

edit flag offensive delete link more

Comments

I can see what you mean. However, I only used the command "rosrun map_server map_server *.yaml" once and before running the navigation launch file. I will try running top and see if it is because I'm using such a large map. Perhaps I could also make the map smaller? I'm not sure how, but i'll try.
Shanker gravatar image Shanker  ( 2012-02-06 19:07:54 -0500 )edit

Thanks for your answer Dimitri, it was indeed because the default parameters for gmapping, create a map that starts with 200X200 m. Ofcourse it is possible to change the start size of the map using gmapping parameters (xmin, ymax etc.). A small starting map size worked. Thanks!

Shanker gravatar image Shanker  ( 2012-02-21 03:27:11 -0500 )edit

Question Tools

Stats

Asked: 2012-02-06 02:10:42 -0500

Seen: 1,473 times

Last updated: Feb 06 '12