getLabels#
Fully qualified name: isaacsim::foundation::utils::getLabels
- std::unordered_map<std::string, std::vector<std::string>> isaacsim::foundation::utils::getLabels(
- const std::string &path,
- bool includeDescendants = false,
Returns all semantic labels on a prim, grouped by taxonomy.
Inspects the applied schemas of the prim at
path(and, whenincludeDescendantsistrue, all prims in its subtree) forSemanticsLabelsAPIinstances. For each found taxonomy the corresponding label values are read and collected.When
includeDescendantsistrue, labels from the prim and all its descendants are merged into the same result map: for each taxonomy the returned vector is the concatenation of labels from all visited prims in traversal order, which may contain duplicates across prims.See also
addLabels(), removeLabels()
- Parameters:
path – [in] USD path of the target prim on the default stage.
includeDescendants – [in] When
true, the subtree rooted atpathis traversed and labels from all prims are aggregated.
- Returns:
Map from taxonomy name to the list of label strings for that taxonomy.