Posted by
matlabbe on
URL: http://official-rtab-map-forum.206.s1.nabble.com/Autonomous-Navigation-with-Octomap-tp4350p4351.html
Hi Andrew,
Which rtabmap version are you using? Latest from source tracks the empty cells and replaces them in OctoMap on loop closure, while previous versions moved only occupied cells (ground, obstacles).
To use less computation power, you may also consider using "grid_map" with Grid/FromDepth=true, possibly with Grid/RayTracing=true and Grid/3D=false to fill empty space. In some cases, empty space clearing (Grid/RayTracing=true) with this kind of map would be less safe than with octomap_grid.
To fill empty space in latest version with "octomap_grid", these parameters should be set: Grid/FromDepth=true and Grid/RayTracing=true. Beware that on loop closure, OctoMap updates can take a
significant time. To avoid reconstructing the whole OctoMap after each loop closure, parameter GridGlobal/UpdateError (default 0.01 m) can be increased to reconstruct the OctoMap only if the corrected poses have moved more than this value.
Beside the maps, for your problem "
We found that there were problems with obstacles which were above or below the plane scanned by the LIDAR, which would cause the robot to crash into objects", you could continue to use the 2D map from RPLidar in rtabmap for exploration, but setup a
voxel layer in local costmap of move_base to avoid obstacles that lidar cannot see. That voxel layer would be subscribed from a point cloud generated from the depth image of Structure or R200 sensor. That could be more efficient for exploration as the field of view of RPLidar is a lot larger than the cameras, while being safe for obstacles that lidar cannot see.
#local_costmap_params.yaml
...
observation_sources: point_cloud_sensor
# assuming receiving a cloud called "obstacles" from rtabmap_ros/obstacles_detection node
point_cloud_sensor: {
sensor_frame: base_footprint,
data_type: PointCloud2,
topic: obstacles,
expected_update_rate: 0.1,
marking: true,
clearing: true,
min_obstacle_height: -99999.0,
max_obstacle_height: 99999.0}
Such example used in this
stereo navigation tutorial.
cheers,
Mathieu