Skip to content

Global map creation

Luca Bartolomei edited this page Jun 16, 2021 · 11 revisions

Description

Here we report the commands on how to create an occupancy grid usable for global planning starting from a *.pcd file created by the SLAM pipeline. Notice that this pipeline is not fully automated yet, as some manual tuning and post-processing is necessary.

Commands

A script to generate a global map from a *.pcd file is given in this repository (in smb_path_planner/smb_navigation/script).

To generate a global map usable by move_base, follow these steps:

  1. Navigate to: $ cd smb_path_planner/smb_navigation/script
  2. Make the script exectuable: $ chomod +x pcd_to_gridmap.sh
  3. Set the right value for the parameters in pcd_to_gridmap.sh:
  • resolution: resolution of the output occupancy grid map (suggested range: 0.15 - 0.25);
  • z_min: minimum cut-off height of the input point cloud;
  • z_max: maximum cut-off height of the input point cloud.
  1. Run the script giving the path to the input file and the path of the output folder: $ ./pcd_to_gridmap.sh <abs_path_to_pcd> <abs_path_output_folder>
    To print the usage of the script: $ ./pcd_to_gridmap.sh -h

  2. Follow the instructions on the terminal

  3. After the script is done, a *.pgm and a *.yaml files are created in the specified output folder. The files can be used for global planning.

  4. Check that the origin field in the *.yaml file contains NaNs. If so, replace them with zeros.

  5. Check that the path to the map (*.pmg file) is specified correctly in the *yaml.

Once the map has been generated, it can be used for global planning. Refer to the "Run in simulation" section to know how to do that.

Clone this wiki locally