Namespaces | Classes | Functions | Variables
xacro Namespace Reference




class  Macro
class  MacroNameSpace
class  NameSpace
class  PropertyNameSpace
class  QuickLexer
class  Table
class  XacroException


def abs_filename_spec (filename_spec)
def check_deprecated_tag (tag_name)
def deprecated_tag (_issued=[False])
def eval_all (node, macros, symbols)
def eval_default_arg (forward_variable, default, symbols, macro)
def eval_extension (s)
def eval_text (text, symbols)
def get_boolean_value (value, condition)
def get_include_files (filename_spec, symbols)
def grab_macro (elt, macros)
def grab_macros (elt, macros)
def grab_properties (elt, table)
def grab_property (elt, table)
def handle_dynamic_macro_call (node, macros, symbols)
def handle_macro_call (node, macros, symbols)
def import_xml_namespaces (parent, attributes)
def is_include (elt)
def is_valid_name (name)
def load_yaml (filename)
def main ()
def open_output (output_filename)
def parse (inp, filename=None)
def parse_macro_arg (s)
def print_location (filestack, err=None, file=sys.stderr)
def process_doc (doc, in_order=False, just_deps=False, just_includes=False, mappings=None, xacro_ns=True, kwargs)
def process_file (input_file_name, kwargs)
def process_include (elt, macros, symbols, func)
def process_includes (elt, macros=None, symbols=None)
def push_file (filename)
def remove_previous_comments (node)
def resolve_macro (fullname, macros)
def restore_filestack (oldstack)


 _basestr = basestring
 _empty_text_node = xml.dom.minidom.getDOMImplementation().createDocument(None, "dummy", None).createTextNode('\n\n')
list all_includes = []
bool allow_non_prefixed_tags = True
 backup_path = list(sys.path)
 cur_dir = os.getcwd()
list filestack = []
dictionary global_symbols = {'__builtins__': {k: __builtins__[k] for k in ['list', 'dict', 'map', 'str', 'float', 'int', 'True', 'False', 'min', 'max', 'round']}}
string include_no_matches_msg = """Include tag's filename spec \"{}\" matched no files."""
 re_macro_arg = re.compile(r)
dictionary substitution_args_context = {}
 this_dir = os.path.dirname(__file__)
 this_dir_cwd = os.getcwd()
int verbosity = 1

Function Documentation

def xacro.abs_filename_spec (   filename_spec)
Prepend the dirname of the currently processed file
if filename_spec is not yet absolute

Definition at line 80 of file src/xacro/

def xacro.check_deprecated_tag (   tag_name)
Check whether tagName starts with xacro prefix. If not, issue a warning.
:param tag_name:
:return: True if tagName is accepted as xacro tag
         False if tagName doesn't start with xacro prefix, but the prefix is required

Definition at line 157 of file src/xacro/

def xacro.deprecated_tag (   _issued = [False])

Definition at line 140 of file src/xacro/

def xacro.eval_all (   node,
Recursively evaluate node, expanding macros, replacing properties, and evaluating expressions

Definition at line 801 of file src/xacro/

def xacro.eval_default_arg (   forward_variable,

Definition at line 636 of file src/xacro/

def xacro.eval_extension (   s)

Definition at line 180 of file src/xacro/

def xacro.eval_text (   text,

Definition at line 604 of file src/xacro/

def xacro.get_boolean_value (   value,
Return a boolean value that corresponds to the given Xacro condition value.
Values "true", "1" and "1.0" are supposed to be True.
Values "false", "0" and "0.0" are supposed to be False.
All other values raise an exception.

:param value: The value to be evaluated. The value has to already be evaluated by Xacro.
:param condition: The original condition text in the XML.
:return: The corresponding boolean value, or a Python expression that, converted to boolean, corresponds to it.
:raises ValueError: If the condition value is incorrect.

Definition at line 756 of file src/xacro/

def xacro.get_include_files (   filename_spec,

Definition at line 365 of file src/xacro/

def xacro.grab_macro (   elt,

Definition at line 490 of file src/xacro/

def xacro.grab_macros (   elt,

Definition at line 523 of file src/xacro/

def xacro.grab_properties (   elt,

Definition at line 582 of file src/xacro/

def xacro.grab_property (   elt,

Definition at line 536 of file src/xacro/

def xacro.handle_dynamic_macro_call (   node,

Definition at line 648 of file src/xacro/

def xacro.handle_macro_call (   node,

Definition at line 689 of file src/xacro/

def xacro.import_xml_namespaces (   parent,
import all namespace declarations into parent

Definition at line 389 of file src/xacro/

def xacro.is_include (   elt)

Definition at line 343 of file src/xacro/

def xacro.is_valid_name (   name)
Checks whether name is a valid property or macro identifier.
With python-based evaluation, we need to avoid name clashes with python keywords.

Definition at line 447 of file src/xacro/

def xacro.load_yaml (   filename)

Definition at line 92 of file src/xacro/

def xacro.main ( )

Definition at line 1029 of file src/xacro/

def xacro.open_output (   output_filename)

Definition at line 974 of file src/xacro/

def xacro.parse (   inp,
  filename = None 
Parse input or filename into a DOM tree.
If inp is None, open filename and load from there.
Otherwise, parse inp, either as string or file object.
If inp is already a DOM tree, this function is a noop.
:raise: xml.parsers.expat.ExpatError

Definition at line 901 of file src/xacro/

def xacro.parse_macro_arg (   s)
parse the first param spec from a macro parameter string s
accepting the following syntax: <param>[:=|=][^|]<default>
:param s: param spec string
:return: param, (forward, default), rest-of-string
         forward will be either param or None (depending on whether ^ was specified)
         default will be the default string or None
         If there is no default spec at all, the middle pair will be replaced by None

Definition at line 468 of file src/xacro/

def xacro.print_location (   filestack,
  err = None,
  file = sys.stderr 

Definition at line 993 of file src/xacro/

def xacro.process_doc (   doc,
  in_order = False,
  just_deps = False,
  just_includes = False,
  mappings = None,
  xacro_ns = True,

Definition at line 933 of file src/xacro/

def xacro.process_file (   input_file_name,
main processing pipeline

Definition at line 1008 of file src/xacro/

def xacro.process_include (   elt,

Definition at line 403 of file src/xacro/

def xacro.process_includes (   elt,
  macros = None,
  symbols = None 

Definition at line 435 of file src/xacro/

def xacro.push_file (   filename)
Push a new filename to the filestack.
Instead of directly modifying filestack, a deep-copy is created and modified,
while the old filestack is returned.
This allows to store the filestack that was active when a macro or property is defined

Definition at line 62 of file src/xacro/

def xacro.remove_previous_comments (   node)
remove consecutive comments in front of the xacro-specific node

Definition at line 781 of file src/xacro/

def xacro.resolve_macro (   fullname,

Definition at line 663 of file src/xacro/

def xacro.restore_filestack (   oldstack)

Definition at line 75 of file src/xacro/

Variable Documentation

xacro._basestr = basestring

Definition at line 51 of file src/xacro/

xacro._empty_text_node = xml.dom.minidom.getDOMImplementation().createDocument(None, "dummy", None).createTextNode('\n\n')

Definition at line 780 of file src/xacro/

list xacro.all_includes = []

Definition at line 338 of file src/xacro/

bool xacro.allow_non_prefixed_tags = True

Definition at line 154 of file src/xacro/

xacro.backup_path = list(sys.path)

Definition at line 45 of file

xacro.cur_dir = os.getcwd()

Definition at line 48 of file

list xacro.filestack = []

Definition at line 60 of file src/xacro/

dictionary xacro.global_symbols = {'__builtins__': {k: __builtins__[k] for k in ['list', 'dict', 'map', 'str', 'float', 'int', 'True', 'False', 'min', 'max', 'round']}}

Definition at line 114 of file src/xacro/

string xacro.include_no_matches_msg = """Include tag's filename spec \"{}\" matched no files."""

Definition at line 340 of file src/xacro/

Initial value:
1 = QuickLexer(DOLLAR_DOLLAR_BRACE=r"\$\$+\{",
2  EXPR=r"\$\{[^\}]*\}",
3  EXTENSION=r"\$\([^\)]*\)",
4  TEXT=r"([^\$]|\$[^{(]|\$$)+")

Definition at line 597 of file src/xacro/


Definition at line 53 of file

xacro.re_macro_arg = re.compile(r)

Definition at line 466 of file src/xacro/

dictionary xacro.substitution_args_context = {}

Definition at line 56 of file src/xacro/

xacro.this_dir = os.path.dirname(__file__)

Definition at line 46 of file

xacro.this_dir_cwd = os.getcwd()

Definition at line 50 of file

int xacro.verbosity = 1

Definition at line 138 of file src/xacro/

Author(s): Stuart Glaser, William Woodall, Robert Haschke
autogenerated on Mon Jun 10 2019 15:46:01