A ROS package for 2-D laser SLAM that uses open-karto package for the front-end and SPA solver for the back-end.
1. This package has been tested well in Ubuntu 16.04 with ROS Kinetic.
2. Install Eigen3 and CXSparse
$ sudo apt-get install libeigen3-dev libsuitesparse-dev
3. Clone and build open-karto package
$ cd ~/catkin_ws/src/
$ git clone https://github.com/ros-perception/open_karto.git
$ cd ..
$ catkin_make
4. Clone and build this package
$ cd ~/catkin_ws/src/
$ git clone https://github.com/nkuwenjian/slam_karto.git
$ cd ..
$ catkin_make
5. Run offline rosbag
$ source ~/catkin_ws/devel/setup.bash
$ roslaunch slam_karto karto_slam.launch
$ rosbag play <rosbagfile> --clock
/scan
(sensor_msgs/LaserScan)/tf
(tf2_msgs/TFMessage)
/map
(nav_msgs/OccupancyGrid)/map_metadata
(nav_msgs/MapMetaData)/tf
(tf2_msgs/TFMessage)/visualization_marker_array
(visualization_msgs/MarkerArray)