A first-order solution to simultaneous localization and mapping with graphical models