0
$\begingroup$

Rosanswers logo

I'm experiencing a very strange and to me random behavior from the obstacle_layer. To visualize my point I recorded a bag file and launched it over and over again with the same settings. The situation is like this: The costmap is getting initialized with a previously recorded pgm image. Without changing the settings of the *_params. files I get different outcomes. I moved the trash can in the lower left corner to the area right-above its original position. Sometimes the original position gets cleared (as called for) and sometimes it does not get cleared. Can anybody help me with that problem?

UPDATE

I reached the necessary karma level and can provide you with screen shots. So the "real world situation" is like that. I place and do not move the robot. Then I move the trash can from its original position (just when you come through the door to your right) to its new position (right wall). The screen shots are taken at the approximately same time but as mentioned above with different outputs from different runs.

The first image shows the situation when the clearing does not seem to work and the second image shows the situation where the clearings works as expected. The effect can also be seen at the left wall of the entrance door. The green dots should visualize the clearing_endpoints and the red dots represent the laser scan.

image description

image description

If relevant: I use Hydro on an Ubuntu 12.04 LTS.

global_costmap_params.yaml:

global_costmap:
  update_frequency: 5.0
  publish_frequency: 2.0
  static_map: true
  rolling_window: false
  plugins:  
    - {name: static_layer, type: "costmap_2d::StaticLayer"}
    - {name: obstacle_layer, type: "costmap_2d::VoxelLayer"}

costmap_common_params.yaml:

global_frame: /map
robot_base_frame: /base_link
map_type: voxel
publish_voxel_map: true
footprint: [[0.235, 0.31], [-0.515, 0.31], [-0.515, -0.31], [0.235, -0.31]]

static_layer:
  map_topic: /map
  
obstacle_layer:
  max_obstacle_height: 2.0
  obstacle_range: 2.5
  raytrace_range: 3.0
  
  origin_z: -0.08
  z_resolution: 0.2
  z_voxels: 6
  unknown_threshold: 6
  mark_threshold: 0
  
  track_unknown_space: true
  combination_method: 0

  observation_sources: laser
  
  laser: {sensor_frame: base_laser_link, data_type: LaserScan, topic: scan, marking: true, clearing: true}

move_base.launch:

<?xml version="1.0" encoding="UTF-8" ?>

<launch>

    <node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen" clear_params="true">
    <!-- default:20.0. with this value dwa planner fails to find a valid plan a lot more -->
    <param name="controller_frequency" value="10.0" />
    <param name="controller_patience" value="15.0" />
    <param name="planner_frequency" value="2.0" />
    <param name="clearing_rotation_allowed" value="false" />
    <rosparam file="$(find scitos_2d_navigation)/scitos_move_base_params/costmap_common_params.yaml" command="load" ns="global_costmap" />
<!--
    <rosparam file="$(find scitos_2d_navigation)/scitos_move_base_params/local_costmap_params.yaml" command="load" />
-->
    <rosparam file="$(find scitos_2d_navigation)/scitos_move_base_params/global_costmap_params.yaml" command="load" />

    <param name="base_local_planner" value="dwa_local_planner/DWAPlannerROS" />
    <rosparam file="$(find scitos_2d_navigation)/scitos_move_base_params/dwa_planner_ros.yaml" command="load" />
    </node>

</launch>

launch-file for starting the bag-file:

<?xml version="1.0" encoding="UTF-8" ?>

<launch>
    <!-- launch map server -->
<!--
    <node name="map_server" pkg="map_server" type="map_server" args="$(find scitos_2d_navigation)/maps/floorsix.yaml"/>
-->

    <!--
    set up time nicely so there is no problem with old, outdated timestamps; rosparam set use_sim_time true
    -->
    <param name="/use_sim_time" value="true"/>
    <node pkg="rosbag" type="play" name="rosbagplayer" args="/home/lukas/rosbags/kitchen_3.bag
            /tf:=/tf_old
            /move_base/DWAPlannerROS/parameter_descriptions:=/deadEnd2a
            /move_base/DWAPlannerROS/parameter_updates:=/deadEnd2b
            /move_base/global_costmap/costmap:=/deadEnd2c
            /move_base/global_costmap/inflation_layer/parameter_descriptions:=/deadEnd2d
            /move_base/global_costmap/inflation_layer/parameter_updates:=/deadEnd2e
            /move_base/global_costmap/obstacle_layer/clearing_endpoints:=/deadEnd2f
            /move_base/global_costmap/obstacle_layer/parameter_descriptions:=/deadEnd2g
            /move_base/global_costmap/obstacle_layer/parameter_updates:=/deadEnd2h
            /move_base/global_costmap/obstacle_layer_footprint/footprint_stamped:=/deadEnd2i
            /move_base/global_costmap/obstacle_layer_footprint/parameter_descriptions:=/deadEnd2j
            /move_base/global_costmap/obstacle_layer_footprint/parameter_updates:=/deadEnd2k
            /move_base/global_costmap/parameter_descriptions:=/deadEnd2l
            /move_base/global_costmap/parameter_updates:=/deadEnd2m
            /move_base/global_costmap/static_layer/parameter_descriptions:=/deadEnd2n
            /move_base/global_costmap/static_layer/parameter_updates:=/deadEnd2o
            /move_base/local_costmap/costmap:=/deadEnd2p
            /move_base/local_costmap/inflation_layer/parameter_descriptions:=/deadEnd2q
            /move_base/local_costmap/inflation_layer/parameter_updates:=/deadEnd2r
            /move_base/local_costmap/obstacle_layer/clearing_endpoints:=/deadEnd2s
            /move_base/local_costmap/obstacle_layer/parameter_descriptions:=/deadEnd2t
            /move_base/local_costmap/obstacle_layer/parameter_updates:=/deadEnd2u
            /move_base/local_costmap/obstacle_layer_footprint/footprint_stamped:=/deadEnd2v
            /move_base/local_costmap/obstacle_layer_footprint/parameter_descriptions:=/deadEnd2w
            /move_base/local_costmap/obstacle_layer_footprint/parameter_updates:=/deadEnd2x
            /move_base/local_costmap/parameter_descriptions:=/deadEnd2y
            /move_base/local_costmap/parameter_updates:=/deadEnd2z
            /move_base/parameter_descriptions:=/deadEnd2aa
            /move_base/parameter_updates:=/deadEnd2ab
            /move_base/status:=/deadEnd2ac
            --clock"
        output="screen"/>
        
    <!-- update tf -->
    <node pkg="tf" type="tf_remap" name="tf_remap" output="screen"/>

    <!-- launch AMCL -->
<!--
    <include file="$(find scitos_2d_navigation)/launch/amcl.launch"/>
-->

    <!-- launch move base -->
    <include file="$(find scitos_2d_navigation)/launch/move_base.launch"/>

</launch>

Originally posted by Luke_ROS on ROS Answers with karma: 116 on 2014-05-15

Post score: 2


Original comments

Comment by David Lu on 2014-05-19:
I think you have adequate karma now. Please post pictures, because otherwise it is unclear what you are talking about. If you can't post pictures on the forum, please upload them elsewhere and link to them.

Comment by Luke_ROS on 2014-05-20:
Thanks David. I updated my question with the screen shots.

Comment by David Lu on 2014-05-20:
Does the laser you're using move relative to the base of the robot? (like the PR2's tilting laser?)

Comment by Luke_ROS on 2014-05-20:
The tf tree is fixed. So no moving lasers or anything.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

I think that the reason you get different outcomes on different runs is that you're maintaining a 3 dimensional costmap when you only need a two dimensional one. Try changing your VoxelLayer to an ObstacleLayer.

Edit: The different outcomes I believe are related to this bug. https://github.com/ros-planning/navigation/issues/187 since the points that are not getting cleared from the costmap are from the static map


Originally posted by David Lu with karma: 10932 on 2014-05-21

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by Luke_ROS on 2014-06-03:
Sorry for the late reply. It took me some time to get a hand on the robot again. It does not make a difference. Neither layer clears the area...

Comment by David Lu on 2014-06-13:
Can you share the bag file?

Comment by Luke_ROS on 2014-06-17:
Sure. Let me check if I can organize some server space for that.

Comment by Luke_ROS on 2014-06-26:
Thanks a lot. The thing is that I wanted to start simple with just the laser. Other sources will come into play in a later step.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.