Main Content

createPoseGraph

Create pose graph

Description

example

G = createPoseGraph(vSet) returns a pose graph derived from the views and connections in the view set, vSet.

Examples

collapse all

Create an empty point cloud view set.

vSet = pcviewset;

Define three relative poses.

relPoses = repelem(rigid3d,3,1);
relPoses(1).Translation = [3 0 0];
relPoses(2).Translation = [5 0 0];
relPoses(3).Translation = [2 0 0]
relPoses = 
  3x1 rigid3d array with properties:

    Dimensionality
    T
    Rotation
    Translation

Accumulate absolute poses.

absPoses = repelem(rigid3d,4,1);
absPoses(2).T = relPoses(1).T*absPoses(1).T;
absPoses(3).T = relPoses(2).T*absPoses(2).T;
absPoses(4).T = relPoses(3).T*absPoses(3).T;

Add four views to the point cloud view set.

vSet = addView(vSet,1,absPoses(1));
vSet = addView(vSet,2,absPoses(2));
vSet = addView(vSet,3,absPoses(3));
vSet = addView(vSet,4,absPoses(4));

Add three connections to the point cloud view set.

vSet = addConnection(vSet,1,2,relPoses(1));
vSet = addConnection(vSet,2,3,relPoses(2));
vSet = addConnection(vSet,3,4,relPoses(3));

Add a loop closure connection to the point cloud view set.

relPoses(4).Translation = [9 0 0];
vSet = addConnection(vSet,4,1,relPoses(4));

Create a pose graph.

G = createPoseGraph(vSet);

Input Arguments

collapse all

View set, specified as a pcviewset object.

Output Arguments

collapse all

Pose graph, returned as a digraph object. The nodes in the object correspond to views, and the edges in the object correspond to connections.

The EndNodes of the Edges in the G digraph correspond to indices into the Views table, (not ViewIds).

Tips

  • The EndNodes of the Edges in the G digraph correspond to indices into the Views table, (not ViewIds).

  • Use Directed and Undirected Graphs to inspect, modify, or visualize the pose graph.

  • Use the optimizePoseGraph (Navigation Toolbox) function to optimize the pose graph. Use of this function requires the Navigation Toolbox™.

See Also

Functions

Objects

Introduced in R2020a