So I am currently rtab with a ZED and a 2d lidar and I am trying to map an upper floor of a building that has an unblocked staircase. we are afraid that the robot may or may not throw itself down the stairs or under the railings while trying to map. Is there a way to set points below a certain Z to be obstacles in the occupancy map?
Make sure you are using the camera for the map with Grid/FromDepth=true, as the lidar won't see the staircase. Note that the robot should not move over unknown cells. You may try setting Grid/MinGroundHeight=-0.01 so that points under 1 cm of the xy plane are considered as obstacles. You may also use it with the passthrough approach: Grid/NormalsSegmentation=false with Grid/MaxObstacleHeight=1 and Grid/MaxGroundHeight=0.05.
You may consider adding cliff sensors (simple ir sensors looking down) on your robot like on the roomba for more safety.
The passthrough is fast, but only works if the the robot is moving on the same plane (in 2D). The normal segmentation approach is more expensive in computation (for normals estimation), but can handle 3D terrain.