Skip to content

novaphy.UrdfModelData

Result of UrdfParser.parse_file. Plain-old data holder for the parsed URDF tree, intended to be fed into SceneBuilderEngine.build_from_urdf.

Attributes

Attribute Description
name Robot name (the name attribute of <robot>).
has_unsupported_xacro Whether the parser encountered xacro constructs outside NovaPhy's lightweight expansion support.
materials Robot-level named UrdfMaterial entries. Inline visual materials remain on each UrdfVisual.material and are not appended here.
links List of UrdfLink entries (parse order).
joints List of UrdfJoint entries (parse order).
transmissions List of UrdfTransmission entries.
gazebo_extensions List of UrdfGazeboExtension entries.

Example

import novaphy

parser = novaphy.UrdfParser()
data = parser.parse_file("robot.urdf")

print(data.name, "with", len(data.links), "links and",
      len(data.joints), "joints")

Notes

  • UrdfModelData is the edit point if you need to mutate the parsed tree before scene-build (e.g. drop a sensor link, override a mass).
  • The fixed-joint collapse and floating-base options live on UrdfImportOptions, not on this struct; pass the options through to SceneBuilderEngine.build_from_urdf.

See Also