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

Error in Rviz: Rviz loads a non-existent map.

asked 2019-01-29 02:15:10 -0500

spiritninja gravatar image

updated 2019-06-23 11:06:35 -0500

jayess gravatar image

Hello.

Lately I was trying to create a SLAM (2D) map of a room using a Summit_X mobile robot having a Hokuyo utm-30lx laser range finder (LIDAR). Rviz clearly shows the map building process while slam_gmapping is used with the robot. I later save the created map and end the gmapping node.

Now, as I want to localize and proceed with navigating the robot in the created map, I use movebase_amcl.launch. edit: By this mean when I use the command $roslaunch movebase_amcl.launch map:=/path_to_saved_map

Although all topics are set properly on Rviz and there's no issue with the TF tree, soon as I launch move_base amcl, Rviz displays a random map irrelevant to the created map.

Searching online for explanations hasn't turned out fruitful.

Work space: ROS - Indigo. Ubuntu 14.04.

Thanks in advance for any help.

edit: content of the launch file,

<?xml version="1.0"?>
<launch>
  <master auto="start"/>

  <!-- Run the map server -->
  <!-- node name="map_server" pkg="map_server" type="map_server" args="$(find vinbot_demo)/maps/map1.yaml"/ -->

  <!--- Run AMCL -->
  <include file="$(find summit_xl_navigation)/launch/amcl.launch" />
  <remap from="cmd_vel" to="/move_base/cmd_vel" />

  <!-- Run move_base -->
  <node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen">
    <rosparam file="$(find summit_xl_navigation)/config/move_base_params.yaml" command="load" />
    <rosparam file="$(find summit_xl_navigation)/config/costmap_common_params.yaml" command="load" ns="global_costmap" />
    <rosparam file="$(find summit_xl_navigation)/config/costmap_common_params.yaml" command="load" ns="local_costmap" />
    <rosparam file="$(find summit_xl_navigation)/config/local_costmap_params.yaml" command="load" />
    <rosparam file="$(find summit_xl_navigation)/config/global_costmap_params_map.yaml" command="load" />
    <rosparam file="$(find summit_xl_navigation)/config/base_local_planner_params.yaml" command="load" />
  </node>

</launch>
edit retag flag offensive close merge delete

Comments

can you clarify what you mean with:

the map topic having the path of the newly created map

The topic shouldn't have anything to do with the path. You need this where you load the map. Maybe in movebase_amcl.launch?

Could you edit your question with the contents of that file?

mgruhler gravatar image mgruhler  ( 2019-01-31 01:07:27 -0500 )edit

@mgruhler I have edited the question adding the content of movebase_amcl.launch. By 'map topic having the path of the newly created map' I was referring to the command used in the edited question.

spiritninja gravatar image spiritninja  ( 2019-01-31 23:32:27 -0500 )edit

@spiritninja if this is really the launch file you are using, the problem is clear: you don't have a map argument, thus what you type in the command line is going nowhere. Assuming the map_server is in amcl.launch, you need to provide the path to your map there or pass through the respective

mgruhler gravatar image mgruhler  ( 2019-02-01 00:57:07 -0500 )edit

arg, that you still have to add to movebase_amcl.launch.

mgruhler gravatar image mgruhler  ( 2019-02-01 00:57:22 -0500 )edit

@mgruhler Thank you, but yes I have the map argument added in the launch file currently being used. The content of the launch file present here is the basic structure and i'm unable to post the current launch file here due to certain restrictions at work.

spiritninja gravatar image spiritninja  ( 2019-02-01 01:20:27 -0500 )edit

The working launch file is the same except the the correct map argument is present.

spiritninja gravatar image spiritninja  ( 2019-02-01 01:21:07 -0500 )edit

well, then it is hard to help further....

mgruhler gravatar image mgruhler  ( 2019-02-01 01:22:04 -0500 )edit
1

@spiritninja: we don't need an exact copy of what you have. If you're looking for help, please provide an example launch file that shows the same problem you are having.

gvdhoorn gravatar image gvdhoorn  ( 2019-02-01 01:24:38 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-06-23 10:31:52 -0500

spiritninja gravatar image

I guess the problem somehow persisted with multiple ROS version present on the same workspace. Installing ROS newly resolved it. Although the linked path in amcl should have loaded the required map which wasn't happening previously.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2019-01-29 02:15:10 -0500

Seen: 495 times

Last updated: Jun 23 '19