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

map_server does not load map

asked 2015-05-11 06:17:31 -0500

Hi everyone,

we are trying to run a stage simulation for our robot. So far we have already tested a simulation of our lab map (generated with gmapping and a sick laser) which worked fine. Here you can find the files [PGM] [YAML] for the generated map.

Our problem comes when we map the entire floor of the building, again with gmapping and a sick laser. The generated map seems to be correct, at least we did not noticed any significative differences with de format of the smaller one. However, in this case, the map_server dies when trying load the map without raising any error. The files for the bigger map are [PGM] [YAML].

Watching the logs it seems that the map_server tries to load the map with no success and dies without notifying any errors. Since we are using the same config and procedure to generate both maps, we suspect that the problem might come when loading the map.

We would appreciate any ideas or hints that might help us to solve this issue.

The launch_file we are using is the following:


  <arg name="map" default="$(find maps)/roboticslab_complete.yaml"/>
  <arg name="navmap" default="$(find maps)/roboticslab_complete.yaml"/>
  <arg name="locations" default="$(find maps)/roboticslab_complete.yaml"/>
  <arg name="world" default="$(find config)/"/>

  <param name="map" type="string" value="$(arg map)"/>
  <param name="navmap" type="string" value="$(arg navmap)"/>
  <param name="locations" type="string" value="$(arg locations)"/>

  <!-- Robot parameters -->
  <param name="shape" type="string" value="$(find config)/mbot_shape-1px_5mm-c67_47.yaml"/>
  <rosparam file="$(find config)/mbot.yaml"/>

  <!-- Stage simulator -->
  <node name="stage" pkg="stage_ros" type="stageros" args="$(arg world)">
    <remap from="base_scan" to="scan"/>

  <!-- LIDAR position -->
  <node pkg="tf" type="static_transform_publisher" name="laser_broadcaster"
        args="0 0 0 0 0 0 /base_laser_link /laser_frame 100"
        required="true" />  

  <!-- Run the map server -->
  <node name="map_server" pkg="map_server" type="map_server" args=" $(arg map)" required="true" output="screen">
      <param name="frame_id" value="/map" />

  <!--- AMCL -->
  <include file="$(find launch)/mbot/amcl.launch"/>

  <!-- Navigation -->
  <node name="navigation" pkg="scout_navigation" type="navigator">
    <param name="~guidance_method" type="string" value="fmm"/>
    <param name="~platform_mode" type="string" value="omni"/>

  <!-- Web console -->
  <node name="webconsole" pkg="webconsole" type="server">
    <param name="~home" type="string" value="home_mbot.html"/>


The world file we are using for both maps is the following:

include ""

define lidar ranger
    range [ 0.0 5.6 ]
    fov 240
   samples 680

  # generic model properties
  color "black"
  size [ 0.05 0.05 0.1 ]

define lidar2 ranger
    range [ 0.0 5.9 ]
    fov 360
   samples 1020

  # generic model properties
  color "black"
  size [ 0.05 0.05 0.1 ]

define mbot position
  size [0.650 0.445 0.522]
  origin [0 0 0 0]
  gui_nose 1
  drive "omni"
  #lidar(pose [  0.300 0.000 0.137 0.000 ])
  lidar2(pose [  0.000 0.000 0.137 0.000 ])
  # UNSUPPORTED lidar(pose2 [ -0.230 0.000 0.137 180 ])
  localization "odom"

define floorplan model
  # sombre, sensible, artistic
  color "gray30"

  # most maps will need ...
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-05-11 06:56:32 -0500

We realized that we had a typo in the name of the map config file.

It seems that map_server does not tell you if does not find the correct file.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2015-05-11 06:17:31 -0500

Seen: 3,577 times

Last updated: May 11 '15