When using navigation, map and global map couldn't delete obstacles
Hello,
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.
How could I delete the obstacle on rviz ?
I had modified the parameters of the following file, but it's no use.
costmapcommonparams.yaml
obstacle_range: 5.5
raytrace_range: 10.0
globalcostmapparams.yaml
global_frame: /odom
update_frequency: 20.0
publish_frequency: 20.0
static_map: false
localcostmapparams.yaml
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 ?
My launch file and move_base configuration as following:
turtlebot_navigation.launch:
<launch>
<!-- 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>
<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)"/>
</include>
<node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher">
<param name="publish_frequency" type="double" value="30.0" />
</node>
<!-- 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"/>
</node>
<!-- 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"/>
</launch>
costmapcommonparams.yaml
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
obstacle_layer:
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
scan:
data_type: LaserScan
topic: scan
marking: true
clearing: true
min_obstacle_height: 0.25
max_obstacle_height: 0.35
bump:
data_type: PointCloud2
topic: mobile_base/sensors/bumper_pointcloud
[hide preview]
marking: true
clearing: false
min_obstacle_height: 0.0
max_obstacle_height: 0.15
# for debugging only, let's you see the entire voxel grid
#cost_scaling_factor and inflation_radius were now moved to the inflation_layer ns
inflation_layer:
enabled: true
cost_scaling_factor: 5.0
inflation_radius: 0.5
static_layer:
enabled: true
globalcostmapparams.yaml
global_costmap:
global_frame: /odom
robot_base_frame: /base_footprint
update_frequency: 20.0
publish_frequency: 20.0
static_map: false
transform_tolerance: 0.5
plugins:
- {name: static_layer, type: "costmap_2d::StaticLayer"}
- {name: obstacle_layer, type: "costmap_2d::VoxelLayer"}
- {name: inflation_layer, type: "costmap_2d::InflationLayer"}
localcostmapparams.yaml
local_costmap:
global_frame: odom
robot_base_frame: /base_footprint
update_frequency: 20.0
publish_frequency: 20.0
static_map: false
rolling_window: true
width: 4.0
height: 4.0
resolution: 0.05
transform_tolerance: 0.5
plugins:
- {name: obstacle_layer, type: "costmap_2d::VoxelLayer"}
- {name: inflation_layer, type: "costmap_2d::InflationLayer"}
Thank you for your help.
Asked by stevenlin on 2017-03-07 06:25:14 UTC
Comments
Did anyone have idea for this question? Thank you for your help.
Asked by stevenlin on 2017-03-14 02:48:53 UTC