URDFType¶
-
class
urdfpy.
URDFType
[source]¶ Bases:
object
Abstract 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)
wheretype
is the Python type for the attribute andrequired
is 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)
wheretype
is the Python type for the element,required
is a boolean stating whether the element is required to be present, andmultiple
is 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.