Modified code to allow for SLAM registration based on a ROS topic subscriber.