When using navigation, map and global map couldn't delete obstacles

asked 2017-03-07 05:25:14 -0600

stevenlin gravatar image

updated 2017-03-14 02:47:21 -0600


I'm new in ROS, and I'm trying to use navigation with turtlebot.

My ROS and Ubuntu version as following:

Ubuntu: 14.04 
ROS: indigo

Question 1:

I run my launch file ($ roslaunch turtlebot_gazebo turtlebot_navigation.launch), and use "2D Nav Goal" of rviz to navigate, when I removed the wall of obstacle, I found the map and global map couldn't delete obstacles.

gazebo comparison

rviz comparison

How could I delete the obstacle on rviz ?

I had modified the parameters of the following file, but it's no use.


obstacle_range: 5.5
  raytrace_range: 10.0


   global_frame: /odom
   update_frequency: 20.0
   publish_frequency: 20.0
   static_map: false


   update_frequency: 20.0
   publish_frequency: 20.0

Question 2:

From the rviz map, gmapping seems not handled well in the loop closure, is there any parameters need to change ?

rviz result

My launch file and move_base configuration as following:



<!-- gazebo world -->
  <arg name="world_file"  default="$(env TURTLEBOT_GAZEBO_WORLD_FILE)"/>

  <arg name="base"      value="$(optenv TURTLEBOT_BASE kobuki)"/> <!-- create, roomba -->
  <arg name="battery"   value="$(optenv TURTLEBOT_BATTERY /proc/acpi/battery/BAT0)"/>  <!-- /proc/acpi/battery/BAT0 --> 
  <arg name="gui" default="true"/>
  <arg name="stacks"    value="$(optenv TURTLEBOT_STACKS hexagons)"/>  <!-- circles, hexagons --> 
  <arg name="3d_sensor" value="$(optenv TURTLEBOT_3D_SENSOR kinect)"/>  <!-- kinect, asus_xtion_pro --> 

  <include file="$(find gazebo_ros)/launch/empty_world.launch">
    <arg name="use_sim_time" value="true"/>
    <arg name="debug" value="false"/>
    <arg name="gui" value="$(arg gui)" />
    <arg name="world_name" value="$(arg world_file)"/>

  <include file="$(find turtlebot_gazebo)/launch/includes/$(arg base).launch.xml">
    <arg name="base" value="$(arg base)"/>
    <arg name="stacks" value="$(arg stacks)"/>
    <arg name="3d_sensor" value="$(arg 3d_sensor)"/>

  <node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher">
    <param name="publish_frequency" type="double" value="30.0" />

  <!-- Fake laser -->
  <node pkg="nodelet" type="nodelet" name="laserscan_nodelet_manager" args="manager"/>
  <node pkg="nodelet" type="nodelet" name="depthimage_to_laserscan"
        args="load depthimage_to_laserscan/DepthImageToLaserScanNodelet laserscan_nodelet_manager">
    <param name="scan_height" value="10"/>
    <param name="output_frame_id" value="/camera_depth_frame"/>
    <param name="range_min" value="0.45"/>
    <remap from="image" to="/camera/depth/image_raw"/>
    <remap from="scan" to="/scan"/>

  <!-- open rviz -->
  <node name="rviz" pkg="rviz" type="rviz" args="-d $(find turtlebot_rviz_launchers)/rviz/navigation.rviz"/>

  <!-- open gmapping -->
  <include file="$(find turtlebot_navigation)/launch/includes/gmapping.launch.xml"/>

  <!-- Move base -->
  <include file="$(find turtlebot_navigation)/launch/includes/move_base.launch.xml"/>



max_obstacle_height: 0.60  # assume something like an arm is mounted on top of the robot

# Obstacle Cost Shaping (http://wiki.ros.org/costmap_2d/hydro/inflation)
robot_radius: 0.20  # distance a circular robot should be clear of the obstacle (kobuki: 0.18)
# footprint: [[x0, y0], [x1, y1], ... [xn, yn]]  # if the robot is not circular

map_type: voxel

  enabled:              true
  max_obstacle_height:  0.6
  origin_z:             0.0
  z_resolution:         0.2
  z_voxels:             2
  unknown_threshold:    15
  mark_threshold:       0
  combination_method:   1
  track_unknown_space:  true
  obstacle_range: 5.5
  raytrace_range: 10.0
  origin_z: 0.0
  z_resolution: 0.2
  z_voxels: 2
  publish_voxel_map: false
  observation_sources:  scan bump
    data_type: LaserScan
    topic: scan
    marking: true
    clearing: true
    min_obstacle_height: 0.25
    max_obstacle_height: 0.35
    data_type: PointCloud2
    topic: mobile_base/sensors/bumper_pointcloud
[hide preview]
    marking: true
    clearing ...
edit retag flag offensive close merge delete


Did anyone have idea for this question? Thank you for your help.

stevenlin gravatar image stevenlin  ( 2017-03-14 02:48:53 -0600 )edit