def xacro_parse(filename): doc = xacro_jade.parse(None, filename) xacro_jade.process_doc(doc, in_order=True) return doc.toprettyxml(indent=' ')
def parse_xacro(template_xml, **kwargs): doc = xacro.parse(template_xml) xacro.process_doc(doc, **kwargs) xml = doc.toprettyxml(indent=' ') xml = xml.replace(' xmlns:xacro="http://ros.org/wiki/xacro"', '', 1) return xml