Efficient sparse pose adjustment for 2D mapping