This fusion approach enables robotic positioning without relying on global reference information, producing highly precise travel trajectories. To address measurement outliers, this article proposes a two-stage positioning method that combines robust filtering with offline optimization. First, the measurement noise distribution is modeled as a Student’s t-distribution, incorporating variational Bayesian (VB) theory for joint inference of state variables. An innovative method for real-time, dynamically updated posterior state covariance calculation has been developed and integrated with the extended Kalman filter algorithm. Subsequently, the filtered trajectory undergoes offline optimization, significantly reducing cumulative positioning errors through corner detection and affine transformation techniques. Practical machine positioning experiments validate that, compared to the traditional extended Kalman filter algorithm, the proposed method reduces the maximum position error (MPE), mean position error, root mean square error (RMSE), and mean squared error by 81.9%, 87.6%, 86.7%, and 98.2%, respectively, fully demonstrating the algorithm’s effectiveness.