A Linear Approximation for Graph-based Simultaneous Localization and Mapping