Main Content

nodeIDs

Get node IDs in factor graph

Since R2022a

Description

ids = nodeIDs(graph) gets all node IDs, ids, currently in the factor graph graph.

ids = nodeIDs(graph,Name=Value) specifies options using one or more name-value arguments.

Input Arguments

collapse all

Factor graph, specified as a factorGraph object.

Name-Value Arguments

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Example: nodeIDs(fg,GroupID=1) retrieves all of the node IDs of factor graph fg that are associated with group 1.

Node type of the desired nodes in the factor graph, specified as one of these options:

  • "POSE_SE2" — Pose in SE(2) state space

  • "POSE_SE3" — Pose in SE(3) state space

  • "VEL3" — 3-D velocity

  • "POINT_XY" — 2-D point

  • "POINT_XYZ" — 3-D point

  • "IMU_BIAS" — IMU gyroscope and accelerometer bias

Example: nodeIDs(fg,NodeType="POSE_SE2") retrieves all of the node IDs of nodes that are of node type POSE_SE2.

Data Types: char | string

Factor type that the nodes relate to in the factor graph, specified as one of these options:

Example: nodeIDs(fg,FactorType="factorTwoPoseSE2") retrieves all of the node IDs of nodes that relate to factors of type factorTwoPoseSE2.

Data Types: char | string

Group ID of desired nodes, specified as a nonnegative integer or N-element row vector of nonnegative integers. N is the number of groups.

If GroupID is an N-element row vector of nonnegative integers, there must be no duplicate group IDs in the vector.

To add nodes to a group, specify the group using the groupID argument of the addFactor function.

Example: nodeIDs(fg,GroupID=4) retrieves all of the node IDs of nodes that are in group 4.

Output Arguments

collapse all

Node IDs of all nodes that fit the specified criteria within the specified factorGraph object, returned as an N-element row vector. N is the number of returned nodes. Note that the node IDs may not be continuous within the vector.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

Version History

Introduced in R2022a

expand all