ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Costmap's free-space depending on gmapping?

asked 2013-12-17 06:09:04 -0600

dneuhold gravatar image

updated 2014-01-28 17:18:51 -0600

ngrennan gravatar image

Hey all,

I realized that /costmap topic only publishes OBSTACLE, INFLATED and UNKNOWN space. All the rest is assumed to be FREE space. Now I need to get all available freespace blocks within my local costmap. As soon as the robot moves, the costmap steadily changes with direct impact on obstacle and inflated space. Now I wonder if this is different to free space. As I discovered, SLAM gmapping requires some time to create the map. During this time the amount of free space blocks do not change, which results in the fact that free space is not available in the instantiated costmap until the underlying map is created.

Which approach can be used to mitigate this behaviour?

- Faster updates of the SLAM map
- Somehow update freespace blocks, whenever the costmap changes

I really appreciate every hint. Thanks

Daniel

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2014-01-13 23:17:55 -0600

dneuhold gravatar image

updated 2014-01-13 23:18:34 -0600

Finally increasing the map update rate solved the problem. Now freespace is updated on every map update cycle and therefore immediately available!

Here is my gmapping.launch file:

<launch> <node pkg="gmapping" type="slam_gmapping" name="slam_gmapping" output="screen">

  <param name="base_frame" value="base_footprint"/>
  <param name="map_frame" value="map"/>
  <param name="odom_frame" value="odom"/>
  <param name="map_update_interval" value="0.1"/>
  <param name="maxUrange" value="4.0"/>
  <param name="maxRange" value="5.0"/>
  <param name="sigma" value="0.05"/>
  <param name="kernelSize" value="1"/>
  <param name="lstep" value="0.05"/>
  <param name="astep" value="0.05"/>
  <param name="iterations" value="5"/>
  <param name="lsigma" value="0.075"/>
  <param name="ogain" value="3.0"/>
  <param name="lskip" value="0"/>
  <param name="srr" value="0.01"/>
  <param name="srt" value="0.02"/>
  <param name="str" value="0.01"/>
  <param name="stt" value="0.02"/>
  <param name="linearUpdate" value="0.01"/>
  <param name="angularUpdate" value="0.01"/>
  <param name="temporalUpdate" value="0.1"/>
  <param name="resampleThreshold" value="0.5"/>
  <param name="particles" value="1"/>

  <param name="xmin" value="-5.0"/>
  <param name="ymin" value="-5.0"/>
  <param name="xmax" value="5.0"/>
  <param name="ymax" value="5.0"/>
  <param name="delta" value="0.05"/>
  <param name="llsamplerange" value="0.01"/>
  <param name="llsamplestep" value="0.01"/>
  <param name="lasamplerange" value="0.005"/>
  <param name="lasamplestep" value="0.005"/>
</node>

</launch> Hope this helps you,

BR Daniel

edit flag offensive delete link more
0

answered 2013-12-17 13:38:08 -0600

VC gravatar image

Hi Daniel. When you say you need to "get" the free space, I assume you mean it as a published topic similar to the obstacles and unknown space. We did this is in Costmap2DPublisher::updateCostmapData, similar to what is done for raw and inflated obstacles. Obstacle and inflated space are different from free space, from the processing perspective as well as the actual value representation in the map.

As far as gmapping goes, while not having worked on it directly, I understand that you will need to connect it up as a layer in the costmap, either as a static map obtained after an offline map building run, or as a online source. By default, AFAIK costmap_2d does not support nav_msgs/OccupancyGrid as a source, so you will need to do some coding in the latter case and actually process the output of gmapping to interpret it as obstacle/inflated/unknown/free space, since the underlying value representations in OccupancyGrid and Costmap2D are different. I don't think faster SLAM updates will help here, if I understand your question correctly.

HTH.

edit flag offensive delete link more

Comments

Thanks for your quick answer. Well, I instantiated the costmap and used the getCharMap() to have an occupancy map containing unknown,obstacle,inflated but also free space. Now when I move the robot, everything is updated except the free space. This seems to remain unchanged until my SLAM map updates its values. Then also the local costmap contains the updated free space blocks . So am I able to update the free space with the same speed as obstacle and inflated space?

dneuhold gravatar image dneuhold  ( 2013-12-17 21:29:57 -0600 )edit

Hey .... now I am still struggling with the same problem. So I appreciate every hint. I need to get freespace as well as obstacle, inflated and unknown space in one costmap. Obstacle, inflated and unknown are published topics from gmapping, but freespace isn't. My question now is how to obtain freespace blocks?

dneuhold gravatar image dneuhold  ( 2014-01-06 21:24:07 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2013-12-17 06:09:04 -0600

Seen: 1,051 times

Last updated: Jan 13 '14