Loading a map from the library requires laser scan data. Check your robot is publishing laser scan data by running a
rostopic echo /scan. (Replace /scan with your robot topic.)
Check your tf tree to make sure there is only 1 unbroken connection from map to base_link.
rosrun rqt_tf_tree rqt_tf_tree.
Also, please check your amcl node (for 2D) is running and publishing.
rosnode list | grep amcland
rosnode info /amcl.