[Kinetic] rviz navigation map cluttered or inaccurate: how to delete, refresh, or archive?

asked 2017-08-15 01:52:22 -0600

velowander gravatar image

updated 2017-08-16 18:52:06 -0600


Autonomous navigation to a designated in a previously explored location or a location new to the robot


Small (<20 cm high) 3 wheeled (2 drive wheel) Raspberry Pi3 / Arduino equipped "RikiRobot" with a RPLIDAR sensor.


I'm using two small vendor provided robot specific XML files, bringup.launch and navigate.launch (see Appendix below) to start the lidar and roscore nodes, drivers, etc. so the robot can respond to navigation requests.


In rviz, subscribing to the map topic, the robot now has a stored map from a different area. The robot superimposes the local map from the scan lidar topic with the already saved map from a different area; this seems to result in a composite map having no navigation solution; travel in most directions is blocked by barriers in the earlier saved map or the current environment.

I've restarted the Ubuntu 16.04 host as well as the Robot itself; the map seems to be persisting on the Robot because two different hosts see the map when subscribing to the "map" topic on the robot.

Possible problem resolution

I think what I need to do is clear or refresh the map or edit navigate.launch? so the robot will generate a new map appropriate to its current environment. But I don't know how to clear the map either at the command line or from within rviz. The rviz "reset" button does not clear the map.

Thanks for any replies.

Appendix 1: Launch files


  <!--serial communication between arduino and pc via usb /-->
  <node name="arduino_serial_node" pkg="rosserial_python" type="serial_node.py" output="screen">
    <param name="port" value="/dev/rikibase" />
    <param name="baud" value="57600" />

 <node pkg="ros_arduino_imu" type="raw_imu_bridge_node" name="raw_imu_bridge" output="screen" respawn="false">
   imu/gyroscope_bias: {x: -0.013545, y: 0.056887, z: 0.012693 }
   imu/accelerometer_bias: {x: -0.422578, y: 0.053516, z: -0.310391 }
   <param name="imu/perform_calibration" value="false" />

  <node pkg="imu_filter_madgwick" type="imu_filter_node" name="imu_filter_madgwick" output="screen" respawn="false" >
    <param name="use_magnetic_field_msg" value="false" />
    <param name="fixed_frame" value="odom"  />

  <node name="riki_base_node" pkg="rikirobot" type="riki_base_node">
    <param name="angular_scale" type="double" value="1.0" />
    <param name="linear_scale" type="double" value="1.0" />


  <include file="$(find rplidar_ros)/launch/rplidar.launch" />

  <arg name="map_file" default="$(find rikirobot)/maps/house.yaml"/>
  <node pkg="map_server" name="map_server"  type="map_server" args="$(arg map_file)" />

  <include file="$(find rikirobot)/launch/amcl.launch" />
  <include file="$(find rikirobot)/param/move_base.xml" />

Appendix 2: rostopic list

/move_base/global_costmap/static_layer ...
edit retag flag offensive close merge delete


It's not very clear what you're doing. Are you navigating using a map and mapping at the same time? Could you please post your launch files?

jayess gravatar image jayess  ( 2017-08-15 19:11:20 -0600 )edit

How are you subscribing to the map topic? Neither amcl nor move_base perform mapping, many times that's done by gmapping. From the information given, I don't see why your robot would be creating a new map. Is this all there is or are there any other nodes or commands that you're running?

jayess gravatar image jayess  ( 2017-08-15 20:28:54 -0600 )edit

@jayess, thanks for posting. I'm hoping the robot can self-navigate to a designated point, in either a location new to the robot or a previously explored location.

velowander gravatar image velowander  ( 2017-08-15 21:17:38 -0600 )edit

Right. But what about the questions in my previous comment?

jayess gravatar image jayess  ( 2017-08-15 21:20:06 -0600 )edit

@jayess The RikiRobot vendor provided several rviz files, for example navigate.rviz is the companion to navigate.launch, it prefines a subscription to the map and scan topics right in the rviz. I have also experimented with creating my own rviz files.

velowander gravatar image velowander  ( 2017-08-15 21:21:06 -0600 )edit

@jayess I'm running bringup.launch and navigate.launch on the robot, and rviz on the host. I have environment variables defined in my .bashrc but I'm not running anything else per se.

velowander gravatar image velowander  ( 2017-08-15 22:17:21 -0600 )edit

Can you please post a screen shot of your map?

jayess gravatar image jayess  ( 2017-08-15 22:53:20 -0600 )edit

@jayess Thanks for the message. Sorry I'm a new member and don't have enough points to upload. The system requires 5 but I have only 1.

velowander gravatar image velowander  ( 2017-08-16 00:55:30 -0600 )edit