move_base with custom global planner: process has died: exit code -11

asked 2021-04-28 21:56:02 -0500

Guapiii gravatar image

updated 2021-04-29 03:01:47 -0500

When I run my own global_planner as a plugin-package, It only runs for a few minutes before it returns an error. as follows:

[move_base-4] process has died [pid 25024, exit code -11, cmd /opt/ros/melodic/lib/move_base/move_base cmd_vel:=/cmd_vel odom:=odom __name:=move_base __log:=/home/Guapiii/.ros/log/c0843674-a893-11eb-84fb-04d4c4afb67f/move_base-4.log].
log file: /home/Guapiii/.ros/log/c0843674-a893-11eb-84fb-04d4c4afb67f/move_base-4*.log
  1. In my log directory: /home/Guapiii/.ros/log/c0843674-a893-11eb-84fb-04d4c4afb67f/ , There is no log file names move_base-4*.log Why?
  2. What is the cause of this error? [move_base-4] process has died [pid 25024, exit code -11
  3. Where can I get the reason for these error code?

My ROS version is Melodic. Looking forward to your reply!

edit retag flag offensive close merge delete

Comments

1

-11 is a SEGFAULT, typically caused by out-of-bounds array/vector access, invalid pointer dereferences (use after free for instance) and similar problems.

I'd suggest compiling your code in debug mode and running the move_base node inside gdb (or some other debugger) and then wait for it to crash.

It might be good to get some experience debugging applications before you start with move_base. Especially learning how to print and interpret backtraces would be good.

gvdhoorn gravatar image gvdhoorn  ( 2021-04-29 00:29:52 -0500 )edit

Thanks for your answer! I will learn about debugging as you said.

Guapiii gravatar image Guapiii  ( 2021-04-29 03:06:19 -0500 )edit

Did you get any solution? I am having the exact same problem.

Kanishk598 gravatar image Kanishk598  ( 2021-09-05 10:19:28 -0500 )edit

I had the exact problem. Not 100% sure the following is the solution but it worked for me. The globalPlanner() class constructor is overloaded. One with NO arguments and the other with arguments (std::string name, costmap_2d::Costmap2DROS* costmap_ros). I had the following line in the constructor with no arguments private_nh.param("step_size", step_size_, costmap_->getResolution());. (I now understand that was stupid of me to do that :-D). So I think essentially, if there are lines of code that seems innocuous on first glance should be commented out leaving the very minimal ones should do the trick (debugging as suggested by gvdhoorn is the proper way).

2nd thing: After correcting the above, I had this strange symbol look error which said _ZN18base_loc al_planner12CostmapModelC1ERKN10costmap_2d9Costmap2DE . Solved by adding base_local_planner to the find_package() in CMakeLists.txt

shyamashi gravatar image shyamashi  ( 2022-11-12 06:57:12 -0500 )edit

Did you get any solutions? I am having the exact same problem.

MartinLHX gravatar image MartinLHX  ( 2023-05-11 03:23:46 -0500 )edit