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

how to improve maps from octomap?

asked 2015-02-19 23:21:15 -0600

AlexR gravatar image

updated 2015-02-20 01:47:31 -0600

Hi ,

I am trying to build quality maps by using octomap on ROS hydro using a xtion pro live sensor mounted on the robot.

The map generated by octomap do not update well, when visiting the same area and corrupts the map. image description . I am using gmapping for SLAM with a Hokuyo sensor. The 2d grid map builds up nicely and updates but the octomap overlays the map and do no update.

I am doing this on a p3dx pioneer robot. My octomap_mapping.launch file looks like this

<launch>
<node pkg="octomap_server" type="octomap_server_node" name="octomap_server">
    <param name="resolution" value="0.05" />

    <!-- fixed map frame (set to 'map' if SLAM or localization running!) -->
    <param name="frame_id" type="string" value="odom" />

    <!-- maximum range to integrate (speedup!) -->
    <param name="sensor_model/max_range" value="5.0" />


    <!-- data source to integrate (PointCloud2) -->
    <remap from="cloud_in" to="/camera/depth_registered/points" />

</node>

</launch>

Can someone help me and suggest ideas as to how I can improve the maps generated by octomap. Thanks

Alex

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
3

answered 2015-02-21 15:40:21 -0600

AHornung gravatar image

According to your config in the launch file, you are mapping in the odom frame, so you only use odometry. Accumulated error will cause a drift in the position estimate. So errors when re-visiting known areas are to be expected.

As mentioned in the comment above that line in the launch file, you need to switch to mapping in your actual map frame when using a localization source or SLAM.

edit flag offensive delete link more

Comments

I see changing the frame id from odom to map solved the problem. Thanks a lot.

AlexR gravatar image AlexR  ( 2015-02-21 20:31:18 -0600 )edit
3

answered 2015-02-20 02:42:18 -0600

ahendrix gravatar image

short answer: you shouldn't combine octomap and gmapping like this.

long answer:

gmapping is a slam algorithm which goes back and re-optimizes previous poses based on new data, in order to do things like loop closure. This means that, during mapping, the estimated position of the robot may be wrong for a period of time, before gmapping collects enough data to correct the position of the robot. If you set the occupancy of an octomap based on these positions, you'll be building that position error into your octomap.

You should probably look for a different approach which incorporates the 3D map-building process into the SLAM algorithm.

edit flag offensive delete link more

Comments

HI @ahendrix, Thanks for your answer. I know that octomap is a mapping technique and collects point cloud data to make a 3D map. There is no plug and play SLAM backend for it. However from this talk at ROSCon. @AHornung gave a hint that gmapping can be used to correct

AlexR gravatar image AlexR  ( 2015-02-20 03:14:34 -0600 )edit

...(Continued) poses from the robot to generate a 3D map. I am not sure if I am correct of not but in some posts I have seen people using Hector SLAM with octomap to correct poses. Would you suggest using RGBDSLAM with octomap?

AlexR gravatar image AlexR  ( 2015-02-20 03:16:46 -0600 )edit

Do you only want the map or do you want to do 3D slam? We are building the 2d map first, then run the robot with localization on that for building the octomap.

dornhege gravatar image dornhege  ( 2015-02-20 03:59:22 -0600 )edit

@dornhege, thanks, actually both. Build the 3D octomap with 2D occupancy grid map and then use it for collision avoidance for SLAM. Is it possible??

AlexR gravatar image AlexR  ( 2015-02-20 04:15:38 -0600 )edit
2

answered 2015-02-20 07:19:34 -0600

kokirits gravatar image

In order to update your map with octomap you could try enabling the "filter_ground" parameter in your launch file as so:

<param name="filter_ground" value="1"/>

You can also set "latch" parameter to false like:

<param name="latch" value="0"/>

More information on those parameters can be found here.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-02-19 23:21:15 -0600

Seen: 2,590 times

Last updated: Feb 21 '15