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

Revision history [back]

click to hide/show revision 1
initial version

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.

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 tb3_simulation_launch.py, which in turn runs bringup_launch.py. If you don't provide an explicit map at this stage, the default will be used.

I think the maps are provided here:

https://github.com/ros-planning/navigation2/tree/foxy-devel/nav2_bringup/bringup/maps

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.

https://github.com/ros-planning/navigation2/blob/foxy-devel/nav2_bringup/bringup/params/nav2_params.yaml#L241

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?