URDFType¶
-
class
urdfpy.URDFType[source]¶ Bases:
objectAbstract base class for all URDF types.
This has useful class methods for automatic parsing/unparsing of XML trees.
There are three overridable class variables:
_ATTRIBS- This is a dictionary mapping attribute names to a tuple,(type, required)wheretypeis the Python type for the attribute andrequiredis a boolean stating whether the attribute is required to be present._ELEMENTS- This is a dictionary mapping element names to a tuple,(type, required, multiple)wheretypeis the Python type for the element,requiredis a boolean stating whether the element is required to be present, andmultipleis a boolean indicating whether multiple elements of this type could be present. Elements are child nodes in the XML tree, and their type must be a subclass ofURDFType._TAG- This is a string that represents the XML tag for the node containing this type of object.