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

rosrun map_server map_server couldn't find executable

asked 2016-09-22 06:38:02 -0500

zinkcious gravatar image

updated 2016-09-24 21:32:51 -0500

I'm following ros-by-example book and in chapter 8, I'm dealing with things in navigation package.

I install the navigation package using 'sudo apt-get install ros-indigo-navigation', it automatically installed "move_base", "map_server", "gmapping" etc packages. After that I can run move_base package using "rosrun move_base move_base" and it shows no error.

But when I input "rosrun map_server map_server", it shows:

[rosrun] Couldn't find executable named map_server below /opt/ros/indigo/share/map_server
[rosrun] Found the following, but they're either not files,
[rosrun] or not executable:
[rosrun]   /opt/ros/indigo/share/map_server

By the way, if I attempt to run it in a launch file as follows

  <!-- Run the map server with a blank map -->
  <node name="map_server" pkg="map_server" type="map_server" args="$(find rbx1_nav)/maps/blank_map.yaml"/>

  <include file="$(find rbx1_nav)/launch/fake_move_base.launch" />

  <!-- Run a static transform between /odom and /map -->
  <node pkg="tf" type="static_transform_publisher" name="odom_map_broadcaster" args="0 0 0 0 0 0 /map /odom 100" />


It shows

ERROR: cannot launch node of type [map_server/map_server]: can't locate node [map_server] in package [map_server]

By the way, I can go to the map_server package directory via "roscd map_server", there are a package.xml file and a cmake folder in the directory.

Can anyone help me ? I'm trying to run the SLAM feature in ROS.

edit retag flag offensive close merge delete


I assume you meant "sudo apt-get install ros-indigo-navigation"?

sloretz gravatar image sloretz  ( 2016-09-22 10:13:26 -0500 )edit

anyone knows?

zinkcious gravatar image zinkcious  ( 2016-09-24 00:25:09 -0500 )edit

Yes, I mean "sudo apt-get install ros-indigo-navigation", I have corrected it, thanks

zinkcious gravatar image zinkcious  ( 2016-09-24 21:22:25 -0500 )edit

@zinkcious were you able to solve this issue?

eric_cartman gravatar image eric_cartman  ( 2018-06-27 22:20:51 -0500 )edit

3 Answers

Sort by » oldest newest most voted

answered 2018-06-09 07:48:21 -0500

tik0 gravatar image

I am currently working under kinetic and can reproduce this behavior very easily as follows:

  • If I source my own catkin environment like source <my_catkin_folder>/devel/setup.bash and then run rosrun map_server map_server it tells me Couldn't find executable named map_server.
  • If I source the origin source /opt/ros/<distro>/setup.bash, everything works like a charm

Investigation: Turned out I was in copy-paste marathon of packages and so I tainted my own workspace with packages which have the same name. This confuses rosrun as follows: If one investigates rosrun at line 52, one will see that it tries to find your desired package via catkin_find. And this command is very fragile when it comes to tainted workspaces. Unfortunately, the creator decided to pipe the error outputs to /dev/null which leaves the user with no clue.

Solution: Just investigate the command by hand and see what goes wrong: catkin_find --without-underlays --libexec --share map_server. In my case it gave me:

Multiple packages found with the same name "calib":
- teleworkbench/calib
- teleworkbench/map_generator

I also made a PR to solve this once and for all

edit flag offensive delete link more

answered 2016-09-24 04:30:14 -0500

Akif gravatar image

To just to be sure that you have map_server installed, can you run sudo apt-get install ros-indigo-map-server ? (I assume you have indigo distro).

edit flag offensive delete link more


I have tried this, it tells me that it already has been installed and no need for updates.

zinkcious gravatar image zinkcious  ( 2016-09-24 21:19:06 -0500 )edit

Do you have any other suggestions?

zinkcious gravatar image zinkcious  ( 2016-09-24 21:23:18 -0500 )edit

What is the resulting path when you run roscd map_server ?

Akif gravatar image Akif  ( 2016-09-25 08:15:16 -0500 )edit

/opt/ros/indigo/share/map_server I'm still stuck on this problem..

zinkcious gravatar image zinkcious  ( 2016-09-26 08:39:04 -0500 )edit

Weird. Maybe you had a problem in installation process of ROS. You may try a clean install if applicable.

Akif gravatar image Akif  ( 2016-09-28 07:56:00 -0500 )edit

answered 2020-10-09 23:46:35 -0500

Nagarjun gravatar image

Hi guys, I had the same problem, I solved by:

1) First I uninstall my navigation package 2) I tried installing it using 'sudo apt-get install ros-melodic-navigation'...(I also tried sudo apt-get install ros-melodic-map-server') 3) This install few new packages but those are installed in your root ros directory as software but not in your src as a package. 4) So I installed the navigation package again using: git clone 5) Did catkin_make 6) you will get cmake errors as:

CMake Warning at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:76 (find_package): Could not find a package configuration file provided by "tf2_sensor_msgs" with any of the following names:


7) Now install the missing msgs as: sudo apt-get install ros-melodic-tf2-sensor-msgs

8) make your map_saver executable by using chmod +x mapsaver (where your file is located).

9) Now run you MapServer command: rosrun map_server map_saver -f map

This will save your map.

I think the error not executable is due to some missing packages... if though we made it executable at first we are unable to run the command.

edit flag offensive delete link more

Question Tools



Asked: 2016-09-22 06:38:02 -0500

Seen: 6,522 times

Last updated: Oct 09 '20