How to build an occupancy grid from pointcloud data
I need to make an occupancy grid map from the cloud_map[cloud_map (sensor_msgs/PointCloud2) -> Map of 3D point cloud generated using a kinect sensor] topic provided by rtabmap_ros package. In my case the occupancy grid provided by rtabmap was not valid for my purpose. I am trying to do outdoor navigation and the terrain is very uneven. So all the cells are shown as occupied by the in the occupancy grid provided by rtabmap.
So I want to build a occupancy grid from the gradient of the pointcloud rather than height. The area to navigate in has -2m to 4m variation in height with low gradient and high gradient areas.My robot can drive in the low gradient regions. Is there any ros-melodic package which does this out of the box? Or do I need to build a custom package?