Having carefully considered the options, a good fit for your project - which sounds like a moving robot on the ground - may be to use the robotics navigation technique called SLAM.
Here is a quote from a paper that references SLAM: "In some approaches, the problem of navigable ground detection is addressed in conjunction with localization tasks. Perez-Yus used the RANSAC algorithm to segment planes in human-made indoor scenarios pending dense 3D point clouds".
"The approach is able to extract not only the ground but also ascending or descending stairs, and to determine the position and orientation of the user with visual odometry. Lee also incorporated visual odometry and feature-based metri-topological simultaneous localization and mapping (SLAM) to perform traversability analysis".
The paper, published in November 2016, is titled "Expanding the Detection of Traversable Area with RealSense for the Visually Impaired".
You can find information about using SLAM with ROS Kinetic by googling for 'os kinetic slam'. If your project can use OpenCV, ORB-SLAM2 is also a highly recommendable choice of SLAM system.