  Spatial perception is the backbone of many robotics applications, and spans a
broad range of research problems, including localization and mapping, point
cloud alignment, and relative pose estimation from camera images. Robust
spatial perception is jeopardized by the presence of incorrect data
association, and in general, outliers. Although techniques to handle outliers
do exist, they can fail in unpredictable manners (e.g., RANSAC, robust
estimators), or can have exponential runtime (e.g., branch-and-bound). In this
paper, we advance the state of the art in outlier rejection by making three
contributions. First, we show that even a simple linear instance of outlier
rejection is inapproximable: in the worst-case one cannot design a
quasi-polynomial time algorithm that computes an approximate solution
efficiently. Our second contribution is to provide the first per-instance
sub-optimality bounds to assess the approximation quality of a given outlier
rejection outcome. Our third contribution is to propose a simple
general-purpose algorithm, named adaptive trimming, to remove outliers. Our
algorithm leverages recently-proposed global solvers that are able to solve
outlier-free problems, and iteratively removes measurements with large errors.
We demonstrate the proposed algorithm on three spatial perception problems: 3D
registration, two-view geometry, and SLAM. The results show that our algorithm
outperforms several state-of-the-art methods across applications while being a
general-purpose method.
