-
Notifications
You must be signed in to change notification settings - Fork 32
Global map creation
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.
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:
- Navigate to:
$ cd smb_path_planner/smb_navigation/script
- Make the script exectuable:
$ chomod +x pcd_to_gridmap.sh
- 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.
-
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
-
Follow the instructions on the terminal
-
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. -
Check that the origin field in the
*.yaml
file contains NaNs. If so, replace them with zeros. -
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.
SMB Path Planner, V4RL