Exporters¶ class urdfgenpy.URDFExporter[source]¶ Bases: object Converts a :class:’~urdfgenpy.Robot’ to a URDF XML string. export(robot)[source]¶ Render robot as a URDF XML string. Parameters: robot (Robot) – The :class:’~urdfgenpy.Robot’ to serialize. Return type: str Returns: A complete, well-formed URDF XML string including the XML declaration and ‘<robot>’ root element. class urdfgenpy.XacroExporter[source]¶ Bases: object Converts a :class:’~urdfgenpy.Robot’ to a Xacro XML string. The output includes ‘xacro:property’ and ‘xacro:macro’ definitions for standard inertia calculations, making the file easy to parameterise further. export(robot)[source]¶ Render robot as a Xacro XML string. Parameters: robot (Robot) – The :class:’~urdfgenpy.Robot’ to serialize. Return type: str Returns: A complete Xacro XML string with inertia macro definitions, the XML declaration, and the ‘<robot>’ root element.