Applying Graph-based SLAM Algorithm in a Simulated Environment