Robotics StackExchange | Archived questions

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

Objective

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

Equipment

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

Preparation

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.

Problem

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

bringup.launch

<launch>
  <!--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>

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

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

  <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" />
  </node>
</launch>

navigate.launch

<launch>
  <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" />
</launch>

Appendix 2: rostopic list

/amcl/parameter_descriptions
/amcl/parameter_updates
/amcl_pose
/cmd_vel
/diagnostics
/imu/data
/imu/data_raw
/imu/mag
/imu/magnetic_field
/imu_filter_madgwick/parameter_descriptions
/imu_filter_madgwick/parameter_updates
/initialpose
/map
/map_metadata
/move_base/NavfnROS/plan
/move_base/TrajectoryPlannerROS/cost_cloud
/move_base/TrajectoryPlannerROS/global_plan
/move_base/TrajectoryPlannerROS/local_plan
/move_base/TrajectoryPlannerROS/parameter_descriptions
/move_base/TrajectoryPlannerROS/parameter_updates
/move_base/cancel
/move_base/current_goal
/move_base/feedback
/move_base/global_costmap/costmap
/move_base/global_costmap/costmap_updates
/move_base/global_costmap/footprint
/move_base/global_costmap/inflation_layer/parameter_descriptions
/move_base/global_costmap/inflation_layer/parameter_updates
/move_base/global_costmap/obstacle_layer/parameter_descriptions
/move_base/global_costmap/obstacle_layer/parameter_updates
/move_base/global_costmap/parameter_descriptions
/move_base/global_costmap/parameter_updates
/move_base/global_costmap/static_layer/parameter_descriptions
/move_base/global_costmap/static_layer/parameter_updates
/move_base/goal
/move_base/local_costmap/costmap
/move_base/local_costmap/costmap_updates
/move_base/local_costmap/footprint
/move_base/local_costmap/inflation_layer/parameter_descriptions
/move_base/local_costmap/inflation_layer/parameter_updates
/move_base/local_costmap/obstacle_layer/parameter_descriptions
/move_base/local_costmap/obstacle_layer/parameter_updates
/move_base/local_costmap/parameter_descriptions
/move_base/local_costmap/parameter_updates
/move_base/parameter_descriptions
/move_base/parameter_updates
/move_base/result
/move_base/status
/move_base_simple/goal
/odom
/particlecloud
/pid
/raw_imu
/raw_vel
/rosout
/rosout_agg
/scan
/tf
/tf_static

Appendix 3: rviz screenshots

Note comments on each screenshot on the imgur site http://i.imgur.com/sF4sMy7.png http://i.imgur.com/GZrwgFQ.png http://i.imgur.com/zCYNTjo.png http://i.imgur.com/NWsZ4ji.png

Asked by velowander on 2017-08-15 01:52:22 UTC

Comments

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?

Asked by jayess on 2017-08-15 19:11:20 UTC

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?

Asked by jayess on 2017-08-15 20:28:54 UTC

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

Asked by velowander on 2017-08-15 21:17:38 UTC

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

Asked by jayess on 2017-08-15 21:20:06 UTC

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

Asked by velowander on 2017-08-15 21:21:06 UTC

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

Asked by velowander on 2017-08-15 22:17:21 UTC

Can you please post a screen shot of your map?

Asked by jayess on 2017-08-15 22:53:20 UTC

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

Asked by velowander on 2017-08-16 00:55:30 UTC

You can always post a link to it, such as from imgur

Asked by jayess on 2017-08-16 14:51:52 UTC

@jayess Thanks once again for your reply and for the suggestion. I added an Appendix 3 for rviz screenshots. Each of the 4 screenshots has a description on imgur.

Asked by velowander on 2017-08-16 18:16:28 UTC

Answers