Factor Graphs For Robotic Dental Surgery