Main Content


Create 2-D pose graph from lidar scan map

Since R2022b



pGraph = poseGraph(scanMapObj) creates a pose graph from the 2-D lidar scan map object scanMapObj. You can use this pose graph for inspection, visualization, and pose graph optimization.

This function requires Navigation Toolbox™ version 2.3 or higher.

To optimize the pose graph output, use the optimizePoseGraph (Navigation Toolbox) function.


collapse all

Load a MAT file containing 2-D lidar scans into the workspace.

data = load("wareHouse.mat");
scans = data.wareHouseScans;

Create a lidarscanmap object.

scanMapObj = lidarscanmap;

Add the first 15 scans from the input data to the scanMapObj object by using the addScan function.

for currentID = 1:15

Create a pose graph for the scanMapObj.


Visualize the map.


Figure contains an axes object. The axes object contains 16 objects of type line. One or more of the lines displays its values using only markers

Input Arguments

collapse all

2-D lidar scan map, specified as a lidarscanmap object.

Output Arguments

collapse all

Pose graph of the input lidar scan map, returned as a poseGraph (Navigation Toolbox) object.

Version History

Introduced in R2022b