This project extends the OpenSLAM GMapping framework and it's ROS wrapper to support computing Full Map Posteriors besides the Most-Likely Map according to the paper "Closed-Form Full Map Posteriors for Robot Localization with Lidar Sensors" by Lukas Luft, Alexander Schaefer, Tobias Schubert and Wolfram Burgard.
In a computer with ROS installed, download or clone the repository:
foo@bar:-$ git clone --recurse-submodules https://github.com/joseab10/FMP_gmapping
In a command line terminal:
- Ensure that the ROS environment is properly set
foo@bar:-$ source /opt/ros/${ROS_DISTRO}/setup.bash
- Change directory to repository
foo@bar:-$ cd <dir>/FMP_gmapping
- Compile using Catkin
foo@bar:-$ catkin_make > Base path: /…/FMP_gmapping > Source space: /…/FMP_gmapping/src > Build space: /…/FMP_gmapping/build > Devel space: /…/FMP_gmapping/devel > Install space: /…/FMP_gmapping/install > #### > #### Running command: "cmake … > /…/FMP_gmapping/src ⋮ > [ 98%] Built target slam_gmapping_replay > [100%] Linking CXX executable /…/FMP_gmapping/devel/lib/gmapping/slam_gmapping > [100%] Built target slam_gmapping
- Set the ROS environment to the FMP_gmapping workspace
foo@bar:-$ source devel/setup.bash
To execute the full SLAM stack, including:
- saving debug log files
- generating files for the translational and rotational errors
- computing the Ground Truth and Odometry Maps
- Saving all the occupancy maps
- Generating and saving the Posterior Distribution Maps
a python wrapper for the launch file exist in the map_simulator
submodule for running everything.
foo@bar:-$ rosrun map_simulator experiment.py
Alternatively, the launch files from the map_simulator
submodule can also be executed normally.
In order to start a launch file, with the environment properly set to the FMP_gmapping workspace, run:
foo@bar:-$ roslaunch map_simulator <launch_file>
where:
<launch_file>
is one of the many files insrc/map_simulator/launch/
However, this will not automatically add a timestamp to the results directories, nor will it redirect the ROS debug and log files to the experiment directory.
The workspace includes several benchmark datasets in the data/
directory, as well as preconfigured roslaunch
files in src/fmp_gmapping/launch/
to start using it right away.
In order to start a launch file, with the environment properly set to the FMP_gmapping workspace, run:
foo@bar:-$ roslaunch fmp_gmapping <launch_file>
where:
<launch_file>
is one of the many files insrc/fmp_gmapping/launch/
This will start the following processes and nodes:
- roscore: ROS Master process
- gmapping node: Main Grid-based SLAM node
- rosbag play node: Simulation node
- rviz: Program for the visualisation of the step-by-step results
The following command runs the preconfigured SLAM algorithm on the corrected odometry dataset of building 079 in the University of Freiburg:
foo@bar:-$ roslaunch fmp_gmapping fr_079_corr.launch
In order to use FMP_Gmapping as a standalone node for your own projects, simply run it as any other ROS node with your required remappings and parameters:
foo@bar:-$ rosrun gmapping slam_gmapping
For more details on the specifics, check the README.md
file in the slam_gmapping node source directory.