Running HAMS Map Generation module#
[1]:
import os
from mapping_cli.mapper import run as mapper
File Requirements#
Path to the binaries / executable named
mapper_from_imagesCompile all the images of a map into a single folder - let’s call this folder
imagesGenerate the camera calibration file. To generate one, you can check the
Camera Calibrationmodule from theTutorialssection. Let’s call this filecalib.ymlDepending on the aruco markers setup on the map, add the dictionary. Typically, we use
TAG16h5Marker size: Size of the printed aruco markers
Let’s add these to the variables below. If you’ve changed the names, please change the variable values in the subsequent cell
[ ]:
exec_path = 'mapper_from_images'
img_folder = "images"
calib_file = "calib.yml"
aruco_dict = "TAG16h5"
marker_size = 29.2
name = "map_example"
output_folder = "output/"
[ ]:
os.makedirs(output_folder, exist_ok=True)
mapper(exec_path, img_folder, calib_file, aruco_dict, marker_size, name, output_folder)
Visualize the Point Cloud Map#
We’ll use Open3D to visualize the generated point cloud map
[ ]:
%pip install open3d
import open3d
from open3d.web_visualizer import draw
[12]:
pcd = open3d.io.read_point_cloud("output/map_example.pcd")
draw(pcd)