GTSAM is a library of C++ classes that implement smoothing and mapping (SAM) in robotics and vision, using factor graphs and Bayes networks as the underlying computing paradigm rather than sparse matrices.
Notebook-based book "Introduction to Robotics and Perception" by Frank Dellaert and Seth Hutchinson