nodeIDs
Description
specifies options using one or more name-value arguments.ids
= nodeIDs(graph
,Name=Value
)
Input Arguments
graph
— Factor graph
factorGraph
object
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
.
NodeType
— Node type of desired nodes in factor graph
string scalar | character vector
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
FactorType
— Factor type that nodes relate to in factor graph
string scalar | character vector
Factor type that the nodes relate to in the factor graph, specified as one of these options:
"factorIMU"
—factorIMU
"factorGPS"
—factorGPS
"factorCameraSE3AndPointXYZ"
—factorCameraSE3AndPointXYZ
"factorPoseSE2AndPointXY"
—factorPoseSE2AndPointXY
"factorPoseSE3AndPointXYZ"
—factorPoseSE3AndPointXYZ
"factorTwoPoseSE2"
—factorTwoPoseSE2
"factorTwoPoseSE3"
—factorTwoPoseSE3
"factorIMUBiasPrior"
—factorIMUBiasPrior
"factorPoseSE3Prior"
—factorPoseSE3Prior
"factorVelocity3Prior"
—factorVelocity3Prior
Example: nodeIDs(fg,FactorType="factorTwoPoseSE2")
retrieves all
of the node IDs of nodes that relate to factors of type
factorTwoPoseSE2
.
Data Types: char
| string
GroupID
— Group ID of desired nodes
nonnegative integer | N-element row vector of nonnegative integers
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
ids
— Node IDs
N-element row vector
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 R2022aR2023a: Get node IDs that match node type, factor type, or group ID
nodeIDs
now supports getting node IDs that match node type,
factor type, or group ID.
See Also
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)