Fill All Free Space in Sensor Range using Octomap

asked 2023-01-21 16:31:04 -0500

TankyFranky gravatar image

My question is very similar to Integrate free space into octomap but in my case my input is from a 270 degree point cloud around my robot.

My robots sensor range is approximately 3 meters in all directions but the environment I am opperating in is sparse, meaning there are times where there are no significant obstacles around the robot. I would like to be able to include all free space around the robot in the absence of obstacles.

As I understand Octomap, free space is only filled in when a ray can be projected from the robot to an obstacle. In the cases where a ray is projected to +inf, the free space is not filled in.

I provide 3 images to illustrate my problem.

The PointCloud2 message that I receive from my sensors, I am feeding this into Octomap. A few obstacles added for demonstration.

empty


When octomap is ran in an empty environment, the map being built only includes the obstacles in the range of the sensors (in this case only the floor). No free space between the robot and the floor is being added to the map, and all the rays that choot out into empty space are not added as free space in the octomap. Empty environment octomap


When octomap is ran in a closed environment (3 walls close to the robot), the map is filled out with occupied and free space. The free space is filled into the area along the ray cast between the robot and the obstacle. Closed Environment Octomap


I would like that all free space be filled in, be it from hitting an obstacle or the ray cast being projected to +inf. Could an option similar to upper_replacement_value from the LaserScanRangeFilter in the laser_filters package be implemented?

edit retag flag offensive close merge delete