Main Content

poseGraph

Create 2-D pose graph from lidar scan map

Since R2022b

Description

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.

example

Examples

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
    addScan(scanMapObj,scans{currentID});
end

Create a pose graph for the scanMapObj.

poseGraph(scanMapObj);

Visualize the map.

figure
show(scanMapObj);

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