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

map_server error when loading map

asked 2015-06-11 17:29:35 -0600

updated 2015-06-11 19:49:09 -0600

I have been trying to do autonomous navigation with a pre-constructed map. I have map files called mylaserscan1503201800.pgm and mylaserscan1503201800.yaml. Here is the move_base_amcl.launch code I use:

<launch>

  <!-- Start the map server -->
        <node pkg="map_server" name="map_server" type="map_server" args="`rospack find follow_me_2dnav`/launch/mylaserdata_1503201800.yaml" />

  <!-- Run AMCL -->
        <include file="$(find amcl)/examples/amcl_diff.launch">
                <param name="transform_tolerance" value="0.2" />
                <param name="recovery_alpha_slow" value="0.001" />
                <param name="use_map_topic" value="false" />
                <param name="laser_min_range" value="1.0" />
                <param name="laser_max_range" value="7.0" />
                <param name="laser_likelihood_max_dist" value="2.0" />
                <param name="odom_model_type" value="diff" />
                <param name="odom_frame_id" value="odom" />
                <param name="base_frame_id" value="base_link" />
                <param name="global_frame_id" value="map" />
        </include>

  <!-- Start navigation stack -->
        <node pkg="move_base" name="move_base" type="move_base" respawn="false" output="screen" >
                <rosparam command="load" file="$(find follow_me_2dnav)/params/costmap_common_params.yaml" ns="global_costmap"/>
                <rosparam command="load" file="$(find follow_me_2dnav)/params/costmap_common_params.yaml" ns="local_costmap" />
                <rosparam command="load" file="$(find follow_me_2dnav)/params/local_costmap_params.yaml" />
                <rosparam command="load" file="$(find follow_me_2dnav)/params/global_costmap_params.yaml"/>
                <rosparam command="load" file="$(find follow_me_2dnav)/params/base_local_planner_params.yaml" />
                <param name="controller_frequency" type="double" value="20.0" />
                <param name="planner_patience" value="5.0" />
                <param name="controller_patience" value="15.0" />
                <param name="conservative_reset_dist" value="5.0" />
                <param name="recovery_behavior_enabled" value="true" />
                <param name="clearing_rotation_allowed" value="true" />
                <param name="shutdown_costmaps" value="false" />
                <param name="oscillation_timeout" value="0.0" />
                <param name="oscillation_distance" value="0.5" />
                <param name="planner_frequency" value="0.0" />

        </node>

</launch>

Before running this, I run another launch file that starts the drivers for my mobile robot, Microsoft Kinect, and depthimage_to_laserscan. When I run the move_base_amcl.launch file, I get the following errors.

NODES
  /
    amcl (amcl/amcl)
    map_server (map_server/map_server)
    move_base (move_base/move_base)

ROS_MASTER_URI=http://192.168.0.102:11311

core service [/rosout] found
process[map_server-1]: started with pid [20673]
[ERROR] [1434060433.039753815]:
USAGE: map_server <map.yaml>
  map.yaml: map description file
DEPRECIATED USAGE: map_server <map> <resolution>
  map: image file to load
  resolution: map resolution [meters/pixel]
[map_server-`] process has died [pid 20673, exit code 255, cmd /opt/ros/hydro/lib/map_server/map_server `rospack find follow_me_2dnav`/launch/mylaserdata_150.201800.yaml __name:=map_server __log:=/home/ecejames01/.ros/log/96e36838-1084-11e5-afa8-bc7737e7db9b/map_server-1.log].
log file: /home/ecejames01/.ros/log/96e36838-1084-11e5-afa8-bc7737e7db9b/map_server-1*.log
process[amcl-2]: started with pid [20674]
process[move_base-3]: started with pid [20679]
[ INFO] [1434060434.299816244]: Requesting the map...
[ WARN] [1434060434.311131134]: Request for map failed; trying again...
[ WARN] [1434060434.818731335]: Request for map failed; trying again...

Your help in finding my issue is greatly appreciated. Thanks in advanced.


UPDATE:

I noticed that within my mylaserdata_1503201800.yaml file that the image parameter was map.pgm rather than mylaserdata_1503201800.pgm, which I corrected.

I was able to get the map loaded when running it from the command line:

rosrun map_server map_server `rospack find follow_me_2dnav`/launch/mylaserdata_1503201800.yaml

but I was still unable to get it to load from the launch file.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-06-11 20:42:19 -0600

sudhanshu_mittal gravatar image

In the launch file, instead of <node pkg="map_server" name="map_server" type="map_server" args="``rospack find follow_me_2dnav``/launch/mylaserdata_1503201800.yaml" />

use this <node pkg="map_server" name="map_server" type="map_server" args="$(find follow_me_2dnav)/launch/mylaserdata_1503201800.yaml" />

For more details : link text
$(find pkg) is the right way to use the override behaviour.

edit flag offensive delete link more

Comments

Thanks. I originally tried this method, but was not successful. I had not gone back to try it after correcting my .yaml file.

sealguy77 gravatar image sealguy77  ( 2015-06-12 11:31:46 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2015-06-11 17:29:35 -0600

Seen: 5,762 times

Last updated: Jun 11 '15