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

Nav2 tutorial not working on foxy

asked 2021-08-26 06:57:18 -0500

SalahSoliman gravatar image

updated 2022-02-20 18:55:41 -0500

lucasw gravatar image

I have ubuntu 20.04, ROS Foxy, and I have tried installing Nav2 using sudo apt-get and from source but neither worked for me. The issue exactly: following the "running the example" section, the robot opens in Gazebo after a very long time, also RViz opens but the robot doesn't appear. When I try to change the fixed frame in RViz the whole thing crashes.

This is the final message before it dies:

`[map_server-5] Magick: abort due to signal 11 (SIGSEGV) "Segmentation Fault"...

[ERROR] [map_server-5]: process has died [pid 16670, exit code -6, cmd '/opt/ros/foxy/lib/nav2_map_server/map_server --ros-args -r __node:=map_server --params-file /tmp/tmpvfuy6r6q -r /tf:=tf -r /tf_static:=tf_static']. image description

Link to the tutorial I was following

I've tried it on three different computers, same exact error (all three computers have the same ubuntu, ros, and gazebo versions)

Should I go to a previous commit or something for Nav2?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2021-08-26 08:48:41 -0500

Per Edwardsson gravatar image

updated 2021-08-27 04:31:38 -0500

I have gotten that error when I have tried to open a map that doesn't exist. In particular, the yaml file points to a pgm file with an absolute path. If you move both these files, the node will find the yaml, but the yaml can't find the pgm, because it has been moved. The solution, for me, was to open the yaml file and use a relative path instead.

Okay, I think that the problem is that the map_server node looks for a yaml file which in turn will point to a pgm file that can be viewed as an image. The error you received is something I have received when the node could find the yaml file, but the yaml file did not point to the correct place. Let's have a look at your situation.

The tutorial you are following suggests to open, which in turn runs If you don't provide an explicit map at this stage, the default will be used.

I think the maps are provided here:

If you are trying to use this map, as long as these two files are in the same folder, it should work fine. By default, it looks like this is the map it is trying to open, too.

Now, to figure out if your setup should work, ask yourself this: are you supplying the node with an argument showing where the map is? If not, have you moved the maps folder?

edit flag offensive delete link more


Thank you for your reply! I have checked all the files in the nav2_bringup, nothing is referring the pgm, may you please advise where to find this pgm and/or where is references in the nav2_bringup package.

SalahSoliman gravatar image SalahSoliman  ( 2021-08-26 13:38:31 -0500 )edit

Updated the answer, have a look at the links.

Per Edwardsson gravatar image Per Edwardsson  ( 2021-08-27 04:32:07 -0500 )edit

Same issue with Magick here...

jginesclavero gravatar image jginesclavero  ( 2021-10-20 04:16:21 -0500 )edit

Thanks @Per Edwardsson, Actually I managed to make it work, the problem was that I was installing it using sudo apt, I think installing it from source is better for some reason, It just happened to work.

SalahSoliman gravatar image SalahSoliman  ( 2021-10-22 03:48:46 -0500 )edit

Question Tools



Asked: 2021-08-26 06:57:18 -0500

Seen: 743 times

Last updated: Aug 27 '21