Robotics StackExchange | Archived questions

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

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 movebaseamcl.launch map:=/pathtosavedmap

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>

Asked by spiritninja on 2019-01-29 03:15:10 UTC

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?

Asked by mgruhler on 2019-01-31 02:07:27 UTC

@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.

Asked by spiritninja on 2019-02-01 00:32:27 UTC

@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

Asked by mgruhler on 2019-02-01 01:57:07 UTC

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

Asked by mgruhler on 2019-02-01 01:57:22 UTC

@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.

Asked by spiritninja on 2019-02-01 02:20:27 UTC

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

Asked by spiritninja on 2019-02-01 02:21:07 UTC

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

Asked by mgruhler on 2019-02-01 02:22:04 UTC

@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.

Asked by gvdhoorn on 2019-02-01 02:24:38 UTC

Answers

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.

Asked by spiritninja on 2019-06-23 10:31:52 UTC

Comments