1. A system for segmenting sensor data for three-dimensional data based navigation using the watershed method, the system comprising: at least one sensor configured to acquire at least one frame of range data from an environment containing the at least one sensor, wherein the at least one frame of range data provides a three-dimensional description of a portion of the environment; a processing unit configured to receive the at least one frame of range data from the at least one sensor, wherein the processing unit is configured to segment the at least one frame of range data by: computing a residual map that is based on the distance between data points in the at least one frame of range data and at least one polynomial surface fitted to at least one surface represented by the data in the at least one frame of range data, wherein the residual map represents, for each position of the at least one frame of range data, a residual value based on a distance between the at least one frame of range data and an interpolated polynomial surface representing a smoothed frame of range data, wherein the residual value is directly proportional to the local amount of discontinuity; identifying a plurality of minima in the residual map, wherein each minimum in the plurality of minima is associated with a different region in a plurality of regions; flooding the residual map at the plurality of minima; identifying boundaries for the plurality of regions, wherein the boundaries are at the locations where the flooding in adjacent regions first contact one another as the residual map is flooded; and dividing the residual map into a plurality of segments based on the identified boundaries.