Factor Graphs for Robot Perception